pentesting 0.1.2 → 0.1.3
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/index.js +31 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1306,7 +1306,6 @@ async function loadAllAgents(agentsDir) {
|
|
|
1306
1306
|
try {
|
|
1307
1307
|
await fs2.access(dir);
|
|
1308
1308
|
} catch {
|
|
1309
|
-
console.warn(`Agents directory not found: ${dir}`);
|
|
1310
1309
|
return [];
|
|
1311
1310
|
}
|
|
1312
1311
|
const files = await fs2.readdir(dir);
|
|
@@ -1316,8 +1315,7 @@ async function loadAllAgents(agentsDir) {
|
|
|
1316
1315
|
try {
|
|
1317
1316
|
const agent = await loadAgent(path2.join(dir, file));
|
|
1318
1317
|
agents.push(agent);
|
|
1319
|
-
} catch
|
|
1320
|
-
console.warn(`Failed to load agent ${file}:`, error);
|
|
1318
|
+
} catch {
|
|
1321
1319
|
}
|
|
1322
1320
|
}
|
|
1323
1321
|
}
|
|
@@ -1357,8 +1355,7 @@ var HookExecutor = class extends EventEmitter {
|
|
|
1357
1355
|
this.hooksConfig = JSON.parse(configContent);
|
|
1358
1356
|
this.initialized = true;
|
|
1359
1357
|
this.emit("initialized", { hooks: Object.keys(this.hooksConfig?.hooks || {}) });
|
|
1360
|
-
} catch
|
|
1361
|
-
console.warn("Hook system not initialized:", error);
|
|
1358
|
+
} catch {
|
|
1362
1359
|
this.hooksConfig = { hooks: {} };
|
|
1363
1360
|
this.initialized = true;
|
|
1364
1361
|
}
|
|
@@ -1541,8 +1538,7 @@ var CommandRegistry = class {
|
|
|
1541
1538
|
}
|
|
1542
1539
|
}
|
|
1543
1540
|
this.initialized = true;
|
|
1544
|
-
} catch
|
|
1545
|
-
console.warn("Command registry not initialized:", error);
|
|
1541
|
+
} catch {
|
|
1546
1542
|
this.initialized = true;
|
|
1547
1543
|
}
|
|
1548
1544
|
}
|
|
@@ -1931,8 +1927,7 @@ var AutonomousHackingAgent = class extends EventEmitter3 {
|
|
|
1931
1927
|
this.emit("hooks_loaded");
|
|
1932
1928
|
await this.commandRegistry.initialize();
|
|
1933
1929
|
this.emit("commands_loaded");
|
|
1934
|
-
} catch
|
|
1935
|
-
console.warn("Plugin systems not fully loaded:", error);
|
|
1930
|
+
} catch {
|
|
1936
1931
|
}
|
|
1937
1932
|
}
|
|
1938
1933
|
// Add MCP server at runtime
|
|
@@ -2852,13 +2847,13 @@ var App = ({
|
|
|
2852
2847
|
}, [agent, appState, addLog, maxIterations]);
|
|
2853
2848
|
const getThoughtStyle = (type) => {
|
|
2854
2849
|
const styles = {
|
|
2855
|
-
observation: { prefix: "[observe]", color: THEME.
|
|
2856
|
-
hypothesis: { prefix: "[hypothesis]", color: THEME.
|
|
2857
|
-
plan: { prefix: "[plan]", color: THEME.
|
|
2858
|
-
action: { prefix: "[action]", color: THEME.
|
|
2850
|
+
observation: { prefix: "[observe]", color: THEME.text.accent },
|
|
2851
|
+
hypothesis: { prefix: "[hypothesis]", color: THEME.status.warning },
|
|
2852
|
+
plan: { prefix: "[plan]", color: THEME.status.running },
|
|
2853
|
+
action: { prefix: "[action]", color: THEME.status.success },
|
|
2859
2854
|
result: { prefix: "[result]", color: THEME.text.primary },
|
|
2860
|
-
reflection: { prefix: "[reflect]", color: THEME.
|
|
2861
|
-
stuck: { prefix: "[stuck]", color: THEME.
|
|
2855
|
+
reflection: { prefix: "[reflect]", color: THEME.semantic.high },
|
|
2856
|
+
stuck: { prefix: "[stuck]", color: THEME.status.error },
|
|
2862
2857
|
breakthrough: { prefix: "[breakthrough]", color: "#00ff00" }
|
|
2863
2858
|
};
|
|
2864
2859
|
return styles[type] || { prefix: "[info]", color: THEME.text.muted };
|
|
@@ -2879,20 +2874,20 @@ var App = ({
|
|
|
2879
2874
|
};
|
|
2880
2875
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", padding: 1, children: [
|
|
2881
2876
|
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
2882
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2877
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.success, children: ASCII_BANNER }),
|
|
2883
2878
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, justifyContent: "space-between", children: [
|
|
2884
|
-
/* @__PURE__ */ jsxs(Text, { color: THEME.
|
|
2879
|
+
/* @__PURE__ */ jsxs(Text, { color: THEME.status.error, children: [
|
|
2885
2880
|
ICONS.target,
|
|
2886
2881
|
" Target: ",
|
|
2887
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2882
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.text.accent, bold: true, children: appState.target || "Not set" })
|
|
2888
2883
|
] }),
|
|
2889
2884
|
/* @__PURE__ */ jsxs(Text, { color: THEME.text.muted, children: [
|
|
2890
2885
|
"Status: ",
|
|
2891
|
-
/* @__PURE__ */ jsx(Text, { color: appState.status === "running" ? THEME.
|
|
2886
|
+
/* @__PURE__ */ jsx(Text, { color: appState.status === "running" ? THEME.status.success : THEME.status.warning, children: appState.status.toUpperCase() })
|
|
2892
2887
|
] }),
|
|
2893
2888
|
/* @__PURE__ */ jsxs(Text, { color: THEME.text.muted, children: [
|
|
2894
2889
|
"Iteration: ",
|
|
2895
|
-
/* @__PURE__ */ jsxs(Text, { color: THEME.
|
|
2890
|
+
/* @__PURE__ */ jsxs(Text, { color: THEME.text.accent, children: [
|
|
2896
2891
|
appState.iteration,
|
|
2897
2892
|
"/",
|
|
2898
2893
|
appState.maxIterations
|
|
@@ -2900,25 +2895,25 @@ var App = ({
|
|
|
2900
2895
|
] })
|
|
2901
2896
|
] })
|
|
2902
2897
|
] }),
|
|
2903
|
-
/* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.
|
|
2898
|
+
/* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.status.running, paddingX: 1, children: [
|
|
2904
2899
|
/* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Services: " }),
|
|
2905
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2900
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.success, children: appState.services }),
|
|
2906
2901
|
/* @__PURE__ */ jsx(Text, { children: " | " }),
|
|
2907
2902
|
/* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Creds: " }),
|
|
2908
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2903
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.warning, children: appState.credentials }),
|
|
2909
2904
|
/* @__PURE__ */ jsx(Text, { children: " | " }),
|
|
2910
2905
|
/* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Pwned: " }),
|
|
2911
2906
|
/* @__PURE__ */ jsx(Text, { color: appState.compromised.length > 0 ? THEME.status.success : THEME.text.muted, children: appState.compromised.length > 0 ? appState.compromised.join(", ") : "0" }),
|
|
2912
2907
|
/* @__PURE__ */ jsx(Text, { children: " | " }),
|
|
2913
2908
|
/* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Findings: " }),
|
|
2914
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2909
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.semantic.high, children: appState.findings })
|
|
2915
2910
|
] }),
|
|
2916
|
-
/* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.
|
|
2917
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2911
|
+
/* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.text.accent, paddingX: 1, marginTop: 1, children: [
|
|
2912
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.text.accent, bold: true, children: "[phases] " }),
|
|
2918
2913
|
phases.map((phase) => /* @__PURE__ */ jsx(Box, { marginRight: 1, children: /* @__PURE__ */ jsxs(
|
|
2919
2914
|
Text,
|
|
2920
2915
|
{
|
|
2921
|
-
color: phase.id === appState.currentPhase ? THEME.
|
|
2916
|
+
color: phase.id === appState.currentPhase ? THEME.status.warning : phase.status === "completed" ? THEME.status.success : THEME.text.muted,
|
|
2922
2917
|
bold: phase.id === appState.currentPhase,
|
|
2923
2918
|
children: [
|
|
2924
2919
|
getPhaseIcon(phase.status),
|
|
@@ -2937,16 +2932,16 @@ var App = ({
|
|
|
2937
2932
|
{
|
|
2938
2933
|
flexDirection: "column",
|
|
2939
2934
|
borderStyle: "single",
|
|
2940
|
-
borderColor: THEME.
|
|
2935
|
+
borderColor: THEME.status.running,
|
|
2941
2936
|
paddingX: 1,
|
|
2942
2937
|
height: 10,
|
|
2943
2938
|
marginTop: 1,
|
|
2944
2939
|
children: [
|
|
2945
2940
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
2946
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2941
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.running, bold: true, children: "[agent thoughts]" }),
|
|
2947
2942
|
isThinking && /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
|
|
2948
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2949
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2943
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.warning, children: /* @__PURE__ */ jsx(Spinner, { type: "dots" }) }),
|
|
2944
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.warning, children: " Thinking..." })
|
|
2950
2945
|
] })
|
|
2951
2946
|
] }),
|
|
2952
2947
|
/* @__PURE__ */ jsx(Static, { items: thoughts.slice(-6), children: (thought) => {
|
|
@@ -2974,19 +2969,19 @@ var App = ({
|
|
|
2974
2969
|
{
|
|
2975
2970
|
flexDirection: "column",
|
|
2976
2971
|
borderStyle: "single",
|
|
2977
|
-
borderColor: THEME.
|
|
2972
|
+
borderColor: THEME.status.success,
|
|
2978
2973
|
paddingX: 1,
|
|
2979
2974
|
height: 12,
|
|
2980
2975
|
marginTop: 1,
|
|
2981
2976
|
children: [
|
|
2982
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2977
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.success, bold: true, children: "[activity log]" }),
|
|
2983
2978
|
/* @__PURE__ */ jsx(Static, { items: logs.slice(-10), children: (log) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
2984
2979
|
/* @__PURE__ */ jsxs(Text, { color: THEME.text.muted, dimColor: true, children: [
|
|
2985
2980
|
"[",
|
|
2986
2981
|
log.timestamp.toLocaleTimeString(),
|
|
2987
2982
|
"]"
|
|
2988
2983
|
] }),
|
|
2989
|
-
/* @__PURE__ */ jsxs(Text, { color: log.type === "success" ? THEME.status.success : log.type === "error" ? THEME.status.error : log.type === "warning" ? THEME.status.warning : log.type === "finding" ? THEME.
|
|
2984
|
+
/* @__PURE__ */ jsxs(Text, { color: log.type === "success" ? THEME.status.success : log.type === "error" ? THEME.status.error : log.type === "warning" ? THEME.status.warning : log.type === "finding" ? THEME.semantic.high : log.type === "tool" ? THEME.text.accent : THEME.text.primary, children: [
|
|
2990
2985
|
" ",
|
|
2991
2986
|
log.message
|
|
2992
2987
|
] })
|
|
@@ -2995,13 +2990,13 @@ var App = ({
|
|
|
2995
2990
|
}
|
|
2996
2991
|
),
|
|
2997
2992
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
|
|
2998
|
-
/* @__PURE__ */ jsxs(Text, { color: THEME.
|
|
2993
|
+
/* @__PURE__ */ jsxs(Text, { color: THEME.status.success, bold: true, children: [
|
|
2999
2994
|
"pentesting ",
|
|
3000
2995
|
">",
|
|
3001
2996
|
" "
|
|
3002
2997
|
] }),
|
|
3003
2998
|
/* @__PURE__ */ jsx(Text, { color: THEME.text.primary, children: input }),
|
|
3004
|
-
/* @__PURE__ */ jsx(Text, { color: THEME.
|
|
2999
|
+
/* @__PURE__ */ jsx(Text, { color: THEME.status.success, children: "_" })
|
|
3005
3000
|
] }),
|
|
3006
3001
|
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: THEME.text.muted, dimColor: true, children: "[T] Toggle thoughts | [P] Pause | [R] Resume | Type command or hint" }) })
|
|
3007
3002
|
] });
|