n8n-nodes-soar 0.1.11 → 0.1.12
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/credentials/FofaCredentials.credentials.js +64 -0
- package/dist/credentials/fofa.svg +16 -0
- package/dist/nodes/Fofa/Fofa.node.js +122 -0
- package/dist/nodes/Fofa/Fofa.node.json +9 -0
- package/dist/nodes/Fofa/fofa.svg +16 -0
- package/dist/nodes/Naabu/Naabu.node.js +1 -1
- package/dist/nodes/Nuclei/Nuclei.node.js +6 -23
- package/package.json +7 -2
@@ -0,0 +1,64 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "FofaCredentials", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return FofaCredentials;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
function _define_property(obj, key, value) {
|
12
|
+
if (key in obj) {
|
13
|
+
Object.defineProperty(obj, key, {
|
14
|
+
value: value,
|
15
|
+
enumerable: true,
|
16
|
+
configurable: true,
|
17
|
+
writable: true
|
18
|
+
});
|
19
|
+
} else {
|
20
|
+
obj[key] = value;
|
21
|
+
}
|
22
|
+
return obj;
|
23
|
+
}
|
24
|
+
class FofaCredentials {
|
25
|
+
constructor(){
|
26
|
+
_define_property(this, "name", "fofaCredentialsApi");
|
27
|
+
_define_property(this, "displayName", "Fofa Credentials");
|
28
|
+
_define_property(this, "documentationUrl", "https://fofa.info/api");
|
29
|
+
_define_property(this, "icon", "file:fofa.svg");
|
30
|
+
_define_property(this, "properties", [
|
31
|
+
{
|
32
|
+
displayName: "Fofa Email",
|
33
|
+
name: "email",
|
34
|
+
type: "string",
|
35
|
+
placeholder: "name@email.com",
|
36
|
+
default: ""
|
37
|
+
},
|
38
|
+
{
|
39
|
+
displayName: "Fofa Key",
|
40
|
+
name: "key",
|
41
|
+
type: "string",
|
42
|
+
default: ""
|
43
|
+
}
|
44
|
+
]);
|
45
|
+
_define_property(this, "authenticate", {
|
46
|
+
type: "generic",
|
47
|
+
properties: {
|
48
|
+
qs: {
|
49
|
+
email: "={{$credentials.email}}",
|
50
|
+
key: "={{$credentials.key}}"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
});
|
54
|
+
_define_property(this, "test", {
|
55
|
+
request: {
|
56
|
+
url: "https://fofa.info/api/v1/info/my",
|
57
|
+
qs: {
|
58
|
+
email: "={{$credentials.email}}",
|
59
|
+
key: "={{$credentials.key}}"
|
60
|
+
}
|
61
|
+
}
|
62
|
+
});
|
63
|
+
}
|
64
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<svg id="组_5" data-name="组 5" xmlns="http://www.w3.org/2000/svg" width="237" height="237" viewBox="0 -72 237 165">
|
2
|
+
<defs>
|
3
|
+
<style>
|
4
|
+
.cls-1,
|
5
|
+
.cls-2 {
|
6
|
+
fill-rule: evenodd;
|
7
|
+
}
|
8
|
+
</style>
|
9
|
+
</defs>
|
10
|
+
<path id="形状_2" data-name="形状 2"
|
11
|
+
d="M919.646,317.387H886.54A4.536,4.536,0,0,0,882,321.92h0a4.081,4.081,0,0,1,0,1.14v61.276a4.492,4.492,0,0,0,8.984,0V355.705h25.509a4.533,4.533,0,1,0,0-9.066H890.985V326.453h28.661a4.537,4.537,0,0,0,4.54-4.533h0A4.536,4.536,0,0,0,919.646,317.387Zm137.374,0h-33.11a4.535,4.535,0,0,0-4.54,4.533h0a4.081,4.081,0,0,1,0,1.14v61.276a4.49,4.49,0,0,0,8.98,0V355.705h25.51a4.533,4.533,0,1,0,0-9.066h-25.51V326.453h28.67a4.542,4.542,0,0,0,4.54-4.533h0A4.541,4.541,0,0,0,1057.02,317.387Zm61.7,65.072-22.77-61.633a4.4,4.4,0,0,0-4.01-3.017c-0.02,0-.04-0.006-0.06-0.006h-2.36a4.844,4.844,0,0,0-4.41,3.273l-22.63,61.352a4.529,4.529,0,0,0,2.71,5.813h0a4.543,4.543,0,0,0,5.82-2.705l5.44-14.9h28.29l5.45,14.934a4.542,4.542,0,0,0,5.82,2.7h0A4.527,4.527,0,0,0,1118.72,382.459Zm-38.95-20.892,10.82-29.628,10.83,29.628h-21.65ZM968.815,315.992a38,38,0,0,0-38.155,37.763A37.5,37.5,0,0,0,952.073,387.7a4.3,4.3,0,1,0,3.754-7.734,28.967,28.967,0,0,1-16.561-26.207,29.551,29.551,0,0,1,59.1,0,28.957,28.957,0,0,1-16.653,26.252,4.3,4.3,0,1,0,3.727,7.747A37.7,37.7,0,0,0,968.815,315.992Z"
|
12
|
+
transform="translate(-882 -316)" class="cls-1" style="fill: #05f2f2;"></path>
|
13
|
+
<path id="形状_3" data-name="形状 3"
|
14
|
+
d="M992.631,353.449c0-12.687-10.679-23.01-23.8-23.01s-23.8,10.323-23.8,23.01c0,11.255,8.4,20.642,19.464,22.621a4.675,4.675,0,0,0-.405,1.9v26.294A4.741,4.741,0,0,0,968.836,409h0a4.741,4.741,0,0,0,4.752-4.729V377.974a4.69,4.69,0,0,0-.406-1.907C984.234,374.083,992.631,364.7,992.631,353.449Zm-23.8,14.89c-8.625,0-15.642-6.68-15.642-14.89s7.017-14.889,15.642-14.889,15.642,6.68,15.642,14.889S977.452,368.339,968.827,368.339Z"
|
15
|
+
transform="translate(-882 -316)" class="cls-2" style="fill: #599af8;"></path>
|
16
|
+
</svg>
|
@@ -0,0 +1,122 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "Fofa", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return Fofa;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _n8nworkflow = require("n8n-workflow");
|
12
|
+
function _define_property(obj, key, value) {
|
13
|
+
if (key in obj) {
|
14
|
+
Object.defineProperty(obj, key, {
|
15
|
+
value: value,
|
16
|
+
enumerable: true,
|
17
|
+
configurable: true,
|
18
|
+
writable: true
|
19
|
+
});
|
20
|
+
} else {
|
21
|
+
obj[key] = value;
|
22
|
+
}
|
23
|
+
return obj;
|
24
|
+
}
|
25
|
+
class Fofa {
|
26
|
+
async execute() {
|
27
|
+
const result = [];
|
28
|
+
for(let idx = 0; idx < this.getInputData().length; idx++){
|
29
|
+
const query = this.getNodeParameter("query", idx, "");
|
30
|
+
const page = this.getNodeParameter("page", idx, 1);
|
31
|
+
const size = this.getNodeParameter("size", idx, 100);
|
32
|
+
const full = this.getNodeParameter("full", idx, false);
|
33
|
+
const fields = this.getNodeParameter("fields", idx, "");
|
34
|
+
const data = await this.helpers.httpRequestWithAuthentication.call(this, "fofaCredentialsApi", {
|
35
|
+
method: "GET",
|
36
|
+
url: "https://fofa.info/api/v1/search/all",
|
37
|
+
qs: {
|
38
|
+
qbase64: Buffer.from(query).toString("base64"),
|
39
|
+
page,
|
40
|
+
size,
|
41
|
+
fields,
|
42
|
+
full
|
43
|
+
}
|
44
|
+
});
|
45
|
+
console.log(data);
|
46
|
+
if (data.error && !data.errmsg.includes("820031")) {
|
47
|
+
throw new _n8nworkflow.NodeOperationError(this.getNode(), `Fofa error response: ${data.errmsg}`);
|
48
|
+
}
|
49
|
+
result.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data.results.map((item)=>Object.fromEntries(item.map((item, idx)=>[
|
50
|
+
fields.split(",")[idx],
|
51
|
+
item
|
52
|
+
])))), {
|
53
|
+
itemData: {
|
54
|
+
item: idx
|
55
|
+
}
|
56
|
+
}));
|
57
|
+
}
|
58
|
+
return [
|
59
|
+
result
|
60
|
+
];
|
61
|
+
}
|
62
|
+
constructor(){
|
63
|
+
_define_property(this, "description", {
|
64
|
+
displayName: "Soar: Fofa",
|
65
|
+
name: "fofa",
|
66
|
+
group: [
|
67
|
+
"output"
|
68
|
+
],
|
69
|
+
version: 1,
|
70
|
+
icon: "file:fofa.svg",
|
71
|
+
subtitle: "={{ 'fofa' + $parameter['query'] }}",
|
72
|
+
description: "Interact with Fofa",
|
73
|
+
defaults: {
|
74
|
+
name: "Fofa"
|
75
|
+
},
|
76
|
+
inputs: [
|
77
|
+
"main"
|
78
|
+
],
|
79
|
+
outputs: [
|
80
|
+
"main"
|
81
|
+
],
|
82
|
+
credentials: [
|
83
|
+
{
|
84
|
+
name: "fofaCredentialsApi",
|
85
|
+
required: true
|
86
|
+
}
|
87
|
+
],
|
88
|
+
properties: [
|
89
|
+
{
|
90
|
+
displayName: "Query",
|
91
|
+
name: "query",
|
92
|
+
type: "string",
|
93
|
+
default: ""
|
94
|
+
},
|
95
|
+
{
|
96
|
+
displayName: "Page",
|
97
|
+
name: "page",
|
98
|
+
type: "number",
|
99
|
+
default: 1
|
100
|
+
},
|
101
|
+
{
|
102
|
+
displayName: "Size",
|
103
|
+
name: "size",
|
104
|
+
type: "number",
|
105
|
+
default: 100
|
106
|
+
},
|
107
|
+
{
|
108
|
+
displayName: "Fields",
|
109
|
+
name: "fields",
|
110
|
+
type: "string",
|
111
|
+
default: "host,ip,port"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
displayName: "Full",
|
115
|
+
name: "full",
|
116
|
+
type: "boolean",
|
117
|
+
default: false
|
118
|
+
}
|
119
|
+
]
|
120
|
+
});
|
121
|
+
}
|
122
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<svg id="组_5" data-name="组 5" xmlns="http://www.w3.org/2000/svg" width="237" height="237" viewBox="0 -72 237 165">
|
2
|
+
<defs>
|
3
|
+
<style>
|
4
|
+
.cls-1,
|
5
|
+
.cls-2 {
|
6
|
+
fill-rule: evenodd;
|
7
|
+
}
|
8
|
+
</style>
|
9
|
+
</defs>
|
10
|
+
<path id="形状_2" data-name="形状 2"
|
11
|
+
d="M919.646,317.387H886.54A4.536,4.536,0,0,0,882,321.92h0a4.081,4.081,0,0,1,0,1.14v61.276a4.492,4.492,0,0,0,8.984,0V355.705h25.509a4.533,4.533,0,1,0,0-9.066H890.985V326.453h28.661a4.537,4.537,0,0,0,4.54-4.533h0A4.536,4.536,0,0,0,919.646,317.387Zm137.374,0h-33.11a4.535,4.535,0,0,0-4.54,4.533h0a4.081,4.081,0,0,1,0,1.14v61.276a4.49,4.49,0,0,0,8.98,0V355.705h25.51a4.533,4.533,0,1,0,0-9.066h-25.51V326.453h28.67a4.542,4.542,0,0,0,4.54-4.533h0A4.541,4.541,0,0,0,1057.02,317.387Zm61.7,65.072-22.77-61.633a4.4,4.4,0,0,0-4.01-3.017c-0.02,0-.04-0.006-0.06-0.006h-2.36a4.844,4.844,0,0,0-4.41,3.273l-22.63,61.352a4.529,4.529,0,0,0,2.71,5.813h0a4.543,4.543,0,0,0,5.82-2.705l5.44-14.9h28.29l5.45,14.934a4.542,4.542,0,0,0,5.82,2.7h0A4.527,4.527,0,0,0,1118.72,382.459Zm-38.95-20.892,10.82-29.628,10.83,29.628h-21.65ZM968.815,315.992a38,38,0,0,0-38.155,37.763A37.5,37.5,0,0,0,952.073,387.7a4.3,4.3,0,1,0,3.754-7.734,28.967,28.967,0,0,1-16.561-26.207,29.551,29.551,0,0,1,59.1,0,28.957,28.957,0,0,1-16.653,26.252,4.3,4.3,0,1,0,3.727,7.747A37.7,37.7,0,0,0,968.815,315.992Z"
|
12
|
+
transform="translate(-882 -316)" class="cls-1" style="fill: #05f2f2;"></path>
|
13
|
+
<path id="形状_3" data-name="形状 3"
|
14
|
+
d="M992.631,353.449c0-12.687-10.679-23.01-23.8-23.01s-23.8,10.323-23.8,23.01c0,11.255,8.4,20.642,19.464,22.621a4.675,4.675,0,0,0-.405,1.9v26.294A4.741,4.741,0,0,0,968.836,409h0a4.741,4.741,0,0,0,4.752-4.729V377.974a4.69,4.69,0,0,0-.406-1.907C984.234,374.083,992.631,364.7,992.631,353.449Zm-23.8,14.89c-8.625,0-15.642-6.68-15.642-14.89s7.017-14.889,15.642-14.889,15.642,6.68,15.642,14.889S977.452,368.339,968.827,368.339Z"
|
15
|
+
transform="translate(-882 -316)" class="cls-2" style="fill: #599af8;"></path>
|
16
|
+
</svg>
|
@@ -43,7 +43,7 @@ class Naabu {
|
|
43
43
|
"options.optimization"
|
44
44
|
]
|
45
45
|
});
|
46
|
-
result.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(JSON.parse(response.stdout)), {
|
46
|
+
result.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(((d)=>d.split("\n").map((n)=>n.trim()).filter(Boolean).map((d)=>JSON.parse(d)))(response.stdout)), {
|
47
47
|
itemData: {
|
48
48
|
item: idx
|
49
49
|
}
|
@@ -27,12 +27,10 @@ class Nuclei {
|
|
27
27
|
const result = [];
|
28
28
|
const executor = new _executor.SoarExecutor(this);
|
29
29
|
for(let idx = 0; idx < this.getInputData().length; idx++){
|
30
|
-
const response = await executor.run(idx, "nuclei", "", {
|
30
|
+
const response = await executor.run(idx, "nuclei", "-target", {
|
31
31
|
extraArgs: [
|
32
32
|
"-silent",
|
33
33
|
"-jsonl",
|
34
|
-
"-json-export",
|
35
|
-
"-jsonl-export",
|
36
34
|
"-disable-update-check"
|
37
35
|
],
|
38
36
|
extraArgParameters: [
|
@@ -106,32 +104,17 @@ class Nuclei {
|
|
106
104
|
displayName: "Options",
|
107
105
|
name: "key",
|
108
106
|
type: "options",
|
109
|
-
default: "-
|
107
|
+
default: "-scan-all-ips",
|
110
108
|
options: [
|
111
|
-
{
|
112
|
-
name: "IP Version",
|
113
|
-
value: "-ip-version",
|
114
|
-
description: "IP version to scan of hostname (4,6) - (default 4) (string[])"
|
115
|
-
},
|
116
|
-
{
|
117
|
-
name: "List",
|
118
|
-
value: "-list",
|
119
|
-
description: "Path to file containing a list of target URLs/hosts to scan (one per line) (string)"
|
120
|
-
},
|
121
|
-
{
|
122
|
-
name: "Resume",
|
123
|
-
value: "-resume",
|
124
|
-
description: "Resume scan using resume.cfg (clustering will be disabled) (string)"
|
125
|
-
},
|
126
109
|
{
|
127
110
|
name: "Scan All IPs",
|
128
111
|
value: "-scan-all-ips",
|
129
112
|
description: "Scan all the IP's associated with dns record"
|
130
113
|
},
|
131
114
|
{
|
132
|
-
name: "
|
133
|
-
value: "-
|
134
|
-
description: "
|
115
|
+
name: "IP Version",
|
116
|
+
value: "-ip-version",
|
117
|
+
description: "IP version to scan of hostname (4,6) - (default 4) (string[])"
|
135
118
|
}
|
136
119
|
]
|
137
120
|
},
|
@@ -1035,7 +1018,7 @@ class Nuclei {
|
|
1035
1018
|
}
|
1036
1019
|
]
|
1037
1020
|
}
|
1038
|
-
])
|
1021
|
+
], true)
|
1039
1022
|
});
|
1040
1023
|
}
|
1041
1024
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "n8n-nodes-soar",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.12",
|
4
4
|
"description": "",
|
5
5
|
"keywords": [
|
6
6
|
"n8n-community-node-package"
|
@@ -34,6 +34,9 @@
|
|
34
34
|
],
|
35
35
|
"n8n": {
|
36
36
|
"n8nNodesApiVersion": 1,
|
37
|
+
"credentials": [
|
38
|
+
"dist/credentials/FofaCredentials.credentials.js"
|
39
|
+
],
|
37
40
|
"nodes": [
|
38
41
|
"dist/nodes/Uncover/Uncover.node.js",
|
39
42
|
"dist/nodes/Cdncheck/Cdncheck.node.js",
|
@@ -41,7 +44,8 @@
|
|
41
44
|
"dist/nodes/Nuclei/Nuclei.node.js",
|
42
45
|
"dist/nodes/Httpx/Httpx.node.js",
|
43
46
|
"dist/nodes/Subfinder/Subfinder.node.js",
|
44
|
-
"dist/nodes/Katana/Katana.node.js"
|
47
|
+
"dist/nodes/Katana/Katana.node.js",
|
48
|
+
"dist/nodes/Fofa/Fofa.node.js"
|
45
49
|
]
|
46
50
|
},
|
47
51
|
"devDependencies": {
|
@@ -95,6 +99,7 @@
|
|
95
99
|
"header": "# Changelog\n\n"
|
96
100
|
},
|
97
101
|
"dependencies": {
|
102
|
+
"axios": "^1.5.0",
|
98
103
|
"dockerode": "^3.3.5",
|
99
104
|
"inquirer": "^9.2.11",
|
100
105
|
"n8n-nodes-container": "^0.1.8"
|