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.
@@ -27,44 +27,26 @@ class Httpx {
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
- "httpx",
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, "httpx", "-target", {
31
+ extraArgs: [
32
+ "-disable-update-check",
33
+ "-json",
34
+ "-silent"
35
+ ],
36
+ extraArgParameters: [
37
+ "options.probes",
38
+ "options.headless",
39
+ "options.matchers",
40
+ "options.extractor",
41
+ "options.filters",
42
+ "options.rateLimit",
43
+ "options.miscellaneous",
44
+ "options.output",
45
+ "options.configurations",
46
+ "options.optimizations"
47
+ ]
48
+ });
49
+ 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
50
  itemData: {
69
51
  item: idx
70
52
  }
@@ -101,74 +83,221 @@ class Httpx {
101
83
  name: "kubernetesCredentialsApi"
102
84
  }
103
85
  ],
104
- properties: [
86
+ properties: (0, _executor.injectCommonProperties)([
105
87
  {
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",
88
+ displayName: "Options",
89
+ name: "options",
147
90
  type: "fixedCollection",
148
- displayOptions: {
149
- show: {
150
- advanced: [
151
- true
152
- ]
153
- }
154
- },
155
- placeholder: "Add Environment variable",
91
+ default: {},
156
92
  typeOptions: {
157
93
  multipleValues: true
158
94
  },
159
- default: {
160
- envs: []
161
- },
162
95
  options: [
163
96
  {
164
- name: "envs",
165
- displayName: "Envs",
97
+ displayName: "Probes",
98
+ name: "probes",
166
99
  values: [
167
100
  {
168
- displayName: "Key",
101
+ displayName: "Options",
169
102
  name: "key",
103
+ type: "options",
104
+ default: "-asn",
105
+ options: [
106
+ {
107
+ name: "Asn",
108
+ value: "-asn",
109
+ description: "Display host asn information"
110
+ },
111
+ {
112
+ name: "CDN",
113
+ value: "-cdn",
114
+ description: "Display cdn in use"
115
+ },
116
+ {
117
+ name: "Cname",
118
+ value: "-cname",
119
+ description: "Display host cname"
120
+ },
121
+ {
122
+ name: "Content Length",
123
+ value: "-content-length",
124
+ description: "Display response content-length"
125
+ },
126
+ {
127
+ name: "Content Type",
128
+ value: "-content-type",
129
+ description: "Display response content-type"
130
+ },
131
+ {
132
+ name: "Favicon",
133
+ value: "-favicon",
134
+ description: "Display mmh3 hash for '/favicon.ico' file"
135
+ },
136
+ {
137
+ name: "Hash",
138
+ value: "-hash",
139
+ description: "Display response body hash (supported: md5,mmh3,simhash,sha1,sha256,sha512) (string)"
140
+ },
141
+ {
142
+ name: "IP",
143
+ value: "-ip",
144
+ description: "Display host ip"
145
+ },
146
+ {
147
+ name: "Jarm",
148
+ value: "-jarm",
149
+ description: "Display jarm fingerprint hash"
150
+ },
151
+ {
152
+ name: "Line Count",
153
+ value: "-line-count",
154
+ description: "Display response body line count"
155
+ },
156
+ {
157
+ name: "Location",
158
+ value: "-location",
159
+ description: "Display response redirect location"
160
+ },
161
+ {
162
+ name: "Method",
163
+ value: "-method",
164
+ description: "Display http request method"
165
+ },
166
+ {
167
+ name: "Probe",
168
+ value: "-probe",
169
+ description: "Display probe status"
170
+ },
171
+ {
172
+ name: "Response Time",
173
+ value: "-response-time",
174
+ description: "Display response time"
175
+ },
176
+ {
177
+ name: "Status Code",
178
+ value: "-status-code",
179
+ description: "Display response status-code"
180
+ },
181
+ {
182
+ name: "Tech Detect",
183
+ value: "-tech-detect",
184
+ description: "Display technology in use based on wappalyzer dataset"
185
+ },
186
+ {
187
+ name: "Title",
188
+ value: "-title",
189
+ description: "Display page title"
190
+ },
191
+ {
192
+ name: "Web Server",
193
+ value: "-web-server",
194
+ description: "Display server name"
195
+ },
196
+ {
197
+ name: "Websocket",
198
+ value: "-websocket",
199
+ description: "Display server using websocket"
200
+ },
201
+ {
202
+ name: "Word Count",
203
+ value: "-word-count",
204
+ description: "Display response body word count"
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ displayName: "Value",
210
+ name: "value",
170
211
  type: "string",
171
212
  default: ""
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ displayName: "Headless",
218
+ name: "headless",
219
+ values: [
220
+ {
221
+ displayName: "Options",
222
+ name: "key",
223
+ type: "options",
224
+ default: "-screenshot",
225
+ options: [
226
+ {
227
+ name: "Screenshot",
228
+ value: "-screenshot",
229
+ description: "Enable saving screenshot of the page using headless browser"
230
+ },
231
+ {
232
+ name: "System Chrome",
233
+ value: "-system-chrome",
234
+ description: "Enable using local installed chrome for screenshot"
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ displayName: "Matchers",
242
+ name: "matchers",
243
+ values: [
244
+ {
245
+ displayName: "Options",
246
+ name: "key",
247
+ type: "options",
248
+ default: "-match-cdn",
249
+ options: [
250
+ {
251
+ name: "Match CDN",
252
+ value: "-match-cdn",
253
+ description: "Match host with specified cdn provider (stackpath, cloudfront, fastly, google, leaseweb) (string[])"
254
+ },
255
+ {
256
+ name: "Match Code",
257
+ value: "-match-code",
258
+ description: "Match response with specified status code (-mc 200,302) (string)"
259
+ },
260
+ {
261
+ name: "Match Condition",
262
+ value: "-match-condition",
263
+ description: "Match response with dsl expression condition (string)"
264
+ },
265
+ {
266
+ name: "Match Favicon",
267
+ value: "-match-favicon",
268
+ description: "Match response with specified favicon hash (-mfc 1494302000) (string[])"
269
+ },
270
+ {
271
+ name: "Match Length",
272
+ value: "-match-length",
273
+ description: "Match response with specified content length (-ml 100,102) (string)"
274
+ },
275
+ {
276
+ name: "Match Line Count",
277
+ value: "-match-line-count",
278
+ description: "Match response body with specified line count (-mlc 423,532) (string)"
279
+ },
280
+ {
281
+ name: "Match Regex",
282
+ value: "-match-regex",
283
+ description: "Match response with specified regex (-mr admin) (string)"
284
+ },
285
+ {
286
+ name: "Match Response Time",
287
+ value: "-match-response-time",
288
+ description: "Match response with specified response time in seconds (-mrt '< 1') (string)"
289
+ },
290
+ {
291
+ name: "Match String",
292
+ value: "-match-string",
293
+ description: "Match response with specified string (-ms admin) (string)"
294
+ },
295
+ {
296
+ name: "Match Word Count",
297
+ value: "-match-word-count",
298
+ description: "Match response body with specified word count (-mwc 43,55) (string)"
299
+ }
300
+ ]
172
301
  },
173
302
  {
174
303
  displayName: "Value",
@@ -177,74 +306,441 @@ class Httpx {
177
306
  default: ""
178
307
  }
179
308
  ]
180
- }
181
- ]
182
- },
183
- {
184
- displayName: "Write Files",
185
- name: "files",
186
- type: "fixedCollection",
187
- displayOptions: {
188
- show: {
189
- advanced: [
190
- true
309
+ },
310
+ {
311
+ displayName: "Extractor",
312
+ name: "extractor",
313
+ values: [
314
+ {
315
+ displayName: "Options",
316
+ name: "key",
317
+ type: "options",
318
+ default: "-extract-regex",
319
+ options: [
320
+ {
321
+ name: "Extract Regex",
322
+ value: "-extract-regex",
323
+ description: "Display response content with matched regex (string[])"
324
+ },
325
+ {
326
+ name: "Extract Preset",
327
+ value: "-extract-preset",
328
+ description: "Display response content matched by a pre-defined regex (ipv4,mail,URL) (string[])"
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ displayName: "Value",
334
+ name: "value",
335
+ type: "string",
336
+ default: ""
337
+ }
191
338
  ]
192
- }
193
- },
194
- placeholder: "Add File to write",
195
- typeOptions: {
196
- multipleValues: true
197
- },
198
- default: {
199
- files: []
200
- },
201
- options: [
339
+ },
340
+ {
341
+ displayName: "Filters",
342
+ name: "filters",
343
+ values: [
344
+ {
345
+ displayName: "Options",
346
+ name: "key",
347
+ type: "options",
348
+ default: "-filter-cdn",
349
+ options: [
350
+ {
351
+ name: "Filter CDN",
352
+ value: "-filter-cdn",
353
+ description: "Filter host with specified cdn provider (stackpath, cloudfront, fastly, google, leaseweb) (string[])"
354
+ },
355
+ {
356
+ name: "Filter Code",
357
+ value: "-filter-code",
358
+ description: "Filter response with specified status code (-fc 403,401) (string)"
359
+ },
360
+ {
361
+ name: "Filter Condition",
362
+ value: "-filter-condition",
363
+ description: "Filter response with dsl expression condition (string)"
364
+ },
365
+ {
366
+ name: "Filter Error Page",
367
+ value: "-filter-error-page",
368
+ description: "Filter response with ML based error page detection"
369
+ },
370
+ {
371
+ name: "Filter Favicon",
372
+ value: "-filter-favicon",
373
+ description: "Filter response with specified favicon hash (-mfc 1494302000) (string[])"
374
+ },
375
+ {
376
+ name: "Filter Length",
377
+ value: "-filter-length",
378
+ description: "Filter response with specified content length (-fl 23,33) (string)"
379
+ },
380
+ {
381
+ name: "Filter Line Count",
382
+ value: "-filter-line-count",
383
+ description: "Filter response body with specified line count (-flc 423,532) (string)"
384
+ },
385
+ {
386
+ name: "Filter Regex",
387
+ value: "-filter-regex",
388
+ description: "Filter response with specified regex (-fe admin) (string)"
389
+ },
390
+ {
391
+ name: "Filter Response Time",
392
+ value: "-filter-response-time",
393
+ description: "Filter response with specified response time in seconds (-frt '> 1') (string)"
394
+ },
395
+ {
396
+ name: "Filter String",
397
+ value: "-filter-string",
398
+ description: "Filter response with specified string (-fs admin) (string)"
399
+ },
400
+ {
401
+ name: "Filter Word Count",
402
+ value: "-filter-word-count",
403
+ description: "Filter response body with specified word count (-fwc 423,532) (string)"
404
+ }
405
+ ]
406
+ },
407
+ {
408
+ displayName: "Value",
409
+ name: "value",
410
+ type: "string",
411
+ default: ""
412
+ }
413
+ ]
414
+ },
202
415
  {
203
- name: "files",
204
- displayName: "Files",
416
+ displayName: "Rate Limit",
417
+ name: "rateLimit",
205
418
  values: [
206
419
  {
207
- displayName: "Name",
208
- name: "name",
420
+ displayName: "Options",
421
+ name: "key",
422
+ type: "options",
423
+ default: "-threads",
424
+ options: [
425
+ {
426
+ name: "Threads",
427
+ value: "-threads",
428
+ description: "Number of threads to use (default 50) (int)"
429
+ },
430
+ {
431
+ name: "Rate Limit",
432
+ value: "-rate-limit",
433
+ description: "Maximum requests to send per second (default 150) (int)"
434
+ },
435
+ {
436
+ name: "Rate Limit Minute",
437
+ value: "-rate-limit-minute",
438
+ description: "Maximum number of requests to send per minute (int)"
439
+ }
440
+ ]
441
+ },
442
+ {
443
+ displayName: "Value",
444
+ name: "value",
209
445
  type: "string",
210
446
  default: ""
447
+ }
448
+ ]
449
+ },
450
+ {
451
+ displayName: "Miscellaneous",
452
+ name: "miscellaneous",
453
+ values: [
454
+ {
455
+ displayName: "Options",
456
+ name: "key",
457
+ type: "options",
458
+ default: "-csp-probe",
459
+ options: [
460
+ {
461
+ name: "Csp Probe",
462
+ value: "-csp-probe",
463
+ description: "Send http probes on the extracted CSP domains"
464
+ },
465
+ {
466
+ name: "Http2",
467
+ value: "-http2",
468
+ description: "Probe and display server supporting HTTP2"
469
+ },
470
+ {
471
+ name: "List Dsl Variables",
472
+ value: "-list-dsl-variables",
473
+ description: "List JSON output field keys name that support dsl matcher/filter"
474
+ },
475
+ {
476
+ name: "Path",
477
+ value: "-path",
478
+ description: "Path or list of paths to probe (comma-separated, file) (string)"
479
+ },
480
+ {
481
+ name: "PIPeline",
482
+ value: "-pipeline",
483
+ description: "Probe and display server supporting HTTP1.1 pipeline"
484
+ },
485
+ {
486
+ name: "Ports",
487
+ value: "-ports",
488
+ description: "Ports to probe (nmap syntax: eg http:1,2-10,11,https:80) (string[])"
489
+ },
490
+ {
491
+ name: "Probe All IPs",
492
+ value: "-probe-all-ips",
493
+ description: "Probe all the ips associated with same host"
494
+ },
495
+ {
496
+ name: "Tls Grab",
497
+ value: "-tls-grab",
498
+ description: "Perform TLS(SSL) data grabbing"
499
+ },
500
+ {
501
+ name: "Tls Probe",
502
+ value: "-tls-probe",
503
+ description: "Send http probes on the extracted TLS domains (dns_name)"
504
+ },
505
+ {
506
+ name: "Vhost",
507
+ value: "-vhost",
508
+ description: "Probe and display server supporting VHOST"
509
+ }
510
+ ]
211
511
  },
212
512
  {
213
- displayName: "Content",
214
- name: "content",
513
+ displayName: "Value",
514
+ name: "value",
215
515
  type: "string",
216
516
  default: ""
217
517
  }
218
518
  ]
219
- }
220
- ]
221
- },
222
- {
223
- displayName: "Collect Files",
224
- name: "collectFiles",
225
- type: "fixedCollection",
226
- displayOptions: {
227
- show: {
228
- advanced: [
229
- true
519
+ },
520
+ {
521
+ displayName: "Output",
522
+ name: "output",
523
+ values: [
524
+ {
525
+ displayName: "Options",
526
+ name: "key",
527
+ type: "options",
528
+ default: "-include-response",
529
+ options: [
530
+ {
531
+ name: "Include Response",
532
+ value: "-include-response",
533
+ description: "Include http request/response in JSON output (-JSON only)"
534
+ },
535
+ {
536
+ name: "Include Response Base64",
537
+ value: "-include-response-base64",
538
+ description: "Include base64 encoded http request/response in JSON output (-JSON only)"
539
+ },
540
+ {
541
+ name: "Include Chain",
542
+ value: "-include-chain",
543
+ description: "Include redirect http chain in JSON output (-JSON only)"
544
+ }
545
+ ]
546
+ }
230
547
  ]
231
- }
232
- },
233
- placeholder: "Add File to collect",
234
- typeOptions: {
235
- multipleValues: true
236
- },
237
- default: {
238
- files: []
239
- },
240
- options: [
548
+ },
549
+ {
550
+ displayName: "Configurations",
551
+ name: "configurations",
552
+ values: [
553
+ {
554
+ displayName: "Options",
555
+ name: "key",
556
+ type: "options",
557
+ default: "-allow",
558
+ options: [
559
+ {
560
+ name: "Allow",
561
+ value: "-allow",
562
+ description: "Allowed list of IP/CIDR's to process (file or comma-separated) (string[])"
563
+ },
564
+ {
565
+ name: "Body",
566
+ value: "-body",
567
+ description: "Post body to include in http request (string)"
568
+ },
569
+ {
570
+ name: "Config",
571
+ value: "-config",
572
+ description: "Path to the httpx configuration file (default $HOME/.config/httpx/config.yaml) (string)"
573
+ },
574
+ {
575
+ name: "Deny",
576
+ value: "-deny",
577
+ description: "Denied list of IP/CIDR's to process (file or comma-separated) (string[])"
578
+ },
579
+ {
580
+ name: "Follow Host Redirects",
581
+ value: "-follow-host-redirects",
582
+ description: "Follow redirects on the same host"
583
+ },
584
+ {
585
+ name: "Follow Redirects",
586
+ value: "-follow-redirects",
587
+ description: "Follow http redirects"
588
+ },
589
+ {
590
+ name: "Header",
591
+ value: "-header",
592
+ description: "Custom http headers to send with request (string[])"
593
+ },
594
+ {
595
+ name: "Http Proxy",
596
+ value: "-http-proxy",
597
+ description: "Http proxy to use (eg http://127.0.0.1:8080) (string)"
598
+ },
599
+ {
600
+ name: "Leave Default Ports",
601
+ value: "-leave-default-ports",
602
+ description: "Leave default http/https ports in host header (eg. http://host:80 - https://host:443."
603
+ },
604
+ {
605
+ name: "Max Redirects",
606
+ value: "-max-redirects",
607
+ description: "Max number of redirects to follow per host (default 10) (int)"
608
+ },
609
+ {
610
+ name: "No Decode",
611
+ value: "-no-decode",
612
+ description: "Avoid decoding body"
613
+ },
614
+ {
615
+ name: "No Stdin",
616
+ value: "-no-stdin",
617
+ description: "Disable Stdin processing"
618
+ },
619
+ {
620
+ name: "Random Agent",
621
+ value: "-random-agent",
622
+ description: "Enable Random User-Agent to use (default true)"
623
+ },
624
+ {
625
+ name: "Resolvers",
626
+ value: "-resolvers",
627
+ description: "List of custom resolver (file or comma-separated) (string[])"
628
+ },
629
+ {
630
+ name: "Resume",
631
+ value: "-resume",
632
+ description: "Resume scan using resume.cfg"
633
+ },
634
+ {
635
+ name: "SkIP Dedupe",
636
+ value: "-skip-dedupe",
637
+ description: "Disable dedupe input items (only used with stream mode)"
638
+ },
639
+ {
640
+ name: "Sni Name",
641
+ value: "-sni-name",
642
+ description: "Custom TLS SNI name (string)"
643
+ },
644
+ {
645
+ name: "Stream",
646
+ value: "-stream",
647
+ description: "Stream mode - start elaborating input targets without sorting"
648
+ },
649
+ {
650
+ name: "Tls Impersonate",
651
+ value: "-tls-impersonate",
652
+ description: "Enable experimental client hello (ja3) tls randomization"
653
+ },
654
+ {
655
+ name: "Unsafe",
656
+ value: "-unsafe",
657
+ description: "Send raw requests skipping golang normalization"
658
+ },
659
+ {
660
+ name: "Vhost Input",
661
+ value: "-vhost-input",
662
+ description: "Get a list of vhosts as input"
663
+ },
664
+ {
665
+ name: "X",
666
+ value: "-x",
667
+ description: "Request methods to probe, use 'all' to probe all HTTP methods (string)"
668
+ },
669
+ {
670
+ name: "Ztls",
671
+ value: "-ztls",
672
+ description: "Use ztls library with autofallback to standard one for tls13"
673
+ }
674
+ ]
675
+ },
676
+ {
677
+ displayName: "Value",
678
+ name: "value",
679
+ type: "string",
680
+ default: ""
681
+ }
682
+ ]
683
+ },
241
684
  {
242
- name: "files",
243
- displayName: "Files",
685
+ displayName: "Optimizations",
686
+ name: "optimizations",
244
687
  values: [
245
688
  {
246
- displayName: "Name",
247
- name: "name",
689
+ displayName: "Options",
690
+ name: "key",
691
+ type: "options",
692
+ default: "-delay",
693
+ options: [
694
+ {
695
+ name: "Delay",
696
+ value: "-delay",
697
+ description: "Duration between each http request (eg: 200ms, 1s) (default -1ns) (value)"
698
+ },
699
+ {
700
+ name: "Exclude CDN",
701
+ value: "-exclude-cdn",
702
+ description: "Skip full port scans for CDNs (only checks for 80,443)"
703
+ },
704
+ {
705
+ name: "Max Host Error",
706
+ value: "-max-host-error",
707
+ description: "Max error count per host before skipping remaining path/s (default 30) (int)"
708
+ },
709
+ {
710
+ name: "No Fallback",
711
+ value: "-no-fallback",
712
+ description: "Display both probed protocol (HTTPS and HTTP)"
713
+ },
714
+ {
715
+ name: "No Fallback Scheme",
716
+ value: "-no-fallback-scheme",
717
+ description: "Probe with protocol scheme specified in input"
718
+ },
719
+ {
720
+ name: "Response Size To Read",
721
+ value: "-response-size-to-read",
722
+ description: "Max response size to read in bytes (default 2147483647) (int)"
723
+ },
724
+ {
725
+ name: "Response Size To Save",
726
+ value: "-response-size-to-save",
727
+ description: "Max response size to save in bytes (default 2147483647) (int)"
728
+ },
729
+ {
730
+ name: "Retries",
731
+ value: "-retries",
732
+ description: "Number of retries (int)"
733
+ },
734
+ {
735
+ name: "Timeout",
736
+ value: "-timeout",
737
+ description: "Timeout in seconds (default 10) (int)"
738
+ }
739
+ ]
740
+ },
741
+ {
742
+ displayName: "Value",
743
+ name: "value",
248
744
  type: "string",
249
745
  default: ""
250
746
  }
@@ -252,7 +748,7 @@ class Httpx {
252
748
  }
253
749
  ]
254
750
  }
255
- ]
751
+ ])
256
752
  });
257
753
  }
258
754
  }