mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-04-21 10:16:32 +02:00
Add files via upload
This commit is contained in:
@@ -595,7 +595,11 @@
|
||||
"knowledge": "Knowledge base",
|
||||
"robots": "Bots",
|
||||
"terminal": "Terminal",
|
||||
"security": "Security"
|
||||
"security": "Security",
|
||||
"infocollect": "Recon"
|
||||
},
|
||||
"infocollect": {
|
||||
"title": "Reconnaissance"
|
||||
},
|
||||
"knowledge": {
|
||||
"title": "Knowledge base"
|
||||
@@ -1256,6 +1260,9 @@
|
||||
"openaiBaseUrlPlaceholder": "https://api.openai.com/v1",
|
||||
"openaiApiKeyPlaceholder": "Enter OpenAI API Key",
|
||||
"modelPlaceholder": "gpt-4",
|
||||
"maxTotalTokens": "Max Context Tokens",
|
||||
"maxTotalTokensPlaceholder": "120000",
|
||||
"maxTotalTokensHint": "Shared by memory compression and attack chain building. Default: 120000",
|
||||
"fofaBaseUrlPlaceholder": "https://fofa.info/api/v1/search/all (optional)",
|
||||
"fofaBaseUrlHint": "Leave empty for default.",
|
||||
"email": "Email",
|
||||
|
||||
@@ -595,7 +595,11 @@
|
||||
"knowledge": "知识库",
|
||||
"robots": "机器人设置",
|
||||
"terminal": "终端",
|
||||
"security": "安全设置"
|
||||
"security": "安全设置",
|
||||
"infocollect": "信息收集"
|
||||
},
|
||||
"infocollect": {
|
||||
"title": "信息收集"
|
||||
},
|
||||
"knowledge": {
|
||||
"title": "知识库设置"
|
||||
@@ -1256,6 +1260,9 @@
|
||||
"openaiBaseUrlPlaceholder": "https://api.openai.com/v1",
|
||||
"openaiApiKeyPlaceholder": "输入OpenAI API Key",
|
||||
"modelPlaceholder": "gpt-4",
|
||||
"maxTotalTokens": "最大上下文 Token 数",
|
||||
"maxTotalTokensPlaceholder": "120000",
|
||||
"maxTotalTokensHint": "内存压缩和攻击链构建共用此配置,默认 120000",
|
||||
"fofaBaseUrlPlaceholder": "https://fofa.info/api/v1/search/all(可选)",
|
||||
"fofaBaseUrlHint": "留空则使用默认地址。",
|
||||
"email": "Email",
|
||||
|
||||
@@ -109,6 +109,10 @@ async function loadConfig(loadTools = true) {
|
||||
document.getElementById('openai-api-key').value = currentConfig.openai.api_key || '';
|
||||
document.getElementById('openai-base-url').value = currentConfig.openai.base_url || '';
|
||||
document.getElementById('openai-model').value = currentConfig.openai.model || '';
|
||||
const maxTokensEl = document.getElementById('openai-max-total-tokens');
|
||||
if (maxTokensEl) {
|
||||
maxTokensEl.value = currentConfig.openai.max_total_tokens || 120000;
|
||||
}
|
||||
|
||||
// 填充FOFA配置
|
||||
const fofa = currentConfig.fofa || {};
|
||||
@@ -829,7 +833,8 @@ async function applySettings() {
|
||||
provider: provider,
|
||||
api_key: apiKey,
|
||||
base_url: baseUrl,
|
||||
model: model
|
||||
model: model,
|
||||
max_total_tokens: parseInt(document.getElementById('openai-max-total-tokens')?.value) || 120000
|
||||
},
|
||||
fofa: {
|
||||
email: document.getElementById('fofa-email')?.value.trim() || '',
|
||||
|
||||
+36
-21
@@ -1338,6 +1338,9 @@
|
||||
<div class="settings-nav-item active" data-section="basic" onclick="switchSettingsSection('basic')">
|
||||
<span data-i18n="settings.nav.basic">基本设置</span>
|
||||
</div>
|
||||
<div class="settings-nav-item" data-section="infocollect" onclick="switchSettingsSection('infocollect')">
|
||||
<span data-i18n="settings.nav.infocollect">信息收集</span>
|
||||
</div>
|
||||
<div class="settings-nav-item" data-section="knowledge" onclick="switchSettingsSection('knowledge')">
|
||||
<span data-i18n="settings.nav.knowledge">知识库</span>
|
||||
</div>
|
||||
@@ -1384,6 +1387,11 @@
|
||||
<label for="openai-model"><span data-i18n="settingsBasic.model">模型</span> <span style="color: red;">*</span></label>
|
||||
<input type="text" id="openai-model" data-i18n="settingsBasic.modelPlaceholder" data-i18n-attr="placeholder" placeholder="gpt-4" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="openai-max-total-tokens"><span data-i18n="settingsBasic.maxTotalTokens">最大上下文 Token 数</span></label>
|
||||
<input type="number" id="openai-max-total-tokens" data-i18n="settingsBasic.maxTotalTokensPlaceholder" data-i18n-attr="placeholder" placeholder="120000" min="1000" step="1000" />
|
||||
<small style="color: var(--text-muted, #718096); font-size: 0.75rem;" data-i18n="settingsBasic.maxTotalTokensHint">内存压缩和攻击链构建共用此配置,默认 120000</small>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 8px; margin-top: 2px;">
|
||||
<a href="javascript:void(0)" id="test-openai-btn" onclick="testOpenAIConnection()" style="font-size: 0.8125rem; color: var(--accent-color, #3182ce); text-decoration: none; cursor: pointer; user-select: none;" data-i18n="settingsBasic.testConnection">测试连接</a>
|
||||
<span id="test-openai-result" style="font-size: 0.8125rem;"></span>
|
||||
@@ -1391,27 +1399,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FOFA配置 -->
|
||||
<div class="settings-subsection">
|
||||
<h4 data-i18n="settingsBasic.fofaConfig">FOFA 配置</h4>
|
||||
<div class="settings-form">
|
||||
<div class="form-group">
|
||||
<label for="fofa-base-url">Base URL</label>
|
||||
<input type="text" id="fofa-base-url" data-i18n="settingsBasic.fofaBaseUrlPlaceholder" data-i18n-attr="placeholder" placeholder="https://fofa.info/api/v1/search/all(可选)" />
|
||||
<small class="form-hint" data-i18n="settingsBasic.fofaBaseUrlHint">留空则使用默认地址。</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="fofa-email" data-i18n="settingsBasic.email">Email</label>
|
||||
<input type="text" id="fofa-email" data-i18n="settingsBasic.fofaEmailPlaceholder" data-i18n-attr="placeholder" placeholder="输入 FOFA 账号邮箱" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="fofa-api-key">API Key</label>
|
||||
<input type="password" id="fofa-api-key" data-i18n="settingsBasic.fofaApiKeyPlaceholder" data-i18n-attr="placeholder" placeholder="输入 FOFA API Key" autocomplete="off" />
|
||||
<small class="form-hint" data-i18n="settingsBasic.fofaApiKeyHint">仅保存在服务器配置中(`config.yaml`)。</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Agent配置 -->
|
||||
<div class="settings-subsection">
|
||||
<h4 data-i18n="settingsBasic.agentConfig">Agent 配置</h4>
|
||||
@@ -1451,6 +1438,34 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 信息收集设置 -->
|
||||
<div id="settings-section-infocollect" class="settings-section-content">
|
||||
<div class="settings-section-header">
|
||||
<h3 data-i18n="settings.infocollect.title">信息收集</h3>
|
||||
</div>
|
||||
|
||||
<!-- FOFA配置 -->
|
||||
<div class="settings-subsection">
|
||||
<h4 data-i18n="settingsBasic.fofaConfig">FOFA 配置</h4>
|
||||
<div class="settings-form">
|
||||
<div class="form-group">
|
||||
<label for="fofa-base-url">Base URL</label>
|
||||
<input type="text" id="fofa-base-url" data-i18n="settingsBasic.fofaBaseUrlPlaceholder" data-i18n-attr="placeholder" placeholder="https://fofa.info/api/v1/search/all(可选)" />
|
||||
<small class="form-hint" data-i18n="settingsBasic.fofaBaseUrlHint">留空则使用默认地址。</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="fofa-email" data-i18n="settingsBasic.email">Email</label>
|
||||
<input type="text" id="fofa-email" data-i18n="settingsBasic.fofaEmailPlaceholder" data-i18n-attr="placeholder" placeholder="输入 FOFA 账号邮箱" autocomplete="off" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="fofa-api-key">API Key</label>
|
||||
<input type="password" id="fofa-api-key" data-i18n="settingsBasic.fofaApiKeyPlaceholder" data-i18n-attr="placeholder" placeholder="输入 FOFA API Key" autocomplete="off" />
|
||||
<small class="form-hint" data-i18n="settingsBasic.fofaApiKeyHint">仅保存在服务器配置中(`config.yaml`)。</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 知识库设置 -->
|
||||
<div id="settings-section-knowledge" class="settings-section-content">
|
||||
<div class="settings-section-header">
|
||||
|
||||
Reference in New Issue
Block a user