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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "node": "n8n-nodes-soar.Httpx",
2
+ "node": "n8n-nodes-soar.httpx",
3
3
  "nodeVersion": "1.0",
4
4
  "codexVersion": "1.0",
5
5
  "categories": [
@@ -27,44 +27,22 @@ class Katana {
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
- "katana",
58
- "-silent",
59
- "-duc",
60
- ...targets.flatMap((target)=>[
61
- "-u",
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, "katana", "-list", {
31
+ extraArgs: [
32
+ "-disable-update-check",
33
+ "-jsonl",
34
+ "-silent"
35
+ ],
36
+ extraArgParameters: [
37
+ "options.configuration",
38
+ "options.headless",
39
+ "options.scope",
40
+ "options.filter",
41
+ "options.rateLimit",
42
+ "options.output"
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,192 @@ class Katana {
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: "Configuration",
94
+ name: "configuration",
166
95
  values: [
167
96
  {
168
- displayName: "Key",
97
+ displayName: "Options",
169
98
  name: "key",
99
+ type: "options",
100
+ default: "-automatic-form-fill",
101
+ options: [
102
+ {
103
+ name: "Automatic Form Fill",
104
+ value: "-automatic-form-fill",
105
+ description: "Enable automatic form filling (experimental)"
106
+ },
107
+ {
108
+ name: "Config",
109
+ value: "-config",
110
+ description: "Path to the katana configuration file (string)"
111
+ },
112
+ {
113
+ name: "Crawl Duration",
114
+ value: "-crawl-duration",
115
+ description: "Maximum duration to crawl the target for (s, m, h, d) (default s) (value)"
116
+ },
117
+ {
118
+ name: "Depth",
119
+ value: "-depth",
120
+ description: "Maximum depth to crawl (default 3) (int)"
121
+ },
122
+ {
123
+ name: "Field Config",
124
+ value: "-field-config",
125
+ description: "Path to custom field configuration file (string)"
126
+ },
127
+ {
128
+ name: "Form Config",
129
+ value: "-form-config",
130
+ description: "Path to custom form configuration file (string)"
131
+ },
132
+ {
133
+ name: "Form Extraction",
134
+ value: "-form-extraction",
135
+ description: "Extract form, input, textarea & select elements in jsonl output"
136
+ },
137
+ {
138
+ name: "Headers",
139
+ value: "-headers",
140
+ description: "Custom header/cookie to include in all http request in header:value format (file) (string[])"
141
+ },
142
+ {
143
+ name: "Ignore Query Params",
144
+ value: "-ignore-query-params",
145
+ description: "Ignore crawling same path with different query-param values"
146
+ },
147
+ {
148
+ name: "Js Crawl",
149
+ value: "-js-crawl",
150
+ description: "Enable endpoint parsing / crawling in javascript file"
151
+ },
152
+ {
153
+ name: "Jsluice",
154
+ value: "-jsluice",
155
+ description: "Enable jsluice parsing in javascript file (memory intensive)"
156
+ },
157
+ {
158
+ name: "Known Files",
159
+ value: "-known-files",
160
+ description: "Enable crawling of known files (all,robotstxt,sitemapxml) (string)"
161
+ },
162
+ {
163
+ name: "Max Response Size",
164
+ value: "-max-response-size",
165
+ description: "Maximum response size to read (default 9223372036854775807) (int)"
166
+ },
167
+ {
168
+ name: "Proxy",
169
+ value: "-proxy",
170
+ description: "Http/socks5 proxy to use (string)"
171
+ },
172
+ {
173
+ name: "Resolvers",
174
+ value: "-resolvers",
175
+ description: "List of custom resolver (file or comma-separated) (string[])"
176
+ },
177
+ {
178
+ name: "Retry",
179
+ value: "-retry",
180
+ description: "Number of times to retry the request (default 1) (int)"
181
+ },
182
+ {
183
+ name: "Strategy",
184
+ value: "-strategy",
185
+ description: 'Visit strategy (depth-first, breadth-first) (default "depth-first") (string)'
186
+ },
187
+ {
188
+ name: "Timeout",
189
+ value: "-timeout",
190
+ description: "Time to wait for request in seconds (default 10) (int)"
191
+ },
192
+ {
193
+ name: "Tls Impersonate",
194
+ value: "-tls-impersonate",
195
+ description: "Enable experimental client hello (ja3) tls randomization"
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ displayName: "Value",
201
+ name: "value",
170
202
  type: "string",
171
203
  default: ""
204
+ }
205
+ ]
206
+ },
207
+ {
208
+ displayName: "Headless",
209
+ name: "headless",
210
+ values: [
211
+ {
212
+ displayName: "Options",
213
+ name: "key",
214
+ type: "options",
215
+ default: "-chrome-data-dir",
216
+ options: [
217
+ {
218
+ name: "Chrome Data Dir",
219
+ value: "-chrome-data-dir",
220
+ description: "Path to store chrome browser data (string)"
221
+ },
222
+ {
223
+ name: "Chrome Ws URL",
224
+ value: "-chrome-ws-url",
225
+ description: "Use chrome browser instance launched elsewhere with the debugger listening at this URL (string)"
226
+ },
227
+ {
228
+ name: "Headless",
229
+ value: "-headless",
230
+ description: "Enable headless hybrid crawling (experimental)"
231
+ },
232
+ {
233
+ name: "Headless Options",
234
+ value: "-headless-options",
235
+ description: "Start headless chrome with additional options (string[])"
236
+ },
237
+ {
238
+ name: "No Incognito",
239
+ value: "-no-incognito",
240
+ description: "Start headless chrome without incognito mode"
241
+ },
242
+ {
243
+ name: "No Sandbox",
244
+ value: "-no-sandbox",
245
+ description: "Start headless chrome in --no-sandbox mode"
246
+ },
247
+ {
248
+ name: "Show Browser",
249
+ value: "-show-browser",
250
+ description: "Show the browser on the screen with headless mode"
251
+ },
252
+ {
253
+ name: "System Chrome",
254
+ value: "-system-chrome",
255
+ description: "Use local installed chrome browser instead of katana installed"
256
+ },
257
+ {
258
+ name: "System Chrome Path",
259
+ value: "-system-chrome-path",
260
+ description: "Use specified chrome browser for headless crawling (string)"
261
+ },
262
+ {
263
+ name: "Xhr Extraction",
264
+ value: "-xhr-extraction",
265
+ description: "Extract xhr request URL,method in jsonl output"
266
+ }
267
+ ]
172
268
  },
173
269
  {
174
270
  displayName: "Value",
@@ -177,82 +273,184 @@ class Katana {
177
273
  default: ""
178
274
  }
179
275
  ]
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: [
276
+ },
202
277
  {
203
- name: "files",
204
- displayName: "Files",
278
+ displayName: "Scope",
279
+ name: "scope",
205
280
  values: [
206
281
  {
207
- displayName: "Name",
208
- name: "name",
282
+ displayName: "Options",
283
+ name: "key",
284
+ type: "options",
285
+ default: "-crawl-out-scope",
286
+ options: [
287
+ {
288
+ name: "Crawl Out Scope",
289
+ value: "-crawl-out-scope",
290
+ description: "Out of scope URL regex to be excluded by crawler (string[])"
291
+ },
292
+ {
293
+ name: "Crawl Scope",
294
+ value: "-crawl-scope",
295
+ description: "In scope URL regex to be followed by crawler (string[])"
296
+ },
297
+ {
298
+ name: "Display Out Scope",
299
+ value: "-display-out-scope",
300
+ description: "Display external endpoint from scoped crawling"
301
+ },
302
+ {
303
+ name: "Field Scope",
304
+ value: "-field-scope",
305
+ description: 'Pre-defined scope field (dn,rdn,fqdn) (default "rdn") (string)'
306
+ },
307
+ {
308
+ name: "No Scope",
309
+ value: "-no-scope",
310
+ description: "Disables host based default scope"
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ displayName: "Value",
316
+ name: "value",
209
317
  type: "string",
210
318
  default: ""
319
+ }
320
+ ]
321
+ },
322
+ {
323
+ displayName: "Filter",
324
+ name: "filter",
325
+ values: [
326
+ {
327
+ displayName: "Options",
328
+ name: "key",
329
+ type: "options",
330
+ default: "-extension-filter",
331
+ options: [
332
+ {
333
+ name: "Extension Filter",
334
+ value: "-extension-filter",
335
+ description: "Filter output for given extension (eg, -ef png,css) (string[])"
336
+ },
337
+ {
338
+ name: "Extension Match",
339
+ value: "-extension-match",
340
+ description: "Match output for given extension (eg, -em php,html,js) (string[])"
341
+ },
342
+ {
343
+ name: "Field",
344
+ value: "-field",
345
+ description: "Field to display in output (URL,path,fqdn,rdn,rurl,qurl,qpath,file,ufile,key,value,kv,dir,udir) (string)"
346
+ },
347
+ {
348
+ name: "Filter Condition",
349
+ value: "-filter-condition",
350
+ description: "Filter response with dsl based condition (string)"
351
+ },
352
+ {
353
+ name: "Filter Regex",
354
+ value: "-filter-regex",
355
+ description: "Regex or list of regex to filter on output URL (cli, file) (string[])"
356
+ },
357
+ {
358
+ name: "Match Condition",
359
+ value: "-match-condition",
360
+ description: "Match response with dsl based condition (string)"
361
+ },
362
+ {
363
+ name: "Match Regex",
364
+ value: "-match-regex",
365
+ description: "Regex or list of regex to match on output URL (cli, file) (string[])"
366
+ },
367
+ {
368
+ name: "Store Field",
369
+ value: "-store-field",
370
+ description: "Field to store in per-host output (URL,path,fqdn,rdn,rurl,qurl,qpath,file,ufile,key,value,kv,dir,udir) (string)"
371
+ }
372
+ ]
211
373
  },
212
374
  {
213
- displayName: "Content",
214
- name: "content",
375
+ displayName: "Value",
376
+ name: "value",
215
377
  type: "string",
216
378
  default: ""
217
379
  }
218
380
  ]
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: [
381
+ },
241
382
  {
242
- name: "files",
243
- displayName: "Files",
383
+ displayName: "Rate Limit",
384
+ name: "rateLimit",
244
385
  values: [
245
386
  {
246
- displayName: "Name",
247
- name: "name",
387
+ displayName: "Options",
388
+ name: "key",
389
+ type: "options",
390
+ default: "-concurrency",
391
+ options: [
392
+ {
393
+ name: "Concurrency",
394
+ value: "-concurrency",
395
+ description: "Number of concurrent fetchers to use (default 10) (int)"
396
+ },
397
+ {
398
+ name: "Delay",
399
+ value: "-delay",
400
+ description: "Request delay between each request in seconds (int)"
401
+ },
402
+ {
403
+ name: "Parallelism",
404
+ value: "-parallelism",
405
+ description: "Number of concurrent inputs to process (default 10) (int)"
406
+ },
407
+ {
408
+ name: "Rate Limit",
409
+ value: "-rate-limit",
410
+ description: "Maximum requests to send per second (default 150) (int)"
411
+ },
412
+ {
413
+ name: "Rate Limit Minute",
414
+ value: "-rate-limit-minute",
415
+ description: "Maximum number of requests to send per minute (int)"
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ displayName: "Value",
421
+ name: "value",
248
422
  type: "string",
249
423
  default: ""
250
424
  }
251
425
  ]
426
+ },
427
+ {
428
+ displayName: "Output",
429
+ name: "output",
430
+ values: [
431
+ {
432
+ displayName: "Options",
433
+ name: "key",
434
+ type: "options",
435
+ default: "-omit-raw",
436
+ options: [
437
+ {
438
+ name: "Omit Raw",
439
+ value: "-omit-raw",
440
+ description: "Omit raw requests/responses from jsonl output"
441
+ },
442
+ {
443
+ name: "Omit Body",
444
+ value: "-omit-body",
445
+ description: "Omit response body from jsonl output"
446
+ }
447
+ ]
448
+ }
449
+ ]
252
450
  }
253
451
  ]
254
452
  }
255
- ]
453
+ ])
256
454
  });
257
455
  }
258
456
  }
@@ -6,4 +6,4 @@
6
6
  "Development",
7
7
  "Container"
8
8
  ]
9
- }
9
+ }