wormclaude 1.0.200 → 1.0.202
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/theme.js +1 -1
- package/dist/tools.js +12 -0
- package/dist/tui.js +1 -1
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -770,6 +770,18 @@ async function execOne(call, hooks) {
|
|
|
770
770
|
if (!['recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor', 'portscan', 'osint', 'cloud', 'cloudscan', 'spray', 'credspray', 'defaultcreds', 'full', 'fullscan', 'auto', 'pentest'].includes(tool) || !target) {
|
|
771
771
|
return { ok: false, output: 'SecurityScan: tool (recon|scan|xss|sqli|dirscan|full) ve target gerekli.', args };
|
|
772
772
|
}
|
|
773
|
+
// YEREL HEDEF KORUMASI: SecurityScan canlı URL/domain içindir. Model yerel bir DOSYA/YOL'u
|
|
774
|
+
// (cmd.exe, C:\..., ./klasör, *.exe/.py) yanlışlıkla tarama hedefi sanıp çöp tarama + döngü
|
|
775
|
+
// yapıyordu → reddet, dosya OKUMAK için Read/Glob/Grep'e yönlendir.
|
|
776
|
+
{
|
|
777
|
+
const _hostPart = target.replace(/^https?:\/\//i, '').split(/[/?#]/)[0];
|
|
778
|
+
const _isLocalPath = /^[a-zA-Z]:[\\/]/.test(target) || /^[.~]?[\\/]/.test(target) || /^\.{1,2}$/.test(target);
|
|
779
|
+
const _isExe = /\.(exe|dll|bat|cmd|ps1|msi|app|dmg|bin|sys|so|jar|py|js|ts|tsx|jsx|rb|go|php|java|cpp|cs|html?|css|scss|json|md|txt|ya?ml|sh|sql|vue|svelte|xml|env|lock|toml|ini|cfg)$/i.test(_hostPart);
|
|
780
|
+
const _hasDomain = /[a-z0-9-]+\.[a-z]{2,}/i.test(_hostPart) && !_isExe;
|
|
781
|
+
if (_isLocalPath || _isExe || !_hasDomain) {
|
|
782
|
+
return { ok: false, args, output: `SecurityScan canlı bir URL/domain hedefi içindir (örn. https://site.com). "${target}" yerel bir dosya/yol veya geçersiz hedef görünüyor — dosyaların İÇERİĞİNİ okumak için Read/Glob/Grep araçlarını kullan (SecurityScan DEĞİL). Kod güvenliği için /audit (CodeAudit) kullan.` };
|
|
783
|
+
}
|
|
784
|
+
}
|
|
773
785
|
if (tool === 'scan')
|
|
774
786
|
tool = 'recon'; // "scan" genel tarama → motorun bildiği "recon" (slash ile aynı)
|
|
775
787
|
// AUTHENTICATED / login-arkası: kullanıcı session cookie / auth header verdiyse her isteğe enjekte
|
package/dist/tui.js
CHANGED
|
@@ -117,7 +117,7 @@ export async function runTui() {
|
|
|
117
117
|
// Canlı akış artık FOOTER'da DEĞİL — içerik akışına (mesajın altından aşağı) satır-satır basılır.
|
|
118
118
|
const SPIN = ['·', '✢', '✳', '✶', '✻', '✽', '✶', '✳', '✢'];
|
|
119
119
|
// Canlı bağlam ölçer: son isteğin prompt_tokens'ı = o anki kullanılan bağlam (footer'da gösterilir).
|
|
120
|
-
const CTX_MAX = Number(process.env.WORMCLAUDE_CTX) ||
|
|
120
|
+
const CTX_MAX = Number(process.env.WORMCLAUDE_CTX) || 65536; // sunucu slot-context (parallel 2)
|
|
121
121
|
let ctxUsed = 0;
|
|
122
122
|
const _k = (n) => (n >= 1000 ? (n / 1000).toFixed(1).replace(/\.0$/, '') + 'k' : String(n));
|
|
123
123
|
const ctxGauge = () => `◷ ${_k(ctxUsed)}/${_k(CTX_MAX)} (%${Math.min(100, Math.round((ctxUsed / CTX_MAX) * 100))})`;
|