wormclaude 1.0.89 → 1.0.91

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 CHANGED
@@ -15,7 +15,7 @@ import { isLearnEnabled, setLearnEnabled, getLearnFile, getLearnCount } from './
15
15
  import { saveMemoryFact, getMemoryPath, loadMemoryContext } from './memory.js';
16
16
  import { fetchAccount, getVerifyStatus, submitVerification } from './api.js';
17
17
  import { programText, tier } from './program.js';
18
- import { runPentest } from './pentest.js';
18
+ import { runPentest, fetchPtTools } from './pentest.js';
19
19
  export const COMMANDS = [
20
20
  { name: '/help', desc: 'komutları ve ipuçlarını göster' },
21
21
  { name: '/clear', desc: 'sohbeti ve geçmişi temizle' },
@@ -743,17 +743,31 @@ export async function runSlashCommand(input, ctx) {
743
743
  case '/skill': {
744
744
  const m = (arg || '').trim().split(/\s+/).filter(Boolean);
745
745
  const sub = (m.shift() || '').toLowerCase();
746
- if (['xss', 'sqli', 'recon', 'scan'].includes(sub)) {
746
+ // dahili (xss/sqli/recon) VEYA sunucudaki şablon id'si — sunucu doğrular
747
+ if (sub && !['list', 'help', 'ls', ''].includes(sub)) {
747
748
  await pentestCmd(sub, m.join(' '), ctx);
748
749
  return true;
749
750
  }
750
- ctx.note('Güvenlik tarama skill\'leri (seviye 3+ · ayrı kurulum gerekmez, motor sunucuda):\n' +
751
- ' /skill xss <url> reflected XSS\n' +
752
- ' /skill sqli <url> SQL injection (error/boolean/time)\n' +
753
- ' /skill recon <alan> alt-alan + başlık + ifşa\n' +
754
- 'Çalıştırmak için sonuna "run" ekle:\n' +
755
- ' /skill xss https://site/p?id=1 run\n' +
756
- '(kısa yol: /xss /sqli /recon)');
751
+ // Canlı liste: dahili komutlar + admin'in eklediği özel şablonlar
752
+ const t = await fetchPtTools(ctx.config);
753
+ const lines = ['🛡️ Güvenlik tarama skill\'leri (motor sunucuda gizli):'];
754
+ if (t && !t.eligible) {
755
+ lines.push(` ⚠ Seviyen ${t.trust} gerekli: ${t.min_trust}+. Başvuru: /dogrula`);
756
+ }
757
+ else if (t) {
758
+ lines.push(` Aylık kota: ${t.used}/${t.quota}`);
759
+ }
760
+ lines.push(' Dahili:');
761
+ const builtins = (t && t.tools) || { xss: 'reflected XSS', sqli: 'SQL injection', recon: 'keşif + ifşa' };
762
+ for (const [id, name] of Object.entries(builtins))
763
+ lines.push(` /skill ${id} <hedef> run ${name}`);
764
+ if (t && (t.templates || []).length) {
765
+ lines.push(' Özel şablonlar (admin):');
766
+ for (const tm of t.templates)
767
+ lines.push(` /skill ${tm.id} <hedef> run ${tm.name || ''}${tm.severity ? ' [' + tm.severity + ']' : ''}`);
768
+ }
769
+ lines.push('Örnek: /skill xss https://site/p?id=1 run · kısa yol: /xss /sqli /recon');
770
+ ctx.note(lines.join('\n'));
757
771
  return true;
758
772
  }
759
773
  case '/export': {
package/dist/pentest.js CHANGED
@@ -1,4 +1,19 @@
1
1
  const MAX_BODY = 262_144; // 256 KB cevap gövdesi üst sınırı
2
+ // Kullanılabilir tarama skill'leri + kota durumu (dahili + admin şablonları) — keşif için.
3
+ export async function fetchPtTools(config) {
4
+ try {
5
+ const r = await fetch(`${config.baseUrl}/pentest/tools`, {
6
+ headers: { ...(config.apiKey ? { Authorization: `Bearer ${config.apiKey}` } : {}) },
7
+ signal: AbortSignal.timeout(10000),
8
+ });
9
+ if (!r.ok)
10
+ return null;
11
+ return await r.json();
12
+ }
13
+ catch {
14
+ return null;
15
+ }
16
+ }
2
17
  async function postJson(config, p, body, timeoutMs) {
3
18
  try {
4
19
  const r = await fetch(`${config.baseUrl}${p}`, {
@@ -36,7 +51,7 @@ async function execReq(req, allowed) {
36
51
  method: req.method || 'GET',
37
52
  headers: req.headers,
38
53
  body: req.body,
39
- redirect: 'follow',
54
+ redirect: req.follow === false ? 'manual' : 'follow', // open-redirect vb. için Location'ı görmek
40
55
  signal: AbortSignal.timeout(Math.max(3, req.timeout || 20) * 1000),
41
56
  });
42
57
  let body = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {