cantarella-framework 1.15.0 → 1.17.0

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 (44) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/modules/reporting-html-report/index.mjs +56 -0
  3. package/modules/reporting-html-report/module.json +14 -0
  4. package/modules/reporting-sarif-export/index.mjs +53 -0
  5. package/modules/reporting-sarif-export/module.json +14 -0
  6. package/modules/wrapper-ansible-lint/index.mjs +48 -0
  7. package/modules/wrapper-ansible-lint/module.json +21 -0
  8. package/modules/wrapper-arjun/index.mjs +46 -0
  9. package/modules/wrapper-arjun/module.json +21 -0
  10. package/modules/wrapper-dnsx/index.mjs +44 -0
  11. package/modules/wrapper-dnsx/module.json +21 -0
  12. package/modules/wrapper-enum4linux/index.mjs +43 -0
  13. package/modules/wrapper-enum4linux/module.json +21 -0
  14. package/modules/wrapper-fping/index.mjs +39 -0
  15. package/modules/wrapper-fping/module.json +21 -0
  16. package/modules/wrapper-gowitness/index.mjs +40 -0
  17. package/modules/wrapper-gowitness/module.json +21 -0
  18. package/modules/wrapper-hcxdumptool/index.mjs +40 -0
  19. package/modules/wrapper-hcxdumptool/module.json +28 -0
  20. package/modules/wrapper-holehe/index.mjs +40 -0
  21. package/modules/wrapper-holehe/module.json +21 -0
  22. package/modules/wrapper-hping3/index.mjs +37 -0
  23. package/modules/wrapper-hping3/module.json +28 -0
  24. package/modules/wrapper-katana/index.mjs +40 -0
  25. package/modules/wrapper-katana/module.json +21 -0
  26. package/modules/wrapper-linpeas/index.mjs +39 -0
  27. package/modules/wrapper-linpeas/module.json +21 -0
  28. package/modules/wrapper-maigret/index.mjs +49 -0
  29. package/modules/wrapper-maigret/module.json +21 -0
  30. package/modules/wrapper-paramspider/index.mjs +41 -0
  31. package/modules/wrapper-paramspider/module.json +21 -0
  32. package/modules/wrapper-rustscan/index.mjs +41 -0
  33. package/modules/wrapper-rustscan/module.json +21 -0
  34. package/modules/wrapper-searchsploit/index.mjs +44 -0
  35. package/modules/wrapper-searchsploit/module.json +21 -0
  36. package/modules/wrapper-smbclient/index.mjs +41 -0
  37. package/modules/wrapper-smbclient/module.json +21 -0
  38. package/modules/wrapper-vagrant/index.mjs +42 -0
  39. package/modules/wrapper-vagrant/module.json +21 -0
  40. package/modules/wrapper-wifite/index.mjs +40 -0
  41. package/modules/wrapper-wifite/module.json +28 -0
  42. package/package.json +1 -1
  43. package/packages/cli/dist/cli.js +1 -1
  44. package/packages/gui/dist/server.js +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.17.0
4
+
5
+ - New modules: RustScan fast port scanning, fping live host discovery, hping3 TCP probing, dnsx DNS resolution, Katana web crawling, gowitness website screenshots, Maigret username search, Holehe email footprint, Arjun parameter discovery, and ParamSpider parameter mining.
6
+
7
+ ## 1.16.0
8
+
9
+ - New modules: ansible-lint playbook linting, Vagrant machine status, searchsploit Exploit-DB search, linpeas privilege escalation enumeration, smbclient share listing, enum4linux user and group enumeration, HTML report export, SARIF export, hcxdumptool handshake capture, and wifite wireless attacks.
10
+
3
11
  ## 1.15.0
4
12
 
5
13
  - New modules: RouterSploit router exploits, WebSocket upgrade checks, dnsrecon DNS enumeration, ShellCheck script linting, Docker Bench security checks, detect-secrets secret scanning, file type identification, sysdig event capture, crunch wordlist generation, and snmpwalk SNMP enumeration.
@@ -0,0 +1,56 @@
1
+ import { readFileSync } from "node:fs";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ try {
10
+ const result = build(String(request.target ?? ""));
11
+ emit({ type: "result", summary: result.summary, data: result.data });
12
+ emit({ type: "done", summary: `HTML report finished: ${result.data.events} events.` });
13
+ } catch (error) {
14
+ emit({ type: "error", message: error.message });
15
+ process.exitCode = 1;
16
+ }
17
+ });
18
+
19
+ function escapeHtml(value) {
20
+ return String(value ?? "")
21
+ .replace(/&/g, "&")
22
+ .replace(/</g, "&lt;")
23
+ .replace(/>/g, "&gt;")
24
+ .replace(/"/g, "&quot;");
25
+ }
26
+
27
+ function build(target) {
28
+ let raw;
29
+ try {
30
+ raw = readFileSync(target, "utf8");
31
+ } catch {
32
+ throw new Error(`Cannot read results file: ${target}.`);
33
+ }
34
+ let parsed;
35
+ try {
36
+ parsed = JSON.parse(raw);
37
+ } catch {
38
+ throw new Error(`Invalid results file: ${target} is not valid JSON.`);
39
+ }
40
+ const events = Array.isArray(parsed.events) ? parsed.events : [];
41
+ const rows = [];
42
+ let count = 0;
43
+ for (const event of events) {
44
+ if (event.type !== "result" && event.type !== "error") continue;
45
+ const summary = event.type === "result" ? (event.summary ?? "") : (event.message ?? "");
46
+ const eventTarget = event.data?.target ?? "";
47
+ rows.push(`<tr><td>${escapeHtml(event.type)}</td><td>${escapeHtml(summary)}</td><td>${escapeHtml(eventTarget)}</td></tr>`);
48
+ count += 1;
49
+ }
50
+ const moduleId = parsed.module?.id ?? "unknown";
51
+ const html = `<!DOCTYPE html><html><head><title>Cantarella Report</title></head><body><h1>Cantarella Report: ${escapeHtml(moduleId)}</h1><table><tr><th>Type</th><th>Summary</th><th>Target</th></tr>${rows.join("")}</table></body></html>`;
52
+ return {
53
+ summary: `HTML report built: ${count} events from ${target}.`,
54
+ data: { source: target, events: count, html },
55
+ };
56
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "category": "reporting",
3
+ "core_api": "^0.1.0",
4
+ "description": "Converts a Cantarella run results file into a readable HTML report.",
5
+ "entry": "index.mjs",
6
+ "id": "reporting/html-report",
7
+ "kind": "native",
8
+ "maintenance": "active",
9
+ "name": "HTML Report",
10
+ "options": [],
11
+ "risk": "info",
12
+ "schema_version": 1,
13
+ "version": "0.1.0"
14
+ }
@@ -0,0 +1,53 @@
1
+ import { readFileSync } from "node:fs";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ try {
10
+ const result = build(String(request.target ?? ""));
11
+ emit({ type: "result", summary: result.summary, data: result.data });
12
+ emit({ type: "done", summary: `SARIF export finished: ${result.data.results} results.` });
13
+ } catch (error) {
14
+ emit({ type: "error", message: error.message });
15
+ process.exitCode = 1;
16
+ }
17
+ });
18
+
19
+ function build(target) {
20
+ let raw;
21
+ try {
22
+ raw = readFileSync(target, "utf8");
23
+ } catch {
24
+ throw new Error(`Cannot read results file: ${target}.`);
25
+ }
26
+ let parsed;
27
+ try {
28
+ parsed = JSON.parse(raw);
29
+ } catch {
30
+ throw new Error(`Invalid results file: ${target} is not valid JSON.`);
31
+ }
32
+ const events = Array.isArray(parsed.events) ? parsed.events : [];
33
+ const results = [];
34
+ for (const event of events) {
35
+ if (event.type !== "result" && event.type !== "error") continue;
36
+ const message = event.type === "result" ? (event.summary ?? "") : (event.message ?? "");
37
+ results.push({ ruleId: "cantarella/result", level: "note", message: { text: message } });
38
+ }
39
+ const sarif = {
40
+ version: "2.1.0",
41
+ $schema: "https://json.schemastore.org/sarif-2.1.0.json",
42
+ runs: [
43
+ {
44
+ tool: { driver: { name: "Cantarella", version: "1.16.0", rules: [{ id: "cantarella/result", name: "CantarellaResult", shortDescription: { text: "A Cantarella run result." } }] } },
45
+ results,
46
+ },
47
+ ],
48
+ };
49
+ return {
50
+ summary: `SARIF export built: ${results.length} results from ${target}.`,
51
+ data: { source: target, results: results.length, sarif },
52
+ };
53
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "category": "reporting",
3
+ "core_api": "^0.1.0",
4
+ "description": "Converts a Cantarella run results file into SARIF format for code scanning tools.",
5
+ "entry": "index.mjs",
6
+ "id": "reporting/sarif-export",
7
+ "kind": "native",
8
+ "maintenance": "active",
9
+ "name": "SARIF Export",
10
+ "options": [],
11
+ "risk": "info",
12
+ "schema_version": 1,
13
+ "version": "0.1.0"
14
+ }
@@ -0,0 +1,48 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("ansible-lint", ["--format", "json", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `ansible-lint failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ let findings = null;
21
+ try {
22
+ findings = JSON.parse(stdout);
23
+ } catch {
24
+ findings = null;
25
+ }
26
+ const items = [];
27
+ if (Array.isArray(findings)) {
28
+ for (const finding of findings) {
29
+ items.push({ file: finding.filename ?? "", line: finding.line ?? null, tag: finding.tag ?? "", severity: finding.severity ?? "", message: finding.message ?? "" });
30
+ }
31
+ }
32
+ if (code !== 0 && !items.length && !findings) {
33
+ emit({ type: "error", message: `ansible-lint failed: ${stderr.trim() || `exited with ${code}`}` });
34
+ process.exitCode = 1;
35
+ return;
36
+ }
37
+ const bySeverity = {};
38
+ for (const item of items) {
39
+ bySeverity[item.severity] = (bySeverity[item.severity] ?? 0) + 1;
40
+ }
41
+ emit({
42
+ type: "result",
43
+ summary: `ansible-lint found ${items.length} findings in ${target}.`,
44
+ data: { target, total: items.length, by_severity: bySeverity, findings: items.slice(0, 100) },
45
+ });
46
+ emit({ type: "done", summary: `ansible-lint finished: ${items.length} findings.` });
47
+ });
48
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "automation",
3
+ "core_api": "^0.1.0",
4
+ "description": "Lints Ansible playbooks with ansible-lint and reports the findings.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "ansible-lint",
9
+ "install_hint": "Install ansible-lint from your distribution packages or with pipx install ansible-lint.",
10
+ "name": "ansible-lint"
11
+ }
12
+ ],
13
+ "id": "automation/ansible-lint",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "ansible-lint",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,46 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("arjun", ["-u", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `Arjun failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const parameters = new Set();
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ const match = trimmed.match(/Parameters found:\s*(.+)/i) || trimmed.match(/Found parameter:\s*(\S+)/i);
26
+ if (match) {
27
+ for (const name of match[1].split(",")) {
28
+ const cleaned = name.trim();
29
+ if (cleaned) parameters.add(cleaned);
30
+ }
31
+ }
32
+ }
33
+ if (code !== 0 && !parameters.size && !plain.trim()) {
34
+ emit({ type: "error", message: `Arjun failed: ${stderr.trim() || `exited with ${code}`}` });
35
+ process.exitCode = 1;
36
+ return;
37
+ }
38
+ const list = [...parameters].sort();
39
+ emit({
40
+ type: "result",
41
+ summary: list.length ? `Arjun found ${list.length} parameters on ${target}.` : `Arjun found no parameters on ${target}.`,
42
+ data: { target, parameters: list },
43
+ });
44
+ emit({ type: "done", summary: list.length ? `Arjun finished: ${list.length} parameters.` : "Arjun finished: no parameters." });
45
+ });
46
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "web",
3
+ "core_api": "^0.1.0",
4
+ "description": "Finds hidden HTTP parameters on a URL with Arjun and reports them.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "arjun",
9
+ "install_hint": "Install Arjun from your distribution packages or with pipx install arjun.",
10
+ "name": "Arjun"
11
+ }
12
+ ],
13
+ "id": "web/arjun",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Arjun",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,44 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("dnsx", ["-d", target, "-a", "-resp", "-json"], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `dnsx failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const records = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ try {
26
+ const parsed = JSON.parse(trimmed);
27
+ if (parsed.host) records.push(parsed);
28
+ } catch {
29
+ // not a JSON line, skip
30
+ }
31
+ }
32
+ if (code !== 0 && !records.length) {
33
+ emit({ type: "error", message: `dnsx failed: ${stderr.trim() || `exited with ${code}`}` });
34
+ process.exitCode = 1;
35
+ return;
36
+ }
37
+ emit({
38
+ type: "result",
39
+ summary: `dnsx resolved ${records.length} records for ${target}.`,
40
+ data: { target, records: records.slice(0, 100) },
41
+ });
42
+ emit({ type: "done", summary: `dnsx finished: ${records.length} records.` });
43
+ });
44
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "recon",
3
+ "core_api": "^0.1.0",
4
+ "description": "Resolves DNS records for a domain with dnsx and reports the answers.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "dnsx",
9
+ "install_hint": "Install dnsx from your distribution packages or with go install github.com/projectdiscovery/dnsx/cmd/dnsx@latest.",
10
+ "name": "dnsx"
11
+ }
12
+ ],
13
+ "id": "recon/dnsx",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "dnsx",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,43 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("enum4linux", ["-a", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `enum4linux failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const users = new Set();
22
+ const groups = new Set();
23
+ for (const line of plain.split("\n")) {
24
+ const trimmed = line.trim();
25
+ if (!trimmed) continue;
26
+ const userMatch = trimmed.match(/user:\[([^\]]+)\]/);
27
+ if (userMatch) users.add(userMatch[1]);
28
+ const groupMatch = trimmed.match(/group:\[([^\]]+)\]/);
29
+ if (groupMatch) groups.add(groupMatch[1]);
30
+ }
31
+ if (code !== 0 && !users.size && !groups.size && !plain.trim()) {
32
+ emit({ type: "error", message: `enum4linux failed: ${stderr.trim() || `exited with ${code}`}` });
33
+ process.exitCode = 1;
34
+ return;
35
+ }
36
+ emit({
37
+ type: "result",
38
+ summary: `enum4linux found ${users.size} users and ${groups.size} groups on ${target}.`,
39
+ data: { target, users: [...users].sort(), groups: [...groups].sort() },
40
+ });
41
+ emit({ type: "done", summary: `enum4linux finished: ${users.size} users, ${groups.size} groups.` });
42
+ });
43
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "internal",
3
+ "core_api": "^0.1.0",
4
+ "description": "Enumerates users, groups, and shares on a Windows host with enum4linux.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "enum4linux",
9
+ "install_hint": "Install enum4linux from your distribution packages.",
10
+ "name": "enum4linux"
11
+ }
12
+ ],
13
+ "id": "internal/enum4linux",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "enum4linux",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,39 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("fping", ["-a", "-g", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `fping failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const hosts = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ if (/^\d{1,3}(\.\d{1,3}){3}$/.test(trimmed)) hosts.push(trimmed);
26
+ }
27
+ if (code !== 0 && !hosts.length && !plain.trim()) {
28
+ emit({ type: "error", message: `fping failed: ${stderr.trim() || `exited with ${code}`}` });
29
+ process.exitCode = 1;
30
+ return;
31
+ }
32
+ emit({
33
+ type: "result",
34
+ summary: `fping found ${hosts.length} live hosts in ${target}.`,
35
+ data: { target, hosts },
36
+ });
37
+ emit({ type: "done", summary: `fping finished: ${hosts.length} live hosts.` });
38
+ });
39
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "network",
3
+ "core_api": "^0.1.0",
4
+ "description": "Pings a network range with fping and reports the live hosts.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "fping",
9
+ "install_hint": "Install fping from your distribution packages.",
10
+ "name": "fping"
11
+ }
12
+ ],
13
+ "id": "network/fping",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "fping",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,40 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("gowitness", ["single", "--url", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `gowitness failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const screenshots = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ const match = trimmed.match(/(?:Screenshot written to|wrote screenshot to|saved to)\s+(\S+\.(?:png|jpg|jpeg))/i);
26
+ if (match) screenshots.push(match[1]);
27
+ }
28
+ if (code !== 0 && !screenshots.length && !plain.trim()) {
29
+ emit({ type: "error", message: `gowitness failed: ${stderr.trim() || `exited with ${code}`}` });
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ emit({
34
+ type: "result",
35
+ summary: screenshots.length ? `gowitness saved ${screenshots.length} screenshots for ${target}.` : `gowitness saved no screenshots for ${target}.`,
36
+ data: { target, screenshots },
37
+ });
38
+ emit({ type: "done", summary: screenshots.length ? `gowitness finished: ${screenshots.length} screenshots.` : "gowitness finished: no screenshots." });
39
+ });
40
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "recon",
3
+ "core_api": "^0.1.0",
4
+ "description": "Takes website screenshots with gowitness and reports the files it wrote.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "gowitness",
9
+ "install_hint": "Install gowitness from your distribution packages or the gowitness releases.",
10
+ "name": "gowitness"
11
+ }
12
+ ],
13
+ "id": "recon/gowitness",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "gowitness",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,40 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const iface = String(request.options?.interface ?? "wlan0mon");
11
+ const child = spawn("hcxdumptool", ["-i", iface, "--enable_status=1"], { stdio: ["ignore", "pipe", "pipe"] });
12
+ let stdout = "";
13
+ let stderr = "";
14
+ child.stdout.on("data", (chunk) => (stdout += chunk));
15
+ child.stderr.on("data", (chunk) => (stderr += chunk));
16
+ child.on("error", (error) => {
17
+ emit({ type: "error", message: `hcxdumptool failed: ${error.message}` });
18
+ process.exitCode = 1;
19
+ });
20
+ child.on("close", (code) => {
21
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
22
+ const captures = [];
23
+ for (const line of plain.split("\n")) {
24
+ const trimmed = line.trim();
25
+ if (!trimmed) continue;
26
+ if (/PMKID|EAPOL/i.test(trimmed)) captures.push(trimmed);
27
+ }
28
+ if (code !== 0 && !captures.length && !plain.trim()) {
29
+ emit({ type: "error", message: `hcxdumptool failed: ${stderr.trim() || `exited with ${code}`}` });
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ emit({
34
+ type: "result",
35
+ summary: `hcxdumptool captured ${captures.length} handshakes on ${iface}.`,
36
+ data: { target, interface: iface, captures: captures.slice(0, 100) },
37
+ });
38
+ emit({ type: "done", summary: `hcxdumptool finished: ${captures.length} captures.` });
39
+ });
40
+ });
@@ -0,0 +1,28 @@
1
+ {
2
+ "category": "wireless",
3
+ "core_api": "^0.1.0",
4
+ "description": "Captures WPA handshakes and PMKIDs with hcxdumptool and reports what it captured.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "hcxdumptool",
9
+ "install_hint": "Install hcxdumptool from your distribution packages.",
10
+ "name": "hcxdumptool"
11
+ }
12
+ ],
13
+ "id": "wireless/hcxdumptool",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "hcxdumptool",
17
+ "options": [
18
+ {
19
+ "default": "wlan0mon",
20
+ "description": "Wireless interface in monitor mode.",
21
+ "name": "interface",
22
+ "type": "string"
23
+ }
24
+ ],
25
+ "risk": "high",
26
+ "schema_version": 1,
27
+ "version": "0.1.0"
28
+ }
@@ -0,0 +1,40 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("holehe", [target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `Holehe failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const accounts = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ const match = trimmed.match(/\[\+\]\s*Used in\s+(.+)/i);
26
+ if (match) accounts.push(match[1].trim());
27
+ }
28
+ if (code !== 0 && !accounts.length && !plain.trim()) {
29
+ emit({ type: "error", message: `Holehe failed: ${stderr.trim() || `exited with ${code}`}` });
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ emit({
34
+ type: "result",
35
+ summary: `Holehe found ${target} used in ${accounts.length} sites.`,
36
+ data: { target, accounts: accounts.slice(0, 100) },
37
+ });
38
+ emit({ type: "done", summary: `Holehe finished: ${accounts.length} accounts.` });
39
+ });
40
+ });