Exploit database

GH-57b9eeabc93896732f8354d7ed9d870c

moleft/react2shell-toolbox

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2025-55182

257 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files19

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/renderer/src/composables/useFofaConnection.js

JavaScript · 1,569 bytes
/**
 * FOFA 连接管理 Composable
 * 负责 FOFA API 连接测试和用户信息管理
 * 现在使用 Pinia store 进行状态管理
 */
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { useFofaStore } from '../stores/fofaStore'

export function useFofaConnection() {
  const { t } = useI18n()
  const fofaStore = useFofaStore()

  // 邮箱脱敏函数
  const maskEmail = (email) => {
    if (!email) return ''
    const [username, domain] = email.split('@')
    if (!username || !domain) return email

    if (username.length <= 4) {
      return `${username[0]}***@${domain}`
    }

    return `${username.slice(0, 2)}***${username.slice(-2)}@${domain}`
  }

  // 脱敏后的邮箱
  const fofaEmail = computed(() => maskEmail(fofaStore.email))

  // 加载 FOFA 邮箱(已废弃,现在由 fofaStore 管理)
  const loadFofaEmail = async () => {
    // 如果 store 还没有初始化,触发测试连接
    if (!fofaStore.initialized) {
      await fofaStore.testConnection()
    }
  }

  // 测试 FOFA 连接
  const testFofaConnection = async () => {
    await fofaStore.testConnection()

    if (fofaStore.connected) {
      return { success: true, message: t('settings.fofa.testSuccess') }
    } else {
      return { success: false, error: t('settings.fofa.testFailed') }
    }
  }

  return {
    fofaConnected: computed(() => fofaStore.connected),
    testingConnection: computed(() => fofaStore.testing),
    fofaEmail,
    userInfo: computed(() => fofaStore.userInfo),
    loadFofaEmail,
    testFofaConnection
  }
}