wormclaude 1.0.152 → 1.0.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands.js +30 -1
- package/dist/i18n.js +2 -0
- package/dist/theme.js +1 -1
- package/dist/tui.js +11 -1
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -164,6 +164,25 @@ function formatFinding(x) {
|
|
|
164
164
|
return JSON.stringify(x);
|
|
165
165
|
}
|
|
166
166
|
// /recon /scan /xss /sqli — ince runner'ı sürer. Zorunlu yetki onayı + trust 3+ teaser.
|
|
167
|
+
// Slash'sız komut tespiti: kullanıcı "recon target.com" (slash'sız) yazınca "/recon target.com" öner.
|
|
168
|
+
// FALSE-POZİTİF guard: ilk kelime tam komut adı + argüman var + soru DEĞİL ("recon nedir?" tetiklemez).
|
|
169
|
+
const _BARE_CMDS = new Set(['recon', 'scan', 'xss', 'sqli', 'exploit', 'harden', 'agent', 'agents']);
|
|
170
|
+
const _QUESTION_WORDS = new Set(['nedir', 'ne', 'nasıl', 'nasil', 'neden', 'mi', 'mu', 'mı', 'mü', 'what', 'how', 'why', 'is', 'are', 'about', 'açıkla', 'acikla', 'explain', 'hakkında', 'hakkinda', 'anlat']);
|
|
171
|
+
export function detectBareCommand(input) {
|
|
172
|
+
const s = (input || '').trim();
|
|
173
|
+
if (!s || s.startsWith('/') || s.includes('?') || s.includes('\n'))
|
|
174
|
+
return null;
|
|
175
|
+
const parts = s.split(/\s+/);
|
|
176
|
+
if (parts.length < 2)
|
|
177
|
+
return null; // tek kelime → düz mesaj olabilir
|
|
178
|
+
const first = parts[0].toLowerCase();
|
|
179
|
+
if (!_BARE_CMDS.has(first))
|
|
180
|
+
return null;
|
|
181
|
+
if (_QUESTION_WORDS.has(parts[1].toLowerCase()))
|
|
182
|
+
return null; // "recon nedir" → komut değil
|
|
183
|
+
const cmd = first === 'agents' ? 'agent' : (first === 'scan' ? 'scan' : first);
|
|
184
|
+
return '/' + cmd + ' ' + parts.slice(1).join(' ');
|
|
185
|
+
}
|
|
167
186
|
async function pentestCmd(tool, arg, ctx) {
|
|
168
187
|
if (tool === 'scan')
|
|
169
188
|
tool = 'recon'; // genel tarama = keşif+başlıklar
|
|
@@ -173,7 +192,17 @@ async function pentestCmd(tool, arg, ctx) {
|
|
|
173
192
|
scopeAck = true;
|
|
174
193
|
parts.pop();
|
|
175
194
|
}
|
|
176
|
-
|
|
195
|
+
// Ana sayfadaki kozmetik flag'leri (--scope authorized, --cve X, --emit yara,sigma) yok say → hedef temiz kalsın
|
|
196
|
+
const cleaned = [];
|
|
197
|
+
for (let i = 0; i < parts.length; i++) {
|
|
198
|
+
if (parts[i].startsWith('-')) {
|
|
199
|
+
if (parts[i + 1] && !parts[i + 1].startsWith('-'))
|
|
200
|
+
i++;
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
cleaned.push(parts[i]);
|
|
204
|
+
}
|
|
205
|
+
const target = cleaned.join(' ').trim();
|
|
177
206
|
const label = PT_LABELS[tool] || tool;
|
|
178
207
|
if (!target) {
|
|
179
208
|
ctx.note(`${label}\nKullanım: /${tool} <hedef>\nÖrnek: /${tool} https://test.com/sayfa?id=1`);
|
package/dist/i18n.js
CHANGED
|
@@ -100,6 +100,7 @@ const STR = {
|
|
|
100
100
|
'tui.userCancel': 'kullanıcı iptal etti',
|
|
101
101
|
'tui.cmdErr': 'Komut hatası: {0}',
|
|
102
102
|
'tui.langSet': 'Dil değiştirildi: Türkçe',
|
|
103
|
+
'tui.useSlash': 'Komutlar / ile başlar. Şunu mu demek istediniz: {0} · çalıştırmak için Enter\'a bas',
|
|
103
104
|
},
|
|
104
105
|
en: {
|
|
105
106
|
'lang.title': 'Select language / Dil seçin',
|
|
@@ -166,6 +167,7 @@ const STR = {
|
|
|
166
167
|
'tui.userCancel': 'user cancelled',
|
|
167
168
|
'tui.cmdErr': 'Command error: {0}',
|
|
168
169
|
'tui.langSet': 'Language changed: English',
|
|
170
|
+
'tui.useSlash': 'Commands start with /. Did you mean: {0} · press Enter to run',
|
|
169
171
|
},
|
|
170
172
|
};
|
|
171
173
|
// Komut açıklamaları (slash menüsü + /help)
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -15,7 +15,7 @@ import { itemAnsi, markdownAnsi } from './ansi.js';
|
|
|
15
15
|
import { theme, VERSION } from './theme.js';
|
|
16
16
|
import { cleanModelText } from './textclean.js';
|
|
17
17
|
import { stripInlineToolCalls, stripEchoBlocks } from './inlinetools.js';
|
|
18
|
-
import { COMMANDS, runSlashCommand, getPendingPentestCommand, buildExploitPrompt, buildHardenPrompt } from './commands.js';
|
|
18
|
+
import { COMMANDS, runSlashCommand, getPendingPentestCommand, buildExploitPrompt, buildHardenPrompt, detectBareCommand } from './commands.js';
|
|
19
19
|
import { cmdDesc, t, setLang, loadLang, getLang } from './i18n.js';
|
|
20
20
|
import { getSkill, getSkills, buildSkillPrompt } from './skills.js';
|
|
21
21
|
import { getExtCommand, getExtCommands, buildExtCommandPrompt } from './extensions.js';
|
|
@@ -878,6 +878,16 @@ export async function runTui() {
|
|
|
878
878
|
runCommand(v);
|
|
879
879
|
return;
|
|
880
880
|
}
|
|
881
|
+
// Slash'sız komut mu? ("recon target.com" → "/recon target.com" öner, slash kullanımına yönlendir)
|
|
882
|
+
const _bare = detectBareCommand(v);
|
|
883
|
+
if (_bare) {
|
|
884
|
+
printItem({ kind: 'note', text: t('tui.useSlash', _bare) });
|
|
885
|
+
inputBuf = _bare;
|
|
886
|
+
inputCur = _bare.length;
|
|
887
|
+
cmdSel = 0;
|
|
888
|
+
refresh();
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
881
891
|
// 🖼 Görsel sürükle-bırak — girdide resim yolu varsa VL modeline gönder (vision turu)
|
|
882
892
|
const _vis = extractImages(v);
|
|
883
893
|
if (_vis.images.length) {
|