n8n-nodes-soar 0.1.10 → 0.1.11

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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "node": "n8n-nodes-soar.nuclei",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": [
6
+ "Development",
7
+ "Container"
8
+ ]
9
+ }
@@ -27,44 +27,22 @@ class Subfinder {
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 env = {};
31
- const files = {};
32
- let collectFiles = [];
33
- const advanced = this.getNodeParameter("advanced", idx);
34
- if (advanced) {
35
- const _env = this.getNodeParameter("env.envs", idx) ?? [];
36
- Object.assign(env, Object.fromEntries(_env.map(({ key, value })=>[
37
- key,
38
- value
39
- ])));
40
- const _files = this.getNodeParameter("files.files", idx) ?? [];
41
- Object.assign(files, Object.fromEntries(_files.map(({ name, content })=>[
42
- name,
43
- content
44
- ])));
45
- const _collectFiles = this.getNodeParameter("collectFiles.files", idx) ?? [];
46
- collectFiles = collectFiles.concat(_collectFiles.map(({ name })=>name));
47
- }
48
- let targets = [];
49
- if (this.getNodeParameter("batch", idx)) {
50
- targets = JSON.parse(this.getNodeParameter("targets", idx)) ?? [];
51
- } else {
52
- targets = [
53
- this.getNodeParameter("target", idx) ?? ""
54
- ];
55
- }
56
- const response = await executor.run(idx, [
57
- "subfinder",
58
- "-silent",
59
- "-duc",
60
- ...targets.flatMap((target)=>[
61
- "-d",
62
- target
63
- ])
64
- ], env, files, collectFiles);
65
- result.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response.stdout.trim().split("\n").map((n)=>({
66
- url: n
67
- }))), {
30
+ const response = await executor.run(idx, "subfinder", "-domain", {
31
+ extraArgs: [
32
+ "-disable-update-check",
33
+ "-json",
34
+ "-silent"
35
+ ],
36
+ extraArgParameters: [
37
+ "options.source",
38
+ "options.filter",
39
+ "options.rateLimit",
40
+ "options.output",
41
+ "options.configuration",
42
+ "options.optimization"
43
+ ]
44
+ });
45
+ 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)), {
68
46
  itemData: {
69
47
  item: idx
70
48
  }
@@ -101,74 +79,77 @@ class Subfinder {
101
79
  name: "kubernetesCredentialsApi"
102
80
  }
103
81
  ],
104
- properties: [
82
+ properties: (0, _executor.injectCommonProperties)([
105
83
  {
106
- displayName: "Batch",
107
- name: "batch",
108
- type: "boolean",
109
- default: false
110
- },
111
- {
112
- displayName: "Target",
113
- name: "target",
114
- type: "string",
115
- default: "",
116
- displayOptions: {
117
- show: {
118
- batch: [
119
- false
120
- ]
121
- }
122
- }
123
- },
124
- {
125
- displayName: "Targets",
126
- name: "targets",
127
- type: "json",
128
- default: "[]",
129
- displayOptions: {
130
- show: {
131
- batch: [
132
- true
133
- ]
134
- }
135
- }
136
- },
137
- {
138
- displayName: "Advanced",
139
- name: "advanced",
140
- type: "boolean",
141
- default: false,
142
- description: "Whether show advanced options"
143
- },
144
- {
145
- displayName: "Environment Variables",
146
- name: "env",
84
+ displayName: "Options",
85
+ name: "options",
147
86
  type: "fixedCollection",
148
- displayOptions: {
149
- show: {
150
- advanced: [
151
- true
152
- ]
153
- }
154
- },
155
- placeholder: "Add Environment variable",
87
+ default: {},
156
88
  typeOptions: {
157
89
  multipleValues: true
158
90
  },
159
- default: {
160
- envs: []
161
- },
162
91
  options: [
163
92
  {
164
- name: "envs",
165
- displayName: "Envs",
93
+ displayName: "Source",
94
+ name: "source",
166
95
  values: [
167
96
  {
168
- displayName: "Key",
97
+ displayName: "Options",
169
98
  name: "key",
99
+ type: "options",
100
+ default: "-sources",
101
+ options: [
102
+ {
103
+ name: "Sources",
104
+ value: "-sources",
105
+ description: "Specific sources to use for discovery (-s crtsh,github). Use -ls to display all available sources. (string[])"
106
+ },
107
+ {
108
+ name: "Recursive",
109
+ value: "-recursive",
110
+ description: "Use only sources that can handle subdomains recursively (e.g. subdomain.domain.tld vs domain.tld)"
111
+ },
112
+ {
113
+ name: "All",
114
+ value: "-all",
115
+ description: "Use all sources for enumeration (slow)"
116
+ },
117
+ {
118
+ name: "Exclude Sources",
119
+ value: "-exclude-sources",
120
+ description: "Sources to exclude from enumeration (-es alienvault,zoomeye) (string[])"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ displayName: "Value",
126
+ name: "value",
170
127
  type: "string",
171
128
  default: ""
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ displayName: "Filter",
134
+ name: "filter",
135
+ values: [
136
+ {
137
+ displayName: "Options",
138
+ name: "key",
139
+ type: "options",
140
+ default: "-match",
141
+ options: [
142
+ {
143
+ name: "Match",
144
+ value: "-match",
145
+ description: "Subdomain or list of subdomain to match (file or comma-separated) (string[])"
146
+ },
147
+ {
148
+ name: "Filter",
149
+ value: "-filter",
150
+ description: "Subdomain or list of subdomain to filter (file or comma-separated) (string[])"
151
+ }
152
+ ]
172
153
  },
173
154
  {
174
155
  displayName: "Value",
@@ -177,74 +158,146 @@ class Subfinder {
177
158
  default: ""
178
159
  }
179
160
  ]
180
- }
181
- ]
182
- },
183
- {
184
- displayName: "Write Files",
185
- name: "files",
186
- type: "fixedCollection",
187
- displayOptions: {
188
- show: {
189
- advanced: [
190
- true
191
- ]
192
- }
193
- },
194
- placeholder: "Add File to write",
195
- typeOptions: {
196
- multipleValues: true
197
- },
198
- default: {
199
- files: []
200
- },
201
- options: [
161
+ },
202
162
  {
203
- name: "files",
204
- displayName: "Files",
163
+ displayName: "Rate Limit",
164
+ name: "rateLimit",
205
165
  values: [
206
166
  {
207
- displayName: "Name",
208
- name: "name",
167
+ displayName: "Options",
168
+ name: "key",
169
+ type: "options",
170
+ default: "-rate-limit",
171
+ options: [
172
+ {
173
+ name: "Rate Limit",
174
+ value: "-rate-limit",
175
+ description: "Maximum number of http requests to send per second (global) (int)"
176
+ },
177
+ {
178
+ name: "Rate Limits",
179
+ value: "-rate-limits",
180
+ description: 'Maximum number of http requests to send per second four providers in key=value format (-rls hackertarget=10/m) (default ["github=30/m", "fullhunt=60/m", "robtex=18446744073709551615/ms", "securitytrails=1/s", "shodan=1/s", "virustotal=4/m", "hackertarget=2/s", "waybackarchive=15/m", "whoisxmlapi=50/s"]) (value)'
181
+ },
182
+ {
183
+ name: "T",
184
+ value: "-t",
185
+ description: "Number of concurrent goroutines for resolving (-active only) (default 10) (int)"
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ displayName: "Value",
191
+ name: "value",
209
192
  type: "string",
210
193
  default: ""
194
+ }
195
+ ]
196
+ },
197
+ {
198
+ displayName: "Output",
199
+ name: "output",
200
+ values: [
201
+ {
202
+ displayName: "Options",
203
+ name: "key",
204
+ type: "options",
205
+ default: "-collect-sources",
206
+ options: [
207
+ {
208
+ name: "Collect Sources",
209
+ value: "-collect-sources",
210
+ description: "Include all sources in the output (-JSON only)"
211
+ },
212
+ {
213
+ name: "IP",
214
+ value: "-ip",
215
+ description: "Include host IP in output (-active only)"
216
+ }
217
+ ]
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ displayName: "Configuration",
223
+ name: "configuration",
224
+ values: [
225
+ {
226
+ displayName: "Options",
227
+ name: "key",
228
+ type: "options",
229
+ default: "-active",
230
+ options: [
231
+ {
232
+ name: "Active",
233
+ value: "-active",
234
+ description: "Display active subdomains only"
235
+ },
236
+ {
237
+ name: "Config",
238
+ value: "-config",
239
+ description: 'Flag config file (default "/root/.config/subfinder/config.yaml") (string)'
240
+ },
241
+ {
242
+ name: "Exclude IP",
243
+ value: "-exclude-ip",
244
+ description: "Exclude IPs from the list of domains"
245
+ },
246
+ {
247
+ name: "ProvIDer Config",
248
+ value: "-provider-config",
249
+ description: 'Provider config file (default "/root/.config/subfinder/provider-config.yaml") (string)'
250
+ },
251
+ {
252
+ name: "Proxy",
253
+ value: "-proxy",
254
+ description: "Http proxy to use with subfinder (string)"
255
+ },
256
+ {
257
+ name: "R",
258
+ value: "-r",
259
+ description: "Comma-separated list of resolvers to use (string[])"
260
+ },
261
+ {
262
+ name: "Rlist",
263
+ value: "-rlist",
264
+ description: "File containing list of resolvers to use (string)"
265
+ }
266
+ ]
211
267
  },
212
268
  {
213
- displayName: "Content",
214
- name: "content",
269
+ displayName: "Value",
270
+ name: "value",
215
271
  type: "string",
216
272
  default: ""
217
273
  }
218
274
  ]
219
- }
220
- ]
221
- },
222
- {
223
- displayName: "Collect Files",
224
- name: "collectFiles",
225
- type: "fixedCollection",
226
- displayOptions: {
227
- show: {
228
- advanced: [
229
- true
230
- ]
231
- }
232
- },
233
- placeholder: "Add File to collect",
234
- typeOptions: {
235
- multipleValues: true
236
- },
237
- default: {
238
- files: []
239
- },
240
- options: [
275
+ },
241
276
  {
242
- name: "files",
243
- displayName: "Files",
277
+ displayName: "Optimization",
278
+ name: "optimization",
244
279
  values: [
245
280
  {
246
- displayName: "Name",
247
- name: "name",
281
+ displayName: "Options",
282
+ name: "key",
283
+ type: "options",
284
+ default: "-timeout",
285
+ options: [
286
+ {
287
+ name: "Timeout",
288
+ value: "-timeout",
289
+ description: "Seconds to wait before timing out (default 30) (int)"
290
+ },
291
+ {
292
+ name: "Max Time",
293
+ value: "-max-time",
294
+ description: "Minutes to wait for enumeration results (default 10) (int)"
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ displayName: "Value",
300
+ name: "value",
248
301
  type: "string",
249
302
  default: ""
250
303
  }
@@ -252,7 +305,7 @@ class Subfinder {
252
305
  }
253
306
  ]
254
307
  }
255
- ]
308
+ ])
256
309
  });
257
310
  }
258
311
  }