wormclaude 1.0.186 → 1.0.188

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/pentest.js CHANGED
@@ -1,3 +1,12 @@
1
+ // WormClaude güvenlik tarama — İSTEMCİ (aptal HTTP göndericisi).
2
+ //
3
+ // Bu modül hiç payload/tespit/araç içermez. Sunucudan HTTP istek SPEC'leri alır, her birini
4
+ // YEREL fetch eder (trafik kullanıcının IP'sinden çıkar), ham cevabı sunucuya geri yollar.
5
+ // Tüm tarama zekası (payload, tespit, zincirleme) SUNUCUDA gizlidir. Dış binary YOK.
6
+ //
7
+ // Güvenlik: yalnız sunucunun bildirdiği allowed_hosts'a istek atılır (sunucuyu rastgele
8
+ // hedeflere SSRF proxy'si yapmayı engeller).
9
+ import net from 'node:net';
1
10
  import { getLang } from './i18n.js';
2
11
  const tt = (en, tr) => (getLang() === 'tr' ? tr : en);
3
12
  const MAX_BODY = 262_144; // 256 KB cevap gövdesi üst sınırı
@@ -160,15 +169,59 @@ export function _mergeAuth(reqHeaders, auth) {
160
169
  h[k] = v;
161
170
  return h;
162
171
  }
172
+ // Ham TCP connect (port taraması/banner). Bağlandıysa port AÇIK; gelen ilk veri = banner.
173
+ // allowed-host SSRF guard'ı burada da geçerli (yalnız sunucunun bildirdiği hedefe bağlan).
174
+ function execTcp(req, allowed) {
175
+ return new Promise((resolve) => {
176
+ const t0 = Date.now();
177
+ const host = (req.host || '').toLowerCase();
178
+ if (!allowed.has(host)) {
179
+ resolve({ id: req.id, ms: 0, error: `izin-dışı host: ${host}` });
180
+ return;
181
+ }
182
+ const sock = new net.Socket();
183
+ let banner = '', connected = false, done = false;
184
+ const finish = (extra) => {
185
+ if (done)
186
+ return;
187
+ done = true;
188
+ try {
189
+ sock.destroy();
190
+ }
191
+ catch { }
192
+ resolve({ id: req.id, ms: Date.now() - t0, body: banner.slice(0, 2048), status: connected ? 1 : 0, ...extra });
193
+ };
194
+ sock.setTimeout(Math.max(1, req.timeout || 4) * 1000);
195
+ sock.on('connect', () => { connected = true; if (req.send) {
196
+ try {
197
+ sock.write(req.send);
198
+ }
199
+ catch { }
200
+ } });
201
+ sock.on('data', (d) => { banner += d.toString('latin1'); if (banner.length >= 2048)
202
+ finish({}); });
203
+ sock.on('timeout', () => finish({})); // bağlandı ama banner yoksa: açık, banner boş
204
+ sock.on('error', () => finish({ status: 0, error: 'closed' })); // bağlanamadı → kapalı/filtreli
205
+ sock.on('close', () => finish({}));
206
+ try {
207
+ sock.connect(req.port || 0, req.host || '');
208
+ }
209
+ catch {
210
+ finish({ status: 0, error: 'connect-fail' });
211
+ }
212
+ });
213
+ }
163
214
  // Tek bir istek-spec'ini yerelde çalıştır. allowed dışı host → atlanır (SSRF koruması).
164
215
  async function execReq(req, allowed, auth) {
216
+ if (req.type === 'tcp')
217
+ return execTcp(req, allowed);
165
218
  const t0 = Date.now();
166
- const h = hostOf(req.url);
219
+ const h = hostOf(req.url || '');
167
220
  if (!allowed.has(h)) {
168
221
  return { id: req.id, ms: 0, error: `izin-dışı host: ${h}` };
169
222
  }
170
223
  try {
171
- const r = await fetch(req.url, {
224
+ const r = await fetch(req.url || '', {
172
225
  method: req.method || 'GET',
173
226
  headers: _mergeAuth(req.headers, auth),
174
227
  body: req.body,
package/dist/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.186';
19
+ export const VERSION = '1.0.188';
package/dist/tools.js CHANGED
@@ -230,7 +230,7 @@ export const toolSchemas = [
230
230
  parameters: {
231
231
  type: 'object',
232
232
  properties: {
233
- tool: { type: 'string', enum: ['full', 'recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor'], description: 'full → tam kapsamlı (recon+dirscan+xss+sqli+idor + tüm şablonlar tek seferde, kapsamlı için BUNU kullan); recon/scan/dirscan → domain; xss/sqli/idor → parameterized URL (idor = yetkisiz nesne erişimi, id-benzeri param gerekir)' },
233
+ tool: { type: 'string', enum: ['full', 'recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor', 'portscan', 'osint'], description: 'full → tam kapsamlı web taraması (recon+dirscan+xss+sqli+idor + tüm şablonlar); recon/scan/dirscan/portscan/osint → domain/host; xss/sqli/idor → parameterized URL. portscan = TCP port/servis taraması. osint = DNS istihbaratı + e-posta güvenliği (SPF/DMARC/DKIM, spoofing/phishing duruşu; "osint"/"dns kayıtları"/"spf dmarc"/"mail spoofing" denince, pasif)' },
234
234
  target: { type: 'string', description: 'Domain for recon/scan/dirscan (example.com) OR parameterized URL for xss/sqli (https://example.com/p?id=1)' },
235
235
  cookie: { type: 'string', description: 'Optional. Session cookie for AUTHENTICATED / behind-login scanning, e.g. "sessionid=abc123; csrftoken=xyz". The user copies it from their logged-in browser (DevTools → Application → Cookies, or the Cookie request header). Sent only to the target from the user IP — never stored on the server. Provide it whenever the user wants to scan pages behind a login.' },
236
236
  auth_header: { type: 'string', description: 'Optional. Authorization header value for token-based authenticated scanning, e.g. "Bearer eyJhbGci..." or "Basic dXNlcjpwYXNz". Use instead of / together with cookie when the site authenticates via a token header.' },
@@ -737,7 +737,7 @@ async function execOne(call, hooks) {
737
737
  if (call.name === 'SecurityScan') {
738
738
  let tool = String(args?.tool || '').toLowerCase().trim();
739
739
  const target = String(args?.target || '').trim();
740
- if (!['recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor', 'full', 'fullscan'].includes(tool) || !target) {
740
+ if (!['recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor', 'portscan', 'osint', 'full', 'fullscan'].includes(tool) || !target) {
741
741
  return { ok: false, output: 'SecurityScan: tool (recon|scan|xss|sqli|dirscan|full) ve target gerekli.', args };
742
742
  }
743
743
  if (tool === 'scan')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.186",
3
+ "version": "1.0.188",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {