@pensar/apex 0.0.7 → 0.0.10

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/bin/pensar.js CHANGED
@@ -29,6 +29,19 @@ if (command === "benchmark") {
29
29
 
30
30
  // Import and run benchmark
31
31
  await import(benchmarkPath);
32
+ } else if (command === "swarm") {
33
+ const swarmPath = join(__dirname, "..", "build", "swarm.js");
34
+ process.argv = [process.argv[0], swarmPath, ...args.slice(1)];
35
+ await import(swarmPath);
36
+ } else if (command === "quicktest") {
37
+ // Run quicktest CLI
38
+ const quicktestPath = join(__dirname, "..", "build", "quicktest.js");
39
+
40
+ // Remove "quicktest" from args and pass the rest to quicktest script
41
+ process.argv = [process.argv[0], quicktestPath, ...args.slice(1)];
42
+
43
+ // Import and run quicktest
44
+ await import(quicktestPath);
32
45
  } else if (command === "--help" || command === "-h") {
33
46
  // Show help
34
47
  console.log("Pensar - AI-Powered Penetration Testing CLI");
@@ -36,6 +49,10 @@ if (command === "benchmark") {
36
49
  console.log("Usage:");
37
50
  console.log(" pensar Launch the TUI (Terminal User Interface)");
38
51
  console.log(" pensar benchmark Run the benchmark CLI");
52
+ console.log(" pensar quicktest Run a quick penetration test");
53
+ console.log(
54
+ " pensar swarm Run parallel pentests on multiple targets"
55
+ );
39
56
  console.log();
40
57
  console.log("Options:");
41
58
  console.log(" -h, --help Show this help message");
@@ -51,12 +68,62 @@ if (command === "benchmark") {
51
68
  " --model <model> Specify the AI model to use (default: claude-sonnet-4-5)"
52
69
  );
53
70
  console.log();
71
+ console.log("Quicktest Usage:");
72
+ console.log(
73
+ " pensar quicktest --target <target> --objective <objective> [--model <model>]"
74
+ );
75
+ console.log();
76
+ console.log("Quicktest Options:");
77
+ console.log(
78
+ " --target <target> Target URL or IP address to test (required)"
79
+ );
80
+ console.log(
81
+ " --objective <objective> Objective or goal of the pentest (required)"
82
+ );
83
+ console.log(
84
+ " --model <model> AI model to use (default: claude-sonnet-4-5)"
85
+ );
86
+ console.log();
87
+ console.log("Swarm Usage:");
88
+ console.log(" pensar swarm <targets> [--model <model>]");
89
+ console.log();
90
+ console.log("Swarm Arguments:");
91
+ console.log(" <targets> JSON string or path to JSON file");
92
+ console.log();
93
+ console.log("Swarm Options:");
94
+ console.log(
95
+ " --model <model> AI model to use (default: claude-sonnet-4-5)"
96
+ );
97
+ console.log();
98
+ console.log("Targets format (JSON array):");
99
+ console.log(" [");
100
+ console.log(" {");
101
+ console.log(' "target": "api.example.com",');
102
+ console.log(' "objective": "Test API for injection vulnerabilities"');
103
+ console.log(" },");
104
+ console.log(" {");
105
+ console.log(' "target": "admin.example.com",');
106
+ console.log(' "objective": "Test admin panel for auth bypass"');
107
+ console.log(" }");
108
+ console.log(" ]");
109
+ console.log();
54
110
  console.log("Examples:");
55
111
  console.log(" pensar");
56
112
  console.log(" pensar benchmark /path/to/vulnerable-app");
57
113
  console.log(" pensar benchmark /path/to/app main develop");
58
114
  console.log(" pensar benchmark /path/to/app --all-branches --limit 3");
59
115
  console.log(" pensar benchmark /path/to/app --model gpt-4o");
116
+ console.log(
117
+ " pensar quicktest --target http://localhost:3000 --objective 'Find SQL injection'"
118
+ );
119
+ console.log(
120
+ " pensar quicktest --target 192.168.1.100 --objective 'Test auth bypass' --model gpt-4o"
121
+ );
122
+ console.log(" pensar swarm targets.json");
123
+ console.log(" pensar swarm targets.json --model gpt-4o");
124
+ console.log(
125
+ ' pensar swarm \'[{"target":"api.example.com","objective":"Test API"}]\''
126
+ );
60
127
  } else if (args.length === 0) {
61
128
  // No command specified, run the TUI
62
129
  const appPath = join(__dirname, "..", "build", "index.js");