n8n-nodes-soar 0.1.10 → 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/Cdncheck/Cdncheck.node.js +229 -0
- package/dist/nodes/Cdncheck/Cdncheck.node.json +9 -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/Httpx/Httpx.node.js +643 -147
- package/dist/nodes/Httpx/Httpx.node.json +1 -1
- package/dist/nodes/Katana/Katana.node.js +347 -149
- package/dist/nodes/Katana/Katana.node.json +1 -1
- package/dist/nodes/Naabu/Naabu.node.js +444 -0
- package/dist/nodes/Naabu/Naabu.node.json +9 -0
- package/dist/nodes/Nuclei/Nuclei.node.js +1024 -0
- package/dist/nodes/Nuclei/Nuclei.node.json +9 -0
- package/dist/nodes/Subfinder/Subfinder.node.js +202 -149
- package/dist/nodes/Uncover/Uncover.node.js +280 -0
- package/dist/nodes/Uncover/Uncover.node.json +9 -0
- package/dist/utils/executor.js +163 -4
- package/dist/utils/runner/k8s.runner.js +1 -1
- package/package.json +19 -7
@@ -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,229 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "Cdncheck", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return Cdncheck;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _executor = require("../../utils/executor");
|
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 Cdncheck {
|
26
|
+
async execute() {
|
27
|
+
const result = [];
|
28
|
+
const executor = new _executor.SoarExecutor(this);
|
29
|
+
for(let idx = 0; idx < this.getInputData().length; idx++){
|
30
|
+
const response = await executor.run(idx, "cdncheck", "-input", {
|
31
|
+
extraArgs: [
|
32
|
+
"-jsonl",
|
33
|
+
"-silent",
|
34
|
+
"-disable-update-check"
|
35
|
+
],
|
36
|
+
extraArgParameters: [
|
37
|
+
"options.detection",
|
38
|
+
"options.matcher",
|
39
|
+
"options.filter",
|
40
|
+
"options.config"
|
41
|
+
]
|
42
|
+
});
|
43
|
+
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)), {
|
44
|
+
itemData: {
|
45
|
+
item: idx
|
46
|
+
}
|
47
|
+
}));
|
48
|
+
}
|
49
|
+
return [
|
50
|
+
result
|
51
|
+
];
|
52
|
+
}
|
53
|
+
constructor(){
|
54
|
+
_define_property(this, "description", {
|
55
|
+
displayName: "Soar: Cdncheck",
|
56
|
+
name: "cdncheck",
|
57
|
+
group: [
|
58
|
+
"output"
|
59
|
+
],
|
60
|
+
version: 1,
|
61
|
+
subtitle: "={{ 'cdncheck' + ($parameter['batch'] ? ' (Batch)' : ' on ' + $parameter['target']) }}",
|
62
|
+
description: "Interact with Cdncheck",
|
63
|
+
defaults: {
|
64
|
+
name: "Cdncheck"
|
65
|
+
},
|
66
|
+
inputs: [
|
67
|
+
"main"
|
68
|
+
],
|
69
|
+
outputs: [
|
70
|
+
"main"
|
71
|
+
],
|
72
|
+
credentials: [
|
73
|
+
{
|
74
|
+
name: "dockerCredentialsApi"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
name: "kubernetesCredentialsApi"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
properties: (0, _executor.injectCommonProperties)([
|
81
|
+
{
|
82
|
+
displayName: "Options",
|
83
|
+
name: "options",
|
84
|
+
type: "fixedCollection",
|
85
|
+
default: {},
|
86
|
+
typeOptions: {
|
87
|
+
multipleValues: true
|
88
|
+
},
|
89
|
+
options: [
|
90
|
+
{
|
91
|
+
displayName: "Detection",
|
92
|
+
name: "detection",
|
93
|
+
values: [
|
94
|
+
{
|
95
|
+
displayName: "Options",
|
96
|
+
name: "key",
|
97
|
+
type: "options",
|
98
|
+
default: "-cdn",
|
99
|
+
options: [
|
100
|
+
{
|
101
|
+
name: "CDN",
|
102
|
+
value: "-cdn",
|
103
|
+
description: "Display only cdn in cli output"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
name: "Cloud",
|
107
|
+
value: "-cloud",
|
108
|
+
description: "Display only cloud in cli output"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
name: "Waf",
|
112
|
+
value: "-waf",
|
113
|
+
description: "Display only waf in cli output"
|
114
|
+
}
|
115
|
+
]
|
116
|
+
}
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
displayName: "Matcher",
|
121
|
+
name: "matcher",
|
122
|
+
values: [
|
123
|
+
{
|
124
|
+
displayName: "Options",
|
125
|
+
name: "key",
|
126
|
+
type: "options",
|
127
|
+
default: "-match-cdn",
|
128
|
+
options: [
|
129
|
+
{
|
130
|
+
name: "Match CDN",
|
131
|
+
value: "-match-cdn",
|
132
|
+
description: "Match host with specified cdn provider (cloudfront, fastly, google, leaseweb, stackpath) (string[])"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
name: "Match Cloud",
|
136
|
+
value: "-match-cloud",
|
137
|
+
description: "Match host with specified cloud provider (zscaler, aws, azure, google, office365, oracle) (string[])"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
name: "Match Waf",
|
141
|
+
value: "-match-waf",
|
142
|
+
description: "Match host with specified waf provider (akamai, cloudflare, incapsula, sucuri) (string[])"
|
143
|
+
}
|
144
|
+
]
|
145
|
+
},
|
146
|
+
{
|
147
|
+
displayName: "Value",
|
148
|
+
name: "value",
|
149
|
+
type: "string",
|
150
|
+
default: ""
|
151
|
+
}
|
152
|
+
]
|
153
|
+
},
|
154
|
+
{
|
155
|
+
displayName: "Filter",
|
156
|
+
name: "filter",
|
157
|
+
values: [
|
158
|
+
{
|
159
|
+
displayName: "Options",
|
160
|
+
name: "key",
|
161
|
+
type: "options",
|
162
|
+
default: "-filter-cdn",
|
163
|
+
options: [
|
164
|
+
{
|
165
|
+
name: "Filter CDN",
|
166
|
+
value: "-filter-cdn",
|
167
|
+
description: "Filter host with specified cdn provider (cloudfront, fastly, google, leaseweb, stackpath) (string[])"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
name: "Filter Cloud",
|
171
|
+
value: "-filter-cloud",
|
172
|
+
description: "Filter host with specified cloud provider (zscaler, aws, azure, google, office365, oracle) (string[])"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
name: "Filter Waf",
|
176
|
+
value: "-filter-waf",
|
177
|
+
description: "Filter host with specified waf provider (akamai, cloudflare, incapsula, sucuri) (string[])"
|
178
|
+
}
|
179
|
+
]
|
180
|
+
},
|
181
|
+
{
|
182
|
+
displayName: "Value",
|
183
|
+
name: "value",
|
184
|
+
type: "string",
|
185
|
+
default: ""
|
186
|
+
}
|
187
|
+
]
|
188
|
+
},
|
189
|
+
{
|
190
|
+
displayName: "Config",
|
191
|
+
name: "config",
|
192
|
+
values: [
|
193
|
+
{
|
194
|
+
displayName: "Options",
|
195
|
+
name: "key",
|
196
|
+
type: "options",
|
197
|
+
default: "-resolver",
|
198
|
+
options: [
|
199
|
+
{
|
200
|
+
name: "Resolver",
|
201
|
+
value: "-resolver",
|
202
|
+
description: "List of resolvers to use (file or comma-separated) (string[])"
|
203
|
+
},
|
204
|
+
{
|
205
|
+
name: "Exclude",
|
206
|
+
value: "-exclude",
|
207
|
+
description: "Exclude detected ip from output"
|
208
|
+
},
|
209
|
+
{
|
210
|
+
name: "Retry",
|
211
|
+
value: "-retry",
|
212
|
+
description: "Maximum number of retries for dns resolution (must be at least 1) (default 2) (int)"
|
213
|
+
}
|
214
|
+
]
|
215
|
+
},
|
216
|
+
{
|
217
|
+
displayName: "Value",
|
218
|
+
name: "value",
|
219
|
+
type: "string",
|
220
|
+
default: ""
|
221
|
+
}
|
222
|
+
]
|
223
|
+
}
|
224
|
+
]
|
225
|
+
}
|
226
|
+
])
|
227
|
+
});
|
228
|
+
}
|
229
|
+
}
|
@@ -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>
|