cantarella-framework 1.2.0 → 1.3.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.
- package/CHANGELOG.md +4 -0
- package/modules/wrapper-ffuf/index.mjs +33 -0
- package/modules/wrapper-ffuf/module.json +28 -0
- package/modules/wrapper-nikto/index.mjs +29 -0
- package/modules/wrapper-nikto/module.json +21 -0
- package/modules/wrapper-sqlmap/index.mjs +34 -0
- package/modules/wrapper-sqlmap/module.json +21 -0
- package/modules/wrapper-whatweb/index.mjs +33 -0
- package/modules/wrapper-whatweb/module.json +21 -0
- package/package.json +1 -1
- package/packages/cli/dist/cli.js +1 -1
- package/packages/gui/dist/server.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
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 wordlist = String(request.options?.wordlist ?? "/usr/share/wordlists/dirb/common.txt");
|
|
11
|
+
const child = spawn("ffuf", ["-u", target, "-w", wordlist, "-json", "-s"], { 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: `ffuf failed: ${error.message}` });
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
});
|
|
20
|
+
child.on("close", (code) => {
|
|
21
|
+
let results = [];
|
|
22
|
+
try {
|
|
23
|
+
results = (JSON.parse(stdout).results ?? []).map((item) => ({ url: item.url, status: item.status, length: item.length }));
|
|
24
|
+
} catch {}
|
|
25
|
+
if (code !== 0 && !results.length) {
|
|
26
|
+
emit({ type: "error", message: `ffuf failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
emit({ type: "result", summary: `ffuf found ${results.length} results for ${target}.`, data: { target, wordlist, results } });
|
|
31
|
+
emit({ type: "done", summary: "ffuf scan finished." });
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"id": "web/ffuf",
|
|
4
|
+
"name": "ffuf",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"category": "web",
|
|
7
|
+
"kind": "wrapper",
|
|
8
|
+
"risk": "medium",
|
|
9
|
+
"description": "Runs ffuf content discovery against a URL containing FUZZ.",
|
|
10
|
+
"entry": "index.mjs",
|
|
11
|
+
"core_api": "^0.1.0",
|
|
12
|
+
"maintenance": "active",
|
|
13
|
+
"options": [
|
|
14
|
+
{
|
|
15
|
+
"name": "wordlist",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Path to the wordlist file.",
|
|
18
|
+
"default": "/usr/share/wordlists/dirb/common.txt"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"external_tools": [
|
|
22
|
+
{
|
|
23
|
+
"name": "ffuf",
|
|
24
|
+
"command": "ffuf",
|
|
25
|
+
"install_hint": "Install ffuf from your distribution packages."
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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("nikto", ["-h", target, "-nointeractive"], { 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: `Nikto failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
const lines = stdout.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("+"));
|
|
21
|
+
if (code !== 0 && !lines.length) {
|
|
22
|
+
emit({ type: "error", message: `Nikto failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
emit({ type: "result", summary: `Nikto reported ${lines.length} lines for ${target}.`, data: { target, findings: lines.slice(0, 200) } });
|
|
27
|
+
emit({ type: "done", summary: "Nikto scan finished." });
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"id": "web/nikto",
|
|
4
|
+
"name": "Nikto",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"category": "web",
|
|
7
|
+
"kind": "wrapper",
|
|
8
|
+
"risk": "medium",
|
|
9
|
+
"description": "Runs a Nikto web server scan against a target URL.",
|
|
10
|
+
"entry": "index.mjs",
|
|
11
|
+
"core_api": "^0.1.0",
|
|
12
|
+
"maintenance": "active",
|
|
13
|
+
"options": [],
|
|
14
|
+
"external_tools": [
|
|
15
|
+
{
|
|
16
|
+
"name": "Nikto",
|
|
17
|
+
"command": "nikto",
|
|
18
|
+
"install_hint": "Install nikto from your distribution packages."
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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("sqlmap", ["-u", target, "--batch", "--level=1", "--risk=1"], { 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: `sqlmap failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
const lines = stdout.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
21
|
+
const interesting = lines.filter((line) => /injectable|vulnerable|parameter|back-end DBMS/i.test(line));
|
|
22
|
+
if (code !== 0 && !lines.length) {
|
|
23
|
+
emit({ type: "error", message: `sqlmap failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
24
|
+
process.exitCode = 1;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
emit({
|
|
28
|
+
type: "result",
|
|
29
|
+
summary: interesting.length ? `sqlmap reported ${interesting.length} interesting lines for ${target}.` : `sqlmap finished for ${target} with no injectable parameter reported.`,
|
|
30
|
+
data: { target, findings: interesting.slice(0, 100) },
|
|
31
|
+
});
|
|
32
|
+
emit({ type: "done", summary: "sqlmap scan finished." });
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"id": "web/sqlmap",
|
|
4
|
+
"name": "sqlmap",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"category": "web",
|
|
7
|
+
"kind": "wrapper",
|
|
8
|
+
"risk": "high",
|
|
9
|
+
"description": "Runs sqlmap against a target URL in batch mode.",
|
|
10
|
+
"entry": "index.mjs",
|
|
11
|
+
"core_api": "^0.1.0",
|
|
12
|
+
"maintenance": "active",
|
|
13
|
+
"options": [],
|
|
14
|
+
"external_tools": [
|
|
15
|
+
{
|
|
16
|
+
"name": "sqlmap",
|
|
17
|
+
"command": "sqlmap",
|
|
18
|
+
"install_hint": "Install sqlmap from your distribution packages."
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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("whatweb", ["--log-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: `WhatWeb failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
let plugins = [];
|
|
21
|
+
try {
|
|
22
|
+
const parsed = JSON.parse(stdout);
|
|
23
|
+
plugins = Object.keys(parsed[0]?.plugins ?? {});
|
|
24
|
+
} catch {}
|
|
25
|
+
if (code !== 0 && !plugins.length) {
|
|
26
|
+
emit({ type: "error", message: `WhatWeb failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
emit({ type: "result", summary: `WhatWeb detected ${plugins.length} technologies on ${target}.`, data: { target, technologies: plugins } });
|
|
31
|
+
emit({ type: "done", summary: "WhatWeb scan finished." });
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"id": "recon/whatweb",
|
|
4
|
+
"name": "WhatWeb",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"category": "recon",
|
|
7
|
+
"kind": "wrapper",
|
|
8
|
+
"risk": "low",
|
|
9
|
+
"description": "Fingerprints web technologies with WhatWeb.",
|
|
10
|
+
"entry": "index.mjs",
|
|
11
|
+
"core_api": "^0.1.0",
|
|
12
|
+
"maintenance": "active",
|
|
13
|
+
"options": [],
|
|
14
|
+
"external_tools": [
|
|
15
|
+
{
|
|
16
|
+
"name": "WhatWeb",
|
|
17
|
+
"command": "whatweb",
|
|
18
|
+
"install_hint": "Install whatweb from your distribution packages."
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
package/package.json
CHANGED
package/packages/cli/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ process.stdout.on("error", (error) => {
|
|
|
11
11
|
process.exit(0);
|
|
12
12
|
throw error;
|
|
13
13
|
});
|
|
14
|
-
const VERSION = "1.
|
|
14
|
+
const VERSION = "1.3.0";
|
|
15
15
|
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
|
|
16
16
|
function banner() {
|
|
17
17
|
return (process.stdout.columns ?? 80) >= 72 ? BANNER : COMPACT_BANNER;
|
|
@@ -78,8 +78,8 @@ export function createGuiServer(root) {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
sendJson(response, 200, {
|
|
81
|
-
version: "1.
|
|
82
|
-
update_message: (await checkForUpdate("1.
|
|
81
|
+
version: "1.3.0",
|
|
82
|
+
update_message: (await checkForUpdate("1.3.0")).message,
|
|
83
83
|
categories: CATEGORIES,
|
|
84
84
|
modules: modules.map(({ manifest }) => manifest),
|
|
85
85
|
external_tools: [...tools.values()],
|