pentesting 0.8.36 → 0.8.39

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.
Files changed (2) hide show
  1. package/dist/index.js +34 -24
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6645,17 +6645,15 @@ var THEME = {
6645
6645
  success: ["#888888", "#aaaaaa"],
6646
6646
  gold: ["#999999", "#cccccc"]
6647
6647
  },
6648
- // Spinner color (warm pastel yellow)
6649
- spinner: "#F5D76E"
6650
- // Pastel warm yellow
6648
+ // Spinner color (sky blue - matches identity)
6649
+ spinner: "#87CEEB",
6650
+ // Identity color (sky blue)
6651
+ identity: "#87CEEB"
6651
6652
  };
6652
6653
  var ASCII_BANNER = `
6653
- \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557
6654
- \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
6655
- \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557
6656
- \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
6657
- \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
6658
- \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D
6654
+ pentesting
6655
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
6656
+ AI-Powered Security Testing
6659
6657
  `;
6660
6658
  var THOUGHT_LABELS = {
6661
6659
  [THOUGHT_TYPE.THINKING]: "[think]",
@@ -7124,6 +7122,7 @@ var App = ({ autoApprove = false, target }) => {
7124
7122
  const wireLoggerRef = useRef(null);
7125
7123
  const keyboardListenerRef = useRef(getKeyboardListener());
7126
7124
  const isProcessingRef = useRef(false);
7125
+ const handleSubmitRef = useRef(null);
7127
7126
  useEffect(() => {
7128
7127
  isProcessingRef.current = isProcessing;
7129
7128
  }, [isProcessing]);
@@ -7362,15 +7361,10 @@ var App = ({ autoApprove = false, target }) => {
7362
7361
  const next = inputQueue.dequeue();
7363
7362
  if (next) {
7364
7363
  setQueuedCount(inputQueue.length);
7365
- addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}...`);
7366
- addMessage(MESSAGE_TYPE.USER, next.content);
7367
- setIsProcessing(true);
7368
- setTimeout(async () => {
7369
- try {
7370
- await agent.chat(next.content);
7371
- } catch (err) {
7372
- addMessage(MESSAGE_TYPE.ERROR, err instanceof Error ? err.message : String(err));
7373
- setIsProcessing(false);
7364
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}${next.content.length > 50 ? "..." : ""}`);
7365
+ setTimeout(() => {
7366
+ if (handleSubmitRef.current) {
7367
+ handleSubmitRef.current(next.content);
7374
7368
  }
7375
7369
  }, 100);
7376
7370
  }
@@ -7380,6 +7374,19 @@ var App = ({ autoApprove = false, target }) => {
7380
7374
  stopTimer();
7381
7375
  addMessage(MESSAGE_TYPE.ERROR, error.message);
7382
7376
  setIsProcessing(false);
7377
+ const inputQueue = getInputQueue();
7378
+ if (inputQueue.hasPending()) {
7379
+ const next = inputQueue.dequeue();
7380
+ if (next) {
7381
+ setQueuedCount(inputQueue.length);
7382
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}${next.content.length > 50 ? "..." : ""}`);
7383
+ setTimeout(() => {
7384
+ if (handleSubmitRef.current) {
7385
+ handleSubmitRef.current(next.content);
7386
+ }
7387
+ }, 100);
7388
+ }
7389
+ }
7383
7390
  });
7384
7391
  approvalManager2.on(APPROVAL_EVENT.REQUEST, (req) => {
7385
7392
  setPendingApproval({
@@ -7430,12 +7437,12 @@ var App = ({ autoApprove = false, target }) => {
7430
7437
  exit();
7431
7438
  return;
7432
7439
  }
7433
- if (isProcessing && !trimmed.startsWith("/")) {
7440
+ if (isProcessing) {
7434
7441
  const inputQueue = getInputQueue();
7435
7442
  inputQueue.enqueue(trimmed);
7436
7443
  setQueuedCount(inputQueue.length);
7437
7444
  setInput("");
7438
- addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E5} Queued (${inputQueue.length} pending): ${trimmed.slice(0, 50)}...`);
7445
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E5} Queued (${inputQueue.length} pending): ${trimmed.slice(0, 50)}${trimmed.length > 50 ? "..." : ""}`);
7439
7446
  return;
7440
7447
  }
7441
7448
  setInput("");
@@ -7975,6 +7982,9 @@ ${list}`);
7975
7982
  setIsProcessing(false);
7976
7983
  setCurrentStatus("");
7977
7984
  }, [agent, isProcessing, pendingApproval, addMessage, exit, startTimer, stopTimer, sessionManager2, approvalManager2, mode]);
7985
+ useEffect(() => {
7986
+ handleSubmitRef.current = handleSubmit;
7987
+ }, [handleSubmit]);
7978
7988
  const approvalOptions = [
7979
7989
  { label: "\u2713 Approve once", decision: "approve" },
7980
7990
  { label: "\u2713 Approve always (this session)", decision: "approve_always" },
@@ -8141,7 +8151,7 @@ program.command("interactive", { isDefault: true }).alias("i").description("Star
8141
8151
  const opts = program.opts();
8142
8152
  const skipPermissions = opts.dangerouslySkipPermissions || false;
8143
8153
  console.clear();
8144
- console.log(chalk.hex(THEME.text.muted)(ASCII_BANNER));
8154
+ console.log(chalk.hex(THEME.identity)(ASCII_BANNER));
8145
8155
  if (skipPermissions) {
8146
8156
  console.log(chalk.hex(THEME.status.error)("[!] WARNING: Running with --dangerously-skip-permissions"));
8147
8157
  console.log(chalk.hex(THEME.status.error)("[!] All tool executions will be auto-approved!\n"));
@@ -8162,7 +8172,7 @@ program.command("interactive", { isDefault: true }).alias("i").description("Star
8162
8172
  program.command("run <objective>").alias("r").description("Run a single objective and exit").option("-o, --output <file>", "Output file for results").option("--max-steps <n>", "Maximum number of steps", "50").action(async (objective, options) => {
8163
8173
  const opts = program.opts();
8164
8174
  const skipPermissions = opts.dangerouslySkipPermissions || false;
8165
- console.log(chalk.hex(THEME.text.muted)(ASCII_BANNER));
8175
+ console.log(chalk.hex(THEME.identity)(ASCII_BANNER));
8166
8176
  if (skipPermissions) {
8167
8177
  console.log(chalk.hex(THEME.status.error)("[!] WARNING: Running with --dangerously-skip-permissions\n"));
8168
8178
  }
@@ -8205,7 +8215,7 @@ program.command("run <objective>").alias("r").description("Run a single objectiv
8205
8215
  program.command("scan <target>").description("Quick scan a target").option("-s, --scan-type <type>", "Scan type (quick|full|stealth|service|vuln)", "quick").option("-p, --ports <ports>", "Specific ports to scan").action(async (target, options) => {
8206
8216
  const opts = program.opts();
8207
8217
  const skipPermissions = opts.dangerouslySkipPermissions || false;
8208
- console.log(chalk.hex(THEME.text.muted)(ASCII_BANNER));
8218
+ console.log(chalk.hex(THEME.identity)(ASCII_BANNER));
8209
8219
  console.log(chalk.hex(THEME.text.accent)(`
8210
8220
  [scan] Target: ${target} (${options.scanType})
8211
8221
  `));
@@ -8218,7 +8228,7 @@ program.command("scan <target>").description("Quick scan a target").option("-s,
8218
8228
  console.log(chalk.hex(THEME.status.success)("[+] Scan complete!"));
8219
8229
  });
8220
8230
  program.command("help-extended").description("Show extended help with examples").action(() => {
8221
- console.log(chalk.hex(THEME.text.muted)(ASCII_BANNER));
8231
+ console.log(chalk.hex(THEME.identity)(ASCII_BANNER));
8222
8232
  console.log(`
8223
8233
  ${chalk.hex(THEME.text.accent)("Pentest - Autonomous Penetration Testing AI")}
8224
8234
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.8.36",
3
+ "version": "0.8.39",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",