pentesting 0.5.5 → 0.5.6
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/{auto-update-IDSABTT4.js → auto-update-CVZG3YKL.js} +2 -2
- package/dist/{chunk-FHPP7RP2.js → chunk-CKXQT3ON.js} +1 -0
- package/dist/{chunk-ZC53SMRU.js → chunk-TK3QEEDA.js} +1 -1
- package/dist/index.js +70 -7
- package/dist/{update-OWR4FHRQ.js → update-B6HRINH6.js} +2 -2
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
readVersionCache,
|
|
9
9
|
semverTuple,
|
|
10
10
|
writeVersionCache
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-TK3QEEDA.js";
|
|
12
|
+
import "./chunk-CKXQT3ON.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
export {
|
|
15
15
|
checkForUpdate,
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
PHASE_STATUS,
|
|
16
16
|
THOUGHT_TYPE,
|
|
17
17
|
TOOL_NAME
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CKXQT3ON.js";
|
|
19
19
|
import {
|
|
20
20
|
__require
|
|
21
21
|
} from "./chunk-3RG5ZIWI.js";
|
|
@@ -284,16 +284,46 @@ IMPORTANT:
|
|
|
284
284
|
}
|
|
285
285
|
];
|
|
286
286
|
var NETWORK_TOOLS = [
|
|
287
|
+
{
|
|
288
|
+
name: TOOL_NAME.RUSTSCAN,
|
|
289
|
+
description: `Ultra-fast port scanner written in Rust. Use as FIRST scan for quick discovery.
|
|
290
|
+
|
|
291
|
+
Rustscan is 10x faster than nmap for port discovery. Strategy:
|
|
292
|
+
1. Run rustscan first to find open ports quickly
|
|
293
|
+
2. Then use nmap with -sV on discovered ports for service detection
|
|
294
|
+
|
|
295
|
+
BATCH SIZES:
|
|
296
|
+
- 5000: Safe for most networks
|
|
297
|
+
- 10000: Fast, may miss some ports
|
|
298
|
+
- 65535: Full scan, slower but comprehensive`,
|
|
299
|
+
input_schema: {
|
|
300
|
+
type: "object",
|
|
301
|
+
properties: {
|
|
302
|
+
target: { type: "string", description: "Target IP/hostname/CIDR" },
|
|
303
|
+
ports: { type: "string", description: 'Port range (e.g., "1-65535" or "22,80,443")' },
|
|
304
|
+
batch_size: { type: "number", description: "Batch size (default: 5000)" },
|
|
305
|
+
timeout: { type: "number", description: "Timeout in ms (default: 1500)" },
|
|
306
|
+
ulimit: { type: "number", description: "File descriptor limit (default: 5000)" },
|
|
307
|
+
greppable: { type: "boolean", description: "Output in greppable format" },
|
|
308
|
+
nmap_args: { type: "string", description: 'Additional args to pass to nmap (e.g., "-sV -sC")' }
|
|
309
|
+
},
|
|
310
|
+
required: ["target"]
|
|
311
|
+
}
|
|
312
|
+
},
|
|
287
313
|
{
|
|
288
314
|
name: TOOL_NAME.NMAP_SCAN,
|
|
289
|
-
description: `Network scanning with nmap.
|
|
315
|
+
description: `Network scanning with nmap. Use AFTER rustscan for detailed service detection.
|
|
290
316
|
|
|
317
|
+
RECOMMENDED WORKFLOW:
|
|
318
|
+
1. rustscan first \u2192 fast port discovery
|
|
319
|
+
2. nmap -sV -sC on discovered ports \u2192 service/version detection
|
|
320
|
+
|
|
291
321
|
SCAN TYPES:
|
|
292
322
|
- discovery: Host discovery only (-sn)
|
|
293
|
-
- quick: Fast port scan (-F -T4)
|
|
294
|
-
- full: All 65535 ports (-p-)
|
|
323
|
+
- quick: Fast port scan (-F -T4)
|
|
324
|
+
- full: All 65535 ports (-p-) - USE RUSTSCAN INSTEAD
|
|
295
325
|
- stealth: SYN scan with slow timing (-sS -T2)
|
|
296
|
-
- service: Version detection (-sV -sC)
|
|
326
|
+
- service: Version detection (-sV -sC) - USE ON OPEN PORTS
|
|
297
327
|
- vuln: Vulnerability scripts (--script vuln)
|
|
298
328
|
- udp: UDP scan (-sU --top-ports 100)
|
|
299
329
|
- aggressive: Full aggressive scan (-A)`,
|
|
@@ -688,6 +718,7 @@ var execAsync = promisify(exec);
|
|
|
688
718
|
var DOCKER_CONTAINER = process.env.PENTESTING_CONTAINER || "pentesting-tools";
|
|
689
719
|
var FORCE_DOCKER = process.env.PENTESTING_DOCKER === "1";
|
|
690
720
|
var DOCKER_TOOLS = [
|
|
721
|
+
"rustscan",
|
|
691
722
|
"nmap",
|
|
692
723
|
"masscan",
|
|
693
724
|
"gobuster",
|
|
@@ -788,6 +819,9 @@ async function executeToolCall(toolName, input) {
|
|
|
788
819
|
);
|
|
789
820
|
break;
|
|
790
821
|
// network scanning
|
|
822
|
+
case "rustscan":
|
|
823
|
+
result = await executeRustscan(input);
|
|
824
|
+
break;
|
|
791
825
|
case "nmap_scan":
|
|
792
826
|
result = await executeNmapScan(input);
|
|
793
827
|
break;
|
|
@@ -958,6 +992,35 @@ async function listDirectory(dirPath, recursive = false, hidden = false) {
|
|
|
958
992
|
return { success: false, output: "", error: error.message, duration: 0 };
|
|
959
993
|
}
|
|
960
994
|
}
|
|
995
|
+
async function executeRustscan(input) {
|
|
996
|
+
const { target, ports, batch_size, timeout, ulimit, greppable, nmap_args } = input;
|
|
997
|
+
let cmd = `rustscan -a ${target}`;
|
|
998
|
+
if (ports) {
|
|
999
|
+
cmd += ` -p ${ports}`;
|
|
1000
|
+
} else {
|
|
1001
|
+
cmd += ` -r 1-65535`;
|
|
1002
|
+
}
|
|
1003
|
+
if (batch_size) {
|
|
1004
|
+
cmd += ` -b ${batch_size}`;
|
|
1005
|
+
} else {
|
|
1006
|
+
cmd += ` -b 5000`;
|
|
1007
|
+
}
|
|
1008
|
+
if (timeout) {
|
|
1009
|
+
cmd += ` -t ${timeout}`;
|
|
1010
|
+
} else {
|
|
1011
|
+
cmd += ` -t 1500`;
|
|
1012
|
+
}
|
|
1013
|
+
if (ulimit) {
|
|
1014
|
+
cmd += ` -u ${ulimit}`;
|
|
1015
|
+
}
|
|
1016
|
+
if (greppable) {
|
|
1017
|
+
cmd += ` -g`;
|
|
1018
|
+
}
|
|
1019
|
+
if (nmap_args) {
|
|
1020
|
+
cmd += ` -- ${nmap_args}`;
|
|
1021
|
+
}
|
|
1022
|
+
return executeBash(cmd, { timeout: 3e5 });
|
|
1023
|
+
}
|
|
961
1024
|
async function executeNmapScan(input) {
|
|
962
1025
|
const { target, scan_type, ports, scripts, output_file } = input;
|
|
963
1026
|
const scanFlags = {
|
|
@@ -5284,7 +5347,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
5284
5347
|
setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
|
|
5285
5348
|
}
|
|
5286
5349
|
});
|
|
5287
|
-
import("./auto-update-
|
|
5350
|
+
import("./auto-update-CVZG3YKL.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
|
|
5288
5351
|
checkForUpdateAsync().then((result) => {
|
|
5289
5352
|
if (result.hasUpdate) {
|
|
5290
5353
|
const notification = formatUpdateNotification(result);
|
|
@@ -5878,7 +5941,7 @@ ${list}`);
|
|
|
5878
5941
|
return;
|
|
5879
5942
|
case "update":
|
|
5880
5943
|
try {
|
|
5881
|
-
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-
|
|
5944
|
+
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-B6HRINH6.js");
|
|
5882
5945
|
const result = checkForUpdate(true);
|
|
5883
5946
|
if (result.hasUpdate) {
|
|
5884
5947
|
const notification = formatUpdateNotification(result);
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
readVersionCache,
|
|
9
9
|
semverTuple,
|
|
10
10
|
writeVersionCache
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-TK3QEEDA.js";
|
|
12
|
+
import "./chunk-CKXQT3ON.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
export {
|
|
15
15
|
checkForUpdate,
|