wormclaude 1.0.166 → 1.0.168
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 +80 -9
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -263,19 +263,85 @@ function formatFinding(x) {
|
|
|
263
263
|
return `${sev}SQLi (${x.technique || '?'}) · param ${x.param || '?'} — ${x.evidence || ''}`;
|
|
264
264
|
if (x.type === 'subdomain')
|
|
265
265
|
return `${tt('subdomain', 'alt-alan')}: ${x.value}`;
|
|
266
|
+
if (x.type === 'subdomain_takeover')
|
|
267
|
+
return `${sev}${tt('subdomain takeover', 'subdomain takeover')}: ${x.url || ''}${x.service ? ' (' + x.service + ')' : ''}`;
|
|
266
268
|
if (x.type === 'host')
|
|
267
269
|
return `${x.status || ''} ${x.url || ''}${x.title ? ' · ' + x.title : ''}${x.server ? ' · ' + x.server : ''}`;
|
|
268
270
|
if (x.type === 'tech')
|
|
269
271
|
return `${tt('tech', 'teknoloji')}: ${x.value}`;
|
|
270
272
|
if (x.type === 'weak_headers')
|
|
271
273
|
return `${sev}${tt('missing security headers', 'eksik güvenlik başlıkları')}: ${(x.missing || []).join(', ')}`;
|
|
272
|
-
if (x.type === '
|
|
273
|
-
return `${sev}${tt('
|
|
274
|
-
if (x.type === 'exposure')
|
|
275
|
-
return `${sev}${tt('exposure', 'ifşa')}: ${x.url || ''} — ${x.evidence || ''}`;
|
|
274
|
+
if (x.type === 'path')
|
|
275
|
+
return `${sev}${tt('path', 'yol')} ${x.url || ''} → ${x.status || ''}`;
|
|
276
276
|
if (x.value)
|
|
277
277
|
return `${x.value}`;
|
|
278
|
-
|
|
278
|
+
// GENEL: şablon bulguları (ssrf/ssti/lfi/ldap/cmd-injection/nosql/open-redirect/crlf/graphql/cors/exposure…)
|
|
279
|
+
const r = _REMED[x.type];
|
|
280
|
+
const label = (r && r.t) || x.name || x.type;
|
|
281
|
+
let s = `${sev}${label}`;
|
|
282
|
+
if (x.param)
|
|
283
|
+
s += ` · param ${x.param}`;
|
|
284
|
+
if (x.url)
|
|
285
|
+
s += ` — ${x.url}`;
|
|
286
|
+
return s;
|
|
287
|
+
}
|
|
288
|
+
// Tarama sonrası YORUMLU özet — ne ciddi, ne minör, ne yapmalı (deterministik, _REMED'den; uydurma yok).
|
|
289
|
+
export function summarizeScan(target, findings) {
|
|
290
|
+
const L = getLang() === 'tr';
|
|
291
|
+
const bySev = (s) => findings.filter((f) => f.severity === s && f.type !== 'reflection');
|
|
292
|
+
const high = bySev('high'), med = bySev('medium'), low = bySev('low'), info = bySev('info');
|
|
293
|
+
// tip bazında grupla → "XSS ×4 (searchTerm) — <etki>"
|
|
294
|
+
const grp = (list, withImpact) => {
|
|
295
|
+
const byType = {};
|
|
296
|
+
for (const f of list)
|
|
297
|
+
(byType[f.type] = byType[f.type] || []).push(f);
|
|
298
|
+
return Object.entries(byType).map(([t, fs]) => {
|
|
299
|
+
const r = _REMED[t];
|
|
300
|
+
const label = (r && r.t) || (fs[0] && fs[0].name) || t;
|
|
301
|
+
const params = [...new Set(fs.map((f) => f.param).filter(Boolean))];
|
|
302
|
+
const where = params.length ? ` (${params.join(', ')})` : '';
|
|
303
|
+
const head = `${label}${fs.length > 1 ? ` ×${fs.length}` : ''}${where}`;
|
|
304
|
+
return withImpact && r ? ` • ${head} — ${r.impact}` : ` • ${head}`;
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
const out = [];
|
|
308
|
+
out.push(L ? `📋 ÖZET — ${target}` : `📋 SUMMARY — ${target}`);
|
|
309
|
+
if (high.length) {
|
|
310
|
+
out.push(L ? `🔴 ${high.length} YÜKSEK risk (acil, sömürülebilir):` : `🔴 ${high.length} HIGH (urgent, exploitable):`);
|
|
311
|
+
out.push(...grp(high, true));
|
|
312
|
+
}
|
|
313
|
+
if (med.length) {
|
|
314
|
+
out.push(L ? `🟠 ${med.length} ORTA:` : `🟠 ${med.length} MEDIUM:`);
|
|
315
|
+
out.push(...grp(med, true));
|
|
316
|
+
}
|
|
317
|
+
if (low.length)
|
|
318
|
+
out.push((L ? `🔵 ${low.length} düşük (minör): ` : `🔵 ${low.length} low (minor): `) + grp(low, false).map((s) => s.replace(/^ {2}• /, '')).join('; '));
|
|
319
|
+
if (info.length)
|
|
320
|
+
out.push((L ? `⚪ ${info.length} bilgi (korumalı/bilgilendirme): ` : `⚪ ${info.length} info: `) + grp(info, false).map((s) => s.replace(/^ {2}• /, '')).join('; '));
|
|
321
|
+
// verdict
|
|
322
|
+
if (high.length)
|
|
323
|
+
out.push(L ? `\n➤ Sonuç: ${high.length} GERÇEK yüksek-risk açık — acil düzeltilmeli. Detaylı rapor için: /report`
|
|
324
|
+
: `\n➤ Verdict: ${high.length} REAL high-risk issues — fix urgently. Full report: /report`);
|
|
325
|
+
else if (med.length)
|
|
326
|
+
out.push(L ? `\n➤ Sonuç: orta-risk bulgu(lar) var, gözden geçir. Rapor: /report` : `\n➤ Verdict: medium-risk findings, review. Report: /report`);
|
|
327
|
+
else
|
|
328
|
+
out.push(L ? `\n➤ Sonuç: yüksek/orta açık yok; test edilen yüzey büyük ölçüde temiz. (Stored/DOM/auth-arkası kapsam dışı — "temiz" ≠ "%100 güvenli")`
|
|
329
|
+
: `\n➤ Verdict: no high/medium issues; tested surface largely clean. (Stored/DOM/behind-auth out of scope)`);
|
|
330
|
+
return out;
|
|
331
|
+
}
|
|
332
|
+
// Tarama sonucunu MODELİN context'ine ekle → kullanıcı tarama hakkında soru sorabilsin
|
|
333
|
+
// ("türkçe anlat", "neyi önce düzelteyim", "SSRF nedir"). assistant() sadece ekrana basar, geçmişe
|
|
334
|
+
// eklemez; bu yüzden model taramayı bilmiyordu. Özet + yüksek/orta bulgular eklenir (context şişmesin).
|
|
335
|
+
function injectScanContext(ctx, target, findings) {
|
|
336
|
+
if (!findings || !findings.length)
|
|
337
|
+
return;
|
|
338
|
+
const imp = findings.filter((f) => ['critical', 'high', 'medium'].includes(f.severity)).slice(0, 40);
|
|
339
|
+
const note = summarizeScan(target, findings).join('\n') + (imp.length ? '\n' + imp.map(formatFinding).join('\n') : '');
|
|
340
|
+
try {
|
|
341
|
+
ctx.setHistory([...ctx.getHistory(),
|
|
342
|
+
{ role: 'assistant', content: `[${tt('Security scan result', 'Güvenlik tarama sonucu')} — ${target}]\n${note}` }]);
|
|
343
|
+
}
|
|
344
|
+
catch { /* geçmiş güncellenemezse sessiz geç */ }
|
|
279
345
|
}
|
|
280
346
|
// /recon /scan /xss /sqli — ince runner'ı sürer. Zorunlu yetki onayı + trust 3+ teaser.
|
|
281
347
|
// Slash'sız komut tespiti: kullanıcı "recon target.com" (slash'sız) yazınca "/recon target.com" öner.
|
|
@@ -364,6 +430,7 @@ async function pentestCmd(tool, arg, ctx) {
|
|
|
364
430
|
lines.push(` … +${f.length - 40} ${tt('more', 'daha')}`);
|
|
365
431
|
}
|
|
366
432
|
ctx.assistant(lines.join('\n'));
|
|
433
|
+
injectScanContext(ctx, rep.target || target, f); // model tarama hakkında soruları yanıtlayabilsin
|
|
367
434
|
}
|
|
368
435
|
// /fullscan — DETERMİNİSTİK tam tarama. Modelin doğaçlamasına (nmap/sqlmap orkestrasyonu →
|
|
369
436
|
// narration/uydurma/PATH derdi) GÜVENMEZ: recon → XSS → SQLi motorunu KOD sırayla, her hedefte
|
|
@@ -429,19 +496,23 @@ async function fullScanCmd(arg, ctx) {
|
|
|
429
496
|
const order = { critical: 0, high: 1, medium: 2, low: 3, info: 4 };
|
|
430
497
|
all.sort((a, b) => (order[a.severity] ?? 9) - (order[b.severity] ?? 9));
|
|
431
498
|
setLastScan(target, all); // /report için sakla
|
|
432
|
-
const lines = [
|
|
499
|
+
const lines = [];
|
|
433
500
|
if (!all.length) {
|
|
434
|
-
lines.push(tt('
|
|
501
|
+
lines.push(`✓ ${tt('Full scan complete', 'Tam tarama tamamlandı')} — ${target}`);
|
|
502
|
+
lines.push(tt('No findings across all scanners. Target looks clean or was unreachable. ("clean" ≠ "100% secure")', 'Tüm tarayıcılarda bulgu yok. Hedef temiz görünüyor ya da erişilemedi. ("temiz" ≠ "%100 güvenli")'));
|
|
435
503
|
}
|
|
436
504
|
else {
|
|
437
|
-
|
|
438
|
-
lines.push(
|
|
505
|
+
// ÖNCE yorumlu özet (ne ciddi/ne minör/ne yapmalı), SONRA detay liste.
|
|
506
|
+
lines.push(...summarizeScan(target, all));
|
|
507
|
+
lines.push('');
|
|
508
|
+
lines.push(`— ${tt('details', 'detay')} (${all.length} ${tt('finding(s)', 'bulgu')}) —`);
|
|
439
509
|
for (const x of all.slice(0, 60))
|
|
440
510
|
lines.push(' ' + formatFinding(x));
|
|
441
511
|
if (all.length > 60)
|
|
442
512
|
lines.push(` … +${all.length - 60} ${tt('more', 'daha')}`);
|
|
443
513
|
}
|
|
444
514
|
ctx.assistant(lines.join('\n'));
|
|
515
|
+
injectScanContext(ctx, target, all); // model tarama hakkında soruları yanıtlayabilsin
|
|
445
516
|
}
|
|
446
517
|
// /exploit ve /harden — AKTİF tarama DEĞİL, model-üretim görevleri (PoC / YARA-Sigma yazar).
|
|
447
518
|
// Güçlü, yetkili-kapsam çerçevesiyle modele gider (skill gibi). Çıktı kullanıcının dilinde.
|
package/dist/theme.js
CHANGED