pentesting 0.7.4 → 0.7.5
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-NF5LOTTR.js → auto-update-2TA2XEPG.js} +2 -2
- package/dist/{chunk-FWXRDTSB.js → chunk-3KWVDLNY.js} +1 -0
- package/dist/{chunk-NHTHJVRJ.js → chunk-RS2X7YKI.js} +1 -1
- package/dist/index.js +67 -3
- package/dist/{update-WBBD5QMK.js → update-S2YI6GZU.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-RS2X7YKI.js";
|
|
12
|
+
import "./chunk-3KWVDLNY.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-3KWVDLNY.js";
|
|
19
19
|
import {
|
|
20
20
|
__require
|
|
21
21
|
} from "./chunk-3RG5ZIWI.js";
|
|
@@ -281,6 +281,27 @@ IMPORTANT:
|
|
|
281
281
|
},
|
|
282
282
|
required: ["path"]
|
|
283
283
|
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: TOOL_NAME.SET_TARGET,
|
|
287
|
+
description: `Set the primary target for penetration testing.
|
|
288
|
+
|
|
289
|
+
CRITICAL: Use this IMMEDIATELY when user mentions any domain or IP.
|
|
290
|
+
This sets the target in the UI status bar.
|
|
291
|
+
|
|
292
|
+
WHEN TO USE:
|
|
293
|
+
- User says "attack example.com" \u2192 set_target(target: "example.com")
|
|
294
|
+
- User says "scan 192.168.1.1" \u2192 set_target(target: "192.168.1.1")
|
|
295
|
+
- User mentions any domain/IP \u2192 set_target first, then start scanning
|
|
296
|
+
|
|
297
|
+
After setting target, immediately begin reconnaissance.`,
|
|
298
|
+
input_schema: {
|
|
299
|
+
type: "object",
|
|
300
|
+
properties: {
|
|
301
|
+
target: { type: "string", description: "Domain, IP, or URL to set as primary target" }
|
|
302
|
+
},
|
|
303
|
+
required: ["target"]
|
|
304
|
+
}
|
|
284
305
|
}
|
|
285
306
|
];
|
|
286
307
|
var NETWORK_TOOLS = [
|
|
@@ -1435,6 +1456,9 @@ async function executeToolCall(toolName, input) {
|
|
|
1435
1456
|
input.hidden
|
|
1436
1457
|
);
|
|
1437
1458
|
break;
|
|
1459
|
+
case TOOL_NAME.SET_TARGET:
|
|
1460
|
+
result = await setTarget(input.target);
|
|
1461
|
+
break;
|
|
1438
1462
|
// network scanning
|
|
1439
1463
|
case TOOL_NAME.RUSTSCAN:
|
|
1440
1464
|
result = await executeRustscan(input);
|
|
@@ -1644,6 +1668,37 @@ ${stderr}` : ""),
|
|
|
1644
1668
|
};
|
|
1645
1669
|
}
|
|
1646
1670
|
}
|
|
1671
|
+
var _currentTarget = null;
|
|
1672
|
+
var _targetListeners = [];
|
|
1673
|
+
function onTargetChange(listener) {
|
|
1674
|
+
_targetListeners.push(listener);
|
|
1675
|
+
}
|
|
1676
|
+
async function setTarget(target) {
|
|
1677
|
+
try {
|
|
1678
|
+
_currentTarget = target;
|
|
1679
|
+
_targetListeners.forEach((listener) => {
|
|
1680
|
+
try {
|
|
1681
|
+
listener(target);
|
|
1682
|
+
} catch (e) {
|
|
1683
|
+
console.error("Target listener error:", e);
|
|
1684
|
+
}
|
|
1685
|
+
});
|
|
1686
|
+
return {
|
|
1687
|
+
success: true,
|
|
1688
|
+
output: `\u{1F3AF} Target set: ${target}
|
|
1689
|
+
|
|
1690
|
+
Now beginning reconnaissance...`,
|
|
1691
|
+
duration: 0
|
|
1692
|
+
};
|
|
1693
|
+
} catch (error) {
|
|
1694
|
+
return {
|
|
1695
|
+
success: false,
|
|
1696
|
+
output: "",
|
|
1697
|
+
error: error.message || String(error),
|
|
1698
|
+
duration: 0
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1647
1702
|
async function readFile2(filePath, startLine, endLine) {
|
|
1648
1703
|
try {
|
|
1649
1704
|
const content = await fs.readFile(filePath, "utf-8");
|
|
@@ -6423,6 +6478,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
6423
6478
|
const [checkpointCount, setCheckpointCount] = useState(0);
|
|
6424
6479
|
const [preInputBuffer, setPreInputBuffer] = useState("");
|
|
6425
6480
|
const [wasInterrupted, setWasInterrupted] = useState(false);
|
|
6481
|
+
const [, forceUpdate] = useState(0);
|
|
6426
6482
|
const [agent] = useState(() => new AutonomousHackingAgent(void 0, { autoApprove }));
|
|
6427
6483
|
const sessionManager2 = getSessionManager();
|
|
6428
6484
|
const approvalManager2 = getApprovalManager({ yoloMode: autoApprove });
|
|
@@ -6443,7 +6499,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
6443
6499
|
setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
|
|
6444
6500
|
}
|
|
6445
6501
|
});
|
|
6446
|
-
import("./auto-update-
|
|
6502
|
+
import("./auto-update-2TA2XEPG.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
|
|
6447
6503
|
checkForUpdateAsync().then((result) => {
|
|
6448
6504
|
if (result.hasUpdate) {
|
|
6449
6505
|
const notification = formatUpdateNotification(result);
|
|
@@ -6550,6 +6606,14 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
6550
6606
|
agent.setTarget(target);
|
|
6551
6607
|
addMessage(MESSAGE_TYPE.SYSTEM, `\u{1F3AF} Target: ${target}`);
|
|
6552
6608
|
}
|
|
6609
|
+
onTargetChange((newTarget) => {
|
|
6610
|
+
agent.setTarget(newTarget);
|
|
6611
|
+
addMessage(MESSAGE_TYPE.SYSTEM, `\u{1F3AF} Target \u2192 ${newTarget}`);
|
|
6612
|
+
forceUpdate((n) => n + 1);
|
|
6613
|
+
});
|
|
6614
|
+
agent.on(AGENT_EVENT.TARGET_SET, () => {
|
|
6615
|
+
forceUpdate((n) => n + 1);
|
|
6616
|
+
});
|
|
6553
6617
|
agent.on(AGENT_EVENT.THOUGHT, (thought) => {
|
|
6554
6618
|
setCurrentStatus(thought.content.slice(0, 60));
|
|
6555
6619
|
wireLoggerRef.current?.contentPart(thought.content, thought.type === "thinking");
|
|
@@ -7037,7 +7101,7 @@ ${list}`);
|
|
|
7037
7101
|
return;
|
|
7038
7102
|
case "update":
|
|
7039
7103
|
try {
|
|
7040
|
-
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-
|
|
7104
|
+
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-S2YI6GZU.js");
|
|
7041
7105
|
const result = checkForUpdate(true);
|
|
7042
7106
|
if (result.hasUpdate) {
|
|
7043
7107
|
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-RS2X7YKI.js";
|
|
12
|
+
import "./chunk-3KWVDLNY.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
export {
|
|
15
15
|
checkForUpdate,
|