wormclaude 1.0.95 → 1.0.96
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/cli.js +5 -1
- package/dist/commands.js +14 -1
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import { recordLearned } from './learn.js';
|
|
|
22
22
|
import { loadSkills, getSkills, getSkill, buildSkillPrompt } from './skills.js';
|
|
23
23
|
import { loadExtensions, getExtCommands, getExtCommand, buildExtCommandPrompt } from './extensions.js';
|
|
24
24
|
import { platformNote } from './subagents.js';
|
|
25
|
-
import { COMMANDS, runSlashCommand } from './commands.js';
|
|
25
|
+
import { COMMANDS, runSlashCommand, getPendingPentestCommand } from './commands.js';
|
|
26
26
|
import { tasks } from './tasks.js';
|
|
27
27
|
import { connectMcpServers } from './mcp.js';
|
|
28
28
|
import * as usage from './usage.js';
|
|
@@ -841,6 +841,10 @@ function App() {
|
|
|
841
841
|
setCmdSel(0);
|
|
842
842
|
if (!v)
|
|
843
843
|
return;
|
|
844
|
+
// Bekleyen güvenlik taraması onayı: sadece "run"/"onayla" yazıldıysa tam komuta çevir.
|
|
845
|
+
const _pending = getPendingPentestCommand(v);
|
|
846
|
+
if (_pending)
|
|
847
|
+
v = _pending;
|
|
844
848
|
// ! shell modu — LLM'siz doğrudan shell komutu (cmdsec ile gate'li). Sonucu modele bağlam olarak ekle.
|
|
845
849
|
if (v.startsWith('!') && v.length > 1) {
|
|
846
850
|
const cmd = v.slice(1).trim();
|
package/dist/commands.js
CHANGED
|
@@ -122,6 +122,16 @@ const PT_REASON = {
|
|
|
122
122
|
timeout: 'Sunucu zaman aşımı.',
|
|
123
123
|
upstream_error: 'Sunucuya ulaşılamadı.',
|
|
124
124
|
};
|
|
125
|
+
// Bekleyen tarama onayı — kullanıcı uyarıdan sonra sadece "run"/"onayla" yazınca çalıştırmak için.
|
|
126
|
+
const PT_BUILTIN = new Set(['recon', 'scan', 'xss', 'sqli']);
|
|
127
|
+
let pendingPentest = null;
|
|
128
|
+
export function getPendingPentestCommand(input) {
|
|
129
|
+
if (!pendingPentest)
|
|
130
|
+
return null;
|
|
131
|
+
const cmd = pendingPentest;
|
|
132
|
+
pendingPentest = null; // her girişte tüket — onaylanmazsa bekleyen iptal olur
|
|
133
|
+
return /^(run|onayla|çalıştır|calistir|evet|yes|-y|--yes)$/i.test((input || '').trim()) ? cmd : null;
|
|
134
|
+
}
|
|
125
135
|
function formatFinding(x) {
|
|
126
136
|
const sev = x.severity ? `[${String(x.severity).toUpperCase()}] ` : '';
|
|
127
137
|
if (x.type === 'xss')
|
|
@@ -161,13 +171,16 @@ async function pentestCmd(tool, arg, ctx) {
|
|
|
161
171
|
return;
|
|
162
172
|
}
|
|
163
173
|
if (!scopeAck) {
|
|
174
|
+
const reRun = PT_BUILTIN.has(tool) ? `/${tool} ${target} run` : `/skill ${tool} ${target} run`;
|
|
175
|
+
pendingPentest = reRun;
|
|
164
176
|
ctx.note(`⚠️ YETKİ ONAYI GEREKLİ — ${label}\n` +
|
|
165
177
|
`Hedef: ${target}\n\n` +
|
|
166
178
|
`Bu tarama hedefe GERÇEK istekler gönderir ve trafik SENİN IP'nden çıkar. Yalnız sahibi olduğun ya da\n` +
|
|
167
179
|
`yazılı izin/angajman bulunan sistemlerde çalıştır. Yetkisiz tarama yasa dışıdır ve kayıt altına alınır.\n\n` +
|
|
168
|
-
|
|
180
|
+
`Onaylamak için sadece "run" yaz (Enter) · ya da tam komut: ${reRun}`);
|
|
169
181
|
return;
|
|
170
182
|
}
|
|
183
|
+
pendingPentest = null; // tarama başladı → bekleyen onayı temizle
|
|
171
184
|
ctx.note(`${label} başlatılıyor — ${target}`);
|
|
172
185
|
const out = await runPentest(ctx.config, tool, target, true, (s) => ctx.note(s));
|
|
173
186
|
if (!out.ok) {
|
package/dist/theme.js
CHANGED