n8n-nodes-soar 0.1.16 → 0.1.18

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.
Files changed (57) hide show
  1. package/dist/common/asset.js +141 -0
  2. package/dist/common/collector.js +32 -0
  3. package/dist/common/connectionType.js +15 -0
  4. package/dist/common/executor/docker.executor.js +97 -0
  5. package/dist/common/executor/executor.js +48 -0
  6. package/dist/common/executor/k8s.executor.js +190 -0
  7. package/dist/common/runner/container.runner.js +174 -0
  8. package/dist/common/runner/priority.js +44 -0
  9. package/dist/common/runner/priority.runner.js +38 -0
  10. package/dist/common/runner/runner.js +57 -0
  11. package/dist/credentials/Docker/Docker.credentials.js +149 -0
  12. package/dist/credentials/Docker/docker.svg +7 -0
  13. package/dist/credentials/{FofaCredentials.credentials.js → FofaApi/FofaApi.credentials.js} +5 -5
  14. package/dist/credentials/Kubernetes/Kubernetes.credentials.js +82 -0
  15. package/dist/credentials/Kubernetes/k8s.svg +1 -0
  16. package/dist/nodes/Asset/SplitAsset/SplitAsset.node.js +110 -0
  17. package/dist/nodes/Asset/SplitAsset/split.svg +13 -0
  18. package/dist/nodes/Collector/Collector.node.js +123 -0
  19. package/dist/nodes/Executor/DockerExecutor/DockerExecutor.node.js +59 -0
  20. package/dist/nodes/Executor/DockerExecutor/docker.svg +7 -0
  21. package/dist/nodes/Executor/KubernetesExecutor/KubernetesExecutor.node.js +59 -0
  22. package/dist/nodes/Executor/KubernetesExecutor/k8s.svg +1 -0
  23. package/dist/nodes/Fofa/Fofa.node.js +20 -7
  24. package/dist/nodes/Katana/Katana.node.js +1 -1
  25. package/dist/nodes/Nuclei/Nuclei.node.js +1 -1
  26. package/dist/nodes/Runner/Dns/Dns.node.js +199 -0
  27. package/dist/nodes/Runner/Dns/script.js +81 -0
  28. package/dist/nodes/Runner/Httpx/Httpx.node.js +830 -0
  29. package/dist/nodes/Runner/Httpx/httpx.svg +3 -0
  30. package/dist/nodes/Runner/Katana/Katana.node.js +521 -0
  31. package/dist/nodes/Runner/Katana/a.json +30 -0
  32. package/dist/nodes/Runner/Katana/katana.svg +3 -0
  33. package/dist/nodes/Runner/Masscan/Masscan.node.js +151 -0
  34. package/dist/nodes/Runner/Masscan/masscan.svg +70 -0
  35. package/dist/nodes/{Naabu → Runner/Naabu}/Naabu.node.js +86 -48
  36. package/dist/nodes/Runner/Naabu/naabu.svg +3 -0
  37. package/dist/nodes/Runner/Nuclei/Nuclei.node.js +1057 -0
  38. package/dist/nodes/Runner/Nuclei/a.json +48 -0
  39. package/dist/nodes/Runner/Nuclei/nuclei.svg +3 -0
  40. package/dist/nodes/Runner/Priority/Priority.node.js +110 -0
  41. package/dist/nodes/Runner/PriorityAdd/PriorityAdd.node.js +97 -0
  42. package/dist/nodes/Runner/Router/SwitchRouter/SwitchRouter.node.js +101 -0
  43. package/dist/nodes/{Subfinder → Runner/Subfinder}/Subfinder.node.js +74 -43
  44. package/dist/nodes/Runner/Subfinder/subfinder.svg +3 -0
  45. package/dist/nodes/Runner/Unauthor/Unauthor.node.js +169 -0
  46. package/package.json +63 -59
  47. package/dist/nodes/Cdncheck/Cdncheck.node.json +0 -9
  48. package/dist/nodes/Fofa/Fofa.node.json +0 -9
  49. package/dist/nodes/Httpx/Httpx.node.json +0 -9
  50. package/dist/nodes/Naabu/Naabu.node.json +0 -9
  51. package/dist/nodes/Subfinder/Subfinder.node.json +0 -9
  52. package/dist/utils/executor.js +0 -233
  53. package/dist/utils/interface.js +0 -4
  54. package/dist/utils/runner/docker.runner.js +0 -72
  55. package/dist/utils/runner/k8s.runner.js +0 -167
  56. package/dist/utils/runner/runner.js +0 -11
  57. /package/dist/credentials/{fofa.svg → FofaApi/fofa.svg} +0 -0
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "DockerExecutor", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return DockerExecutor;
9
+ }
10
+ });
11
+ const _connectionType = require("../../../common/connectionType");
12
+ const _dockerexecutor = require("../../../common/executor/docker.executor");
13
+ function _define_property(obj, key, value) {
14
+ if (key in obj) {
15
+ Object.defineProperty(obj, key, {
16
+ value: value,
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true
20
+ });
21
+ } else {
22
+ obj[key] = value;
23
+ }
24
+ return obj;
25
+ }
26
+ class DockerExecutor {
27
+ async supplyData(itemIndex) {
28
+ return {
29
+ response: new _dockerexecutor.DockerExecutor(await this.getCredentials("dockerApi", itemIndex), this)
30
+ };
31
+ }
32
+ constructor(){
33
+ _define_property(this, "description", {
34
+ displayName: "Docker Executor",
35
+ name: "dockerExecutor",
36
+ icon: "file:docker.svg",
37
+ group: [
38
+ "transform"
39
+ ],
40
+ version: 1,
41
+ description: "Execute with Docker",
42
+ defaults: {
43
+ name: "Docker"
44
+ },
45
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
46
+ inputs: [],
47
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
48
+ outputs: [
49
+ _connectionType.NodeConnectionType.Executor
50
+ ],
51
+ credentials: [
52
+ {
53
+ name: "dockerApi"
54
+ }
55
+ ],
56
+ properties: []
57
+ });
58
+ }
59
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg xmlns="http://www.w3.org/2000/svg"
3
+ aria-label="Docker" role="img"
4
+ viewBox="0 0 512 512"><rect
5
+ width="512" height="512"
6
+ rx="15%"
7
+ fill="#ffffff"/><path stroke="#066da5" stroke-width="38" d="M296 226h42m-92 0h42m-91 0h42m-91 0h41m-91 0h42m8-46h41m8 0h42m7 0h42m-42-46h42"/><path fill="#066da5" d="m472 228s-18-17-55-11c-4-29-35-46-35-46s-29 35-8 74c-6 3-16 7-31 7H68c-5 19-5 145 133 145 99 0 173-46 208-130 52 4 63-39 63-39"/></svg>
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "KubernetesExecutor", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return KubernetesExecutor;
9
+ }
10
+ });
11
+ const _connectionType = require("../../../common/connectionType");
12
+ const _k8sexecutor = require("../../../common/executor/k8s.executor");
13
+ function _define_property(obj, key, value) {
14
+ if (key in obj) {
15
+ Object.defineProperty(obj, key, {
16
+ value: value,
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true
20
+ });
21
+ } else {
22
+ obj[key] = value;
23
+ }
24
+ return obj;
25
+ }
26
+ class KubernetesExecutor {
27
+ async supplyData(itemIndex) {
28
+ return {
29
+ response: new _k8sexecutor.K8sExecutor(await this.getCredentials("kubernetesApi", itemIndex), this)
30
+ };
31
+ }
32
+ constructor(){
33
+ _define_property(this, "description", {
34
+ displayName: "Kubernetes Executor",
35
+ name: "kubernetesExecutor",
36
+ icon: "file:k8s.svg",
37
+ group: [
38
+ "transform"
39
+ ],
40
+ version: 1,
41
+ description: "Execute with Kubernetes",
42
+ defaults: {
43
+ name: "Kubernetes"
44
+ },
45
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
46
+ inputs: [],
47
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
48
+ outputs: [
49
+ _connectionType.NodeConnectionType.Executor
50
+ ],
51
+ credentials: [
52
+ {
53
+ name: "kubernetesApi"
54
+ }
55
+ ],
56
+ properties: []
57
+ });
58
+ }
59
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="-0.17 0.08 230.10 223.35"><defs><style>.cls-1{fill:#fff}.cls-2{fill:#326ce5}</style></defs><path d="M134.358 126.466a3.59 3.59 0 0 0-.855-.065 3.685 3.685 0 0 0-1.425.37 3.725 3.725 0 0 0-1.803 4.825l-.026.037 8.528 20.603a43.53 43.53 0 0 0 17.595-22.102l-21.976-3.714zm-34.194 2.92a3.72 3.72 0 0 0-3.568-2.894 3.656 3.656 0 0 0-.733.065l-.037-.045-21.785 3.698a43.695 43.695 0 0 0 17.54 21.946l8.442-20.4-.066-.08a3.683 3.683 0 0 0 .207-2.29zm18.245 8a3.718 3.718 0 0 0-6.557.008h-.018l-10.713 19.372a43.637 43.637 0 0 0 23.815 1.225q2.197-.5 4.292-1.2l-10.738-19.406zm33.914-45l-16.483 14.753.009.047a3.725 3.725 0 0 0 1.46 6.395l.02.089 21.35 6.15a44.278 44.278 0 0 0-6.356-27.432zM121.7 94.039a3.725 3.725 0 0 0 5.913 2.84l.065.027 18.036-12.788a43.85 43.85 0 0 0-25.287-12.19l1.253 22.105zm-19.1 2.921a3.72 3.72 0 0 0 5.904-2.85l.092-.043 1.253-22.14a44.682 44.682 0 0 0-4.501.776 43.467 43.467 0 0 0-20.937 11.409l18.154 12.869zm-9.678 16.729a3.72 3.72 0 0 0 1.462-6.396l.018-.088-16.574-14.824a43.454 43.454 0 0 0-6.168 27.51l21.245-6.13zm16.098 6.512l6.114 2.94 6.096-2.934 1.514-6.581-4.219-5.276h-6.79l-4.231 5.268z" class="cls-2"/><path d="M216.208 133.167l-17.422-75.675a13.602 13.602 0 0 0-7.293-9.073l-70.521-33.67a13.589 13.589 0 0 0-11.705 0L38.76 48.437a13.598 13.598 0 0 0-7.295 9.072l-17.394 75.673a13.315 13.315 0 0 0-.004 5.81 13.506 13.506 0 0 0 .491 1.718 13.1 13.1 0 0 0 1.343 2.726c.239.365.491.72.765 1.064l48.804 60.678c.213.264.448.505.681.75a13.423 13.423 0 0 0 2.574 2.133 13.924 13.924 0 0 0 3.857 1.677 13.298 13.298 0 0 0 3.43.473h.759l77.504-.018a12.993 12.993 0 0 0 1.41-.083 13.47 13.47 0 0 0 1.989-.378 13.872 13.872 0 0 0 1.381-.442c.353-.135.705-.27 1.045-.433a13.941 13.941 0 0 0 1.479-.822 13.303 13.303 0 0 0 3.237-2.865l1.488-1.85 47.299-58.84a13.185 13.185 0 0 0 2.108-3.785 13.67 13.67 0 0 0 .5-1.724 13.282 13.282 0 0 0-.004-5.81zm-73.147 29.432a14.516 14.516 0 0 0 .703 1.703 3.314 3.314 0 0 0-.327 2.49 39.372 39.372 0 0 0 3.742 6.7 35.06 35.06 0 0 1 2.263 3.364c.17.315.392.803.553 1.136a4.24 4.24 0 1 1-7.63 3.607c-.161-.33-.385-.77-.522-1.082a35.275 35.275 0 0 1-1.225-3.868 39.305 39.305 0 0 0-2.896-7.097 3.335 3.335 0 0 0-2.154-1.307c-.135-.233-.635-1.15-.903-1.623a54.617 54.617 0 0 1-38.948-.1l-.955 1.73a3.429 3.429 0 0 0-1.819.887 29.517 29.517 0 0 0-3.268 7.582 34.9 34.9 0 0 1-1.218 3.868c-.135.31-.361.744-.522 1.073v.009l-.007.008a4.238 4.238 0 1 1-7.619-3.616c.159-.335.372-.82.54-1.135a35.177 35.177 0 0 1 2.262-3.373 41.228 41.228 0 0 0 3.82-6.866 4.188 4.188 0 0 0-.376-2.387l.768-1.84a54.922 54.922 0 0 1-24.338-30.387l-1.839.313a4.68 4.68 0 0 0-2.428-.855 39.524 39.524 0 0 0-7.356 2.165 35.589 35.589 0 0 1-3.787 1.45c-.305.084-.745.168-1.093.244-.028.01-.052.022-.08.029a.605.605 0 0 1-.065.006 4.236 4.236 0 1 1-1.874-8.224l.061-.015.037-.01c.353-.083.805-.2 1.127-.262a35.27 35.27 0 0 1 4.05-.326 39.388 39.388 0 0 0 7.564-1.242 5.835 5.835 0 0 0 1.814-1.83l1.767-.516a54.613 54.613 0 0 1 8.613-38.073l-1.353-1.206a4.688 4.688 0 0 0-.848-2.436 39.366 39.366 0 0 0-6.277-4.41 35.25 35.25 0 0 1-3.499-2.046c-.256-.191-.596-.478-.874-.704l-.063-.044a4.473 4.473 0 0 1-1.038-6.222 4.066 4.066 0 0 1 3.363-1.488 5.03 5.03 0 0 1 2.942 1.11c.287.225.68.526.935.745a35.253 35.253 0 0 1 2.78 2.95 39.383 39.383 0 0 0 5.69 5.142 3.333 3.333 0 0 0 2.507.243q.754.55 1.522 1.082A54.289 54.289 0 0 1 102.86 61.89a55.052 55.052 0 0 1 7.63-1.173l.1-1.784a4.6 4.6 0 0 0 1.37-2.184 39.476 39.476 0 0 0-.47-7.654 35.466 35.466 0 0 1-.576-4.014c-.011-.307.006-.731.01-1.081 0-.04-.01-.08-.01-.118a4.242 4.242 0 1 1 8.441-.004c0 .37.022.86.009 1.2a35.109 35.109 0 0 1-.579 4.013 39.533 39.533 0 0 0-.478 7.656 3.344 3.344 0 0 0 1.379 2.11c.015.305.065 1.323.102 1.884a55.309 55.309 0 0 1 35.032 16.927l1.606-1.147a4.69 4.69 0 0 0 2.56-.278 39.532 39.532 0 0 0 5.69-5.148 35.004 35.004 0 0 1 2.787-2.95c.259-.222.65-.52.936-.746a4.242 4.242 0 1 1 5.258 6.598c-.283.229-.657.548-.929.75a35.095 35.095 0 0 1-3.507 2.046 39.495 39.495 0 0 0-6.277 4.41 3.337 3.337 0 0 0-.792 2.39c-.235.216-1.06.947-1.497 1.343a54.837 54.837 0 0 1 8.792 37.983l1.704.496a4.745 4.745 0 0 0 1.82 1.83 39.464 39.464 0 0 0 7.568 1.246 35.64 35.64 0 0 1 4.046.324c.355.065.868.207 1.23.29a4.236 4.236 0 1 1-1.878 8.223l-.061-.008c-.028-.007-.054-.022-.083-.03-.348-.075-.785-.151-1.09-.231a35.14 35.14 0 0 1-3.785-1.462 39.477 39.477 0 0 0-7.363-2.165 3.337 3.337 0 0 0-2.362.877q-.9-.171-1.804-.316a54.92 54.92 0 0 1-24.328 30.605z" class="cls-2"/><path d="M225.407 135.107L206.4 52.547a14.838 14.838 0 0 0-7.958-9.9l-76.935-36.73a14.825 14.825 0 0 0-12.771 0L31.808 42.669a14.838 14.838 0 0 0-7.961 9.895L4.873 135.129a14.668 14.668 0 0 0 1.995 11.185c.261.4.538.788.838 1.162l53.246 66.205a14.98 14.98 0 0 0 11.499 5.487l85.387-.02a14.986 14.986 0 0 0 11.5-5.48l53.227-66.211a14.72 14.72 0 0 0 2.842-12.347zm-9.197 3.866a13.677 13.677 0 0 1-.498 1.723 13.184 13.184 0 0 1-2.11 3.786l-47.299 58.838-1.486 1.852a13.305 13.305 0 0 1-3.24 2.865 13.945 13.945 0 0 1-1.474.822q-.513.237-1.045.43a13.873 13.873 0 0 1-1.383.445 13.473 13.473 0 0 1-1.989.379 12.988 12.988 0 0 1-1.41.082l-77.504.018h-.76a13.298 13.298 0 0 1-3.429-.472 13.925 13.925 0 0 1-3.855-1.679 13.424 13.424 0 0 1-2.576-2.132c-.233-.246-.468-.487-.68-.75l-48.805-60.679q-.408-.514-.765-1.066a13.102 13.102 0 0 1-1.343-2.726 13.505 13.505 0 0 1-.491-1.719 13.315 13.315 0 0 1 .004-5.809l17.394-75.675a13.598 13.598 0 0 1 7.295-9.07l70.508-33.685a13.589 13.589 0 0 1 11.705 0l70.519 33.67a13.602 13.602 0 0 1 7.293 9.073l17.422 75.674a13.282 13.282 0 0 1 .002 5.807z" class="cls-1"/><path d="M185.814 127.106c-.36-.083-.874-.225-1.227-.29a35.642 35.642 0 0 0-4.046-.326 39.464 39.464 0 0 1-7.57-1.242 4.745 4.745 0 0 1-1.82-1.832l-1.704-.496a54.837 54.837 0 0 0-8.79-37.983c.436-.396 1.262-1.127 1.495-1.342a3.338 3.338 0 0 1 .792-2.39 39.495 39.495 0 0 1 6.277-4.41 35.095 35.095 0 0 0 3.507-2.046c.272-.202.644-.522.929-.75a4.242 4.242 0 1 0-5.256-6.6c-.288.227-.68.525-.936.747a35.004 35.004 0 0 0-2.789 2.95 39.533 39.533 0 0 1-5.69 5.148 4.69 4.69 0 0 1-2.56.278l-1.606 1.147a55.309 55.309 0 0 0-35.032-16.927c-.039-.561-.087-1.577-.102-1.884a3.344 3.344 0 0 1-1.377-2.11 39.533 39.533 0 0 1 .478-7.656 35.112 35.112 0 0 0 .575-4.012c.013-.34-.007-.834-.007-1.201a4.242 4.242 0 1 0-8.441.004c0 .04.009.078.01.118-.004.35-.021.774-.01 1.08a35.476 35.476 0 0 0 .576 4.015 39.475 39.475 0 0 1 .47 7.654 4.601 4.601 0 0 1-1.37 2.182l-.1 1.786a55.052 55.052 0 0 0-7.63 1.173 54.289 54.289 0 0 0-27.574 15.754q-.77-.531-1.526-1.082a3.333 3.333 0 0 1-2.506-.243 39.383 39.383 0 0 1-5.69-5.141 35.255 35.255 0 0 0-2.777-2.95c-.257-.22-.65-.52-.938-.75a5.03 5.03 0 0 0-2.942-1.11 4.066 4.066 0 0 0-3.363 1.49 4.473 4.473 0 0 0 1.038 6.222l.065.046c.276.226.616.515.872.702a35.256 35.256 0 0 0 3.499 2.048 39.367 39.367 0 0 1 6.276 4.412 4.69 4.69 0 0 1 .849 2.434l1.351 1.208a54.613 54.613 0 0 0-8.611 38.073l-1.767.514a5.835 5.835 0 0 1-1.814 1.827 39.39 39.39 0 0 1-7.565 1.247 35.266 35.266 0 0 0-4.049.326c-.324.06-.774.174-1.127.262l-.037.008-.06.018a4.236 4.236 0 1 0 1.875 8.224l.063-.01c.028-.006.052-.02.08-.025.348-.08.786-.163 1.092-.246a35.59 35.59 0 0 0 3.786-1.451 39.527 39.527 0 0 1 7.358-2.165 4.68 4.68 0 0 1 2.426.857l1.84-.315a54.922 54.922 0 0 0 24.34 30.387l-.769 1.84a4.188 4.188 0 0 1 .377 2.387 41.228 41.228 0 0 1-3.82 6.864 35.183 35.183 0 0 0-2.263 3.372c-.168.318-.381.805-.542 1.138a4.238 4.238 0 1 0 7.621 3.616l.007-.008v-.01c.16-.33.387-.763.522-1.072a34.903 34.903 0 0 0 1.218-3.868 29.517 29.517 0 0 1 3.268-7.582 3.43 3.43 0 0 1 1.819-.888l.957-1.73a54.617 54.617 0 0 0 38.946.099c.268.478.768 1.392.9 1.623a3.335 3.335 0 0 1 2.155 1.31 39.306 39.306 0 0 1 2.898 7.096 35.275 35.275 0 0 0 1.225 3.868c.137.312.36.75.522 1.082a4.24 4.24 0 1 0 7.63-3.607c-.161-.333-.383-.82-.55-1.136a35.06 35.06 0 0 0-2.263-3.364 39.372 39.372 0 0 1-3.742-6.7 3.314 3.314 0 0 1 .324-2.49 14.519 14.519 0 0 1-.703-1.703 54.92 54.92 0 0 0 24.328-30.605c.546.087 1.497.253 1.806.316a3.337 3.337 0 0 1 2.36-.877 39.476 39.476 0 0 1 7.36 2.165 35.135 35.135 0 0 0 3.788 1.462c.305.08.74.156 1.09.233.029.008.055.02.083.028l.06.009a4.236 4.236 0 1 0 1.878-8.224zm-40.1-42.987l-18.037 12.787-.063-.03a3.723 3.723 0 0 1-5.913-2.838l-.02-.01-1.253-22.103a43.85 43.85 0 0 1 25.285 12.194zm-33.978 24.228h6.788l4.22 5.276-1.513 6.58-6.096 2.934-6.114-2.94-1.516-6.583zm-6.386-35.648a44.672 44.672 0 0 1 4.503-.774l-1.255 22.137-.092.044a3.72 3.72 0 0 1-5.904 2.852l-.035.02-18.154-12.872a43.467 43.467 0 0 1 20.937-11.407zm-27.52 19.68l16.574 14.824-.018.09a3.72 3.72 0 0 1-1.462 6.395l-.017.072-21.245 6.13a43.454 43.454 0 0 1 6.168-27.51zm22.191 39.38l-8.441 20.397a43.696 43.696 0 0 1-17.536-21.948l21.783-3.7.037.049a3.655 3.655 0 0 1 .73-.065 3.72 3.72 0 0 1 3.364 5.185zm24.916 26.23a43.637 43.637 0 0 1-23.815-1.223l10.713-19.372h.018a3.725 3.725 0 0 1 6.557-.006h.08l10.74 19.404q-2.091.698-4.293 1.199zm13.841-5.751l-8.528-20.605.026-.037a3.725 3.725 0 0 1 1.803-4.823 3.685 3.685 0 0 1 1.425-.37 3.59 3.59 0 0 1 .855.063l.037-.046 21.977 3.714a43.53 43.53 0 0 1-17.595 22.105zm19.903-32.42l-21.352-6.15-.02-.09a3.725 3.725 0 0 1-1.46-6.395l-.008-.043 16.482-14.751a44.279 44.279 0 0 1 6.357 27.43z" class="cls-1"/></svg>
@@ -32,7 +32,7 @@ class Fofa {
32
32
  const size = this.getNodeParameter("size", idx, 100);
33
33
  const full = this.getNodeParameter("full", idx, false);
34
34
  const fields = this.getNodeParameter("fields", idx, "");
35
- const data = await this.helpers.httpRequestWithAuthentication.call(this, "fofaCredentialsApi", {
35
+ const data = await this.helpers.httpRequestWithAuthentication.call(this, "fofaApi", {
36
36
  method: "GET",
37
37
  url: "https://fofa.info/api/v1/search/all",
38
38
  qs: {
@@ -43,8 +43,8 @@ class Fofa {
43
43
  full
44
44
  }
45
45
  });
46
- if (data.error && !data.errmsg.includes("820031")) {
47
- throw new _n8nworkflow.NodeOperationError(this.getNode(), `Fofa error response: ${data.errmsg}`);
46
+ if (data.error && data.errmsg && !data.errmsg.includes("820031")) {
47
+ throw new _n8nworkflow.NodeOperationError(this.getNode(), new Error(`Fofa error response: ${data.errmsg}`));
48
48
  }
49
49
  (_data = data).results ?? (_data.results = []);
50
50
  result.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data.results.map((item)=>Array.isArray(item) ? item : [
@@ -52,7 +52,20 @@ class Fofa {
52
52
  ]).map((item)=>Object.fromEntries(item.map((item, idx)=>[
53
53
  fields.split(",")[idx],
54
54
  item
55
- ])))), {
55
+ ]))).map((item)=>{
56
+ const basic = {
57
+ ip: item.ip,
58
+ domain: item.domain,
59
+ port: parseInt(item.port),
60
+ protocol: item.base_protocol
61
+ };
62
+ return {
63
+ basic,
64
+ metadata: {
65
+ ...item
66
+ }
67
+ };
68
+ })), {
56
69
  itemData: {
57
70
  item: idx
58
71
  }
@@ -64,7 +77,7 @@ class Fofa {
64
77
  }
65
78
  constructor(){
66
79
  _define_property(this, "description", {
67
- displayName: "Soar: Fofa",
80
+ displayName: "Runner Fofa",
68
81
  name: "fofa",
69
82
  group: [
70
83
  "output"
@@ -84,7 +97,7 @@ class Fofa {
84
97
  ],
85
98
  credentials: [
86
99
  {
87
- name: "fofaCredentialsApi",
100
+ name: "fofaApi",
88
101
  required: true
89
102
  }
90
103
  ],
@@ -111,7 +124,7 @@ class Fofa {
111
124
  displayName: "Fields",
112
125
  name: "fields",
113
126
  type: "string",
114
- default: "host,ip,port"
127
+ default: "domain,ip,port,host"
115
128
  },
116
129
  {
117
130
  displayName: "Full",
@@ -54,7 +54,7 @@ class Katana {
54
54
  }
55
55
  constructor(){
56
56
  _define_property(this, "description", {
57
- displayName: "Soar: Katana",
57
+ displayName: "Runner Katana",
58
58
  name: "katana",
59
59
  group: [
60
60
  "output"
@@ -61,7 +61,7 @@ class Nuclei {
61
61
  }
62
62
  constructor(){
63
63
  _define_property(this, "description", {
64
- displayName: "Soar: Nuclei",
64
+ displayName: "Runner Nuclei",
65
65
  name: "nuclei",
66
66
  group: [
67
67
  "output"
@@ -0,0 +1,199 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Dns", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Dns;
9
+ }
10
+ });
11
+ const _nodefs = require("node:fs");
12
+ const _nodepath = require("node:path");
13
+ const _script = require("./script");
14
+ const _connectionType = require("../../../common/connectionType");
15
+ const _containerrunner = require("../../../common/runner/container.runner");
16
+ const _priority = require("../../../common/runner/priority");
17
+ function _define_property(obj, key, value) {
18
+ if (key in obj) {
19
+ Object.defineProperty(obj, key, {
20
+ value: value,
21
+ enumerable: true,
22
+ configurable: true,
23
+ writable: true
24
+ });
25
+ } else {
26
+ obj[key] = value;
27
+ }
28
+ return obj;
29
+ }
30
+ class DnsRunner extends _containerrunner.ContainerRunner {
31
+ cmd() {
32
+ return [
33
+ "node",
34
+ "/tmp/entry.js"
35
+ ];
36
+ }
37
+ options(assets) {
38
+ const options = super.options(assets);
39
+ const dnsOptions = {
40
+ queryTypes: this.func.getNodeParameter("queryType", 0, []),
41
+ resolvers: this.func.getNodeParameter("resolvers.resolvers", 0).map((n)=>n.resolver),
42
+ timeout: this.func.getNodeParameter("timeout", 0)
43
+ };
44
+ options.image = _containerrunner.IMAGE.SCRIPT;
45
+ options.files["/tmp/dns.js"] = Buffer.from((0, _nodefs.readFileSync)((0, _nodepath.join)(__dirname, "script.js"))).toString("base64");
46
+ options.files["/tmp/entry.js"] = Buffer.from(`const {resolve} = require("/tmp/dns.js");(async()=> {const hosts=${JSON.stringify(assets.map((n)=>n.getDomain()).filter(Boolean))};console.log(JSON.stringify(await Promise.all(hosts.map(async (host) => resolve(host, ${JSON.stringify(dnsOptions)})))));process.exit(0);})();`).toString("base64");
47
+ return options;
48
+ }
49
+ process(rawAssets, stdout) {
50
+ return JSON.parse(stdout).flatMap((n, idx)=>{
51
+ rawAssets[idx].dnsRecord = n;
52
+ rawAssets[idx].success = true;
53
+ return rawAssets[idx].splitBySubdomains();
54
+ });
55
+ }
56
+ }
57
+ class Dns {
58
+ async supplyData(itemIndex) {
59
+ return {
60
+ response: [
61
+ new DnsRunner("dns", _priority.DNS_RUNNER_PRIORITY, this, itemIndex)
62
+ ]
63
+ };
64
+ }
65
+ constructor(){
66
+ _define_property(this, "description", {
67
+ displayName: "Runner: Dns",
68
+ name: "dns",
69
+ icon: "fa:map-signs",
70
+ group: [
71
+ "transform"
72
+ ],
73
+ codex: {
74
+ alias: [
75
+ "Dns"
76
+ ],
77
+ categories: [
78
+ "SOAR"
79
+ ],
80
+ subcategories: {
81
+ SOAR: [
82
+ "runner"
83
+ ]
84
+ }
85
+ },
86
+ version: 1,
87
+ description: "Interact with Dns",
88
+ defaults: {
89
+ name: "Dns"
90
+ },
91
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
92
+ inputs: [],
93
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
94
+ outputs: [
95
+ _connectionType.NodeConnectionType.Runner
96
+ ],
97
+ properties: [
98
+ {
99
+ displayName: "Only Success",
100
+ name: "onlySuccess",
101
+ type: "boolean",
102
+ default: true
103
+ },
104
+ {
105
+ displayName: "Query Type",
106
+ name: "queryType",
107
+ type: "multiOptions",
108
+ default: [
109
+ "A",
110
+ "AAAA",
111
+ "TXT",
112
+ "CNAME",
113
+ "NS",
114
+ "MX"
115
+ ],
116
+ options: [
117
+ {
118
+ name: "A",
119
+ value: "A"
120
+ },
121
+ {
122
+ name: "AAAA",
123
+ value: "AAAA"
124
+ },
125
+ {
126
+ name: "TXT",
127
+ value: "TXT"
128
+ },
129
+ {
130
+ name: "CNAME",
131
+ value: "CNAME"
132
+ },
133
+ {
134
+ name: "NS",
135
+ value: "NS"
136
+ },
137
+ {
138
+ name: "MX",
139
+ value: "MX"
140
+ },
141
+ {
142
+ name: "PTR",
143
+ value: "PTR"
144
+ },
145
+ {
146
+ name: "SOA",
147
+ value: "SOA"
148
+ },
149
+ {
150
+ name: "SRV",
151
+ value: "SRV"
152
+ },
153
+ {
154
+ name: "NAPTR",
155
+ value: "NAPTR"
156
+ },
157
+ {
158
+ name: "ANY",
159
+ value: "ANY"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ displayName: "Timeout",
165
+ name: "timeout",
166
+ type: "number",
167
+ default: 1000
168
+ },
169
+ {
170
+ displayName: "Resolvers",
171
+ name: "resolvers",
172
+ type: "fixedCollection",
173
+ default: {
174
+ resolvers: _script.DEFAULT_RESOLVERS.map((n)=>({
175
+ resolver: n
176
+ }))
177
+ },
178
+ typeOptions: {
179
+ multipleValues: true
180
+ },
181
+ options: [
182
+ {
183
+ name: "resolvers",
184
+ displayName: "Resolvers",
185
+ values: [
186
+ {
187
+ displayName: "Resolver",
188
+ name: "resolver",
189
+ type: "string",
190
+ default: ""
191
+ }
192
+ ]
193
+ }
194
+ ]
195
+ }
196
+ ]
197
+ });
198
+ }
199
+ }
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ DEFAULT_RESOLVERS: function() {
13
+ return DEFAULT_RESOLVERS;
14
+ },
15
+ resolve: function() {
16
+ return resolve;
17
+ }
18
+ });
19
+ const DNS_QUERY_TYPE_MAP = {
20
+ A: 1,
21
+ AAAA: 28,
22
+ CNAME: 5,
23
+ NS: 2,
24
+ PTR: 12,
25
+ ANY: 255,
26
+ MX: 15,
27
+ NAPTR: 35,
28
+ SOA: 6,
29
+ SRV: 33,
30
+ TXT: 16
31
+ };
32
+ const DEFAULT_RESOLVERS = [
33
+ "https://dns.alidns.com/resolve",
34
+ "https://dns.google/resolve",
35
+ "https://cloudflare-dns.com/dns-query"
36
+ ];
37
+ async function resolveByDoH(host, resolver, queryType, signal) {
38
+ const url = new URL(resolver);
39
+ url.searchParams.append("name", host);
40
+ url.searchParams.append("type", queryType);
41
+ url.searchParams.append("ct", "application/dns-json");
42
+ const response = await fetch(url.toString(), {
43
+ signal
44
+ });
45
+ const data = await response.json();
46
+ if (data.Status !== 0) {
47
+ throw new Error(`DoH query failed: ${data}`);
48
+ }
49
+ return {
50
+ [queryType]: data.Answer.filter((n)=>n.type === DNS_QUERY_TYPE_MAP[queryType]).map((n)=>n.data)
51
+ };
52
+ }
53
+ function merge(results) {
54
+ const merged = {};
55
+ for (const result of results){
56
+ for (const [key, value] of Object.entries(result)){
57
+ if (merged[key]) {
58
+ merged[key].push(...value);
59
+ } else {
60
+ merged[key] = value;
61
+ }
62
+ }
63
+ }
64
+ for (const [key, value] of Object.entries(merged)){
65
+ merged[key] = [
66
+ ...new Set(value)
67
+ ];
68
+ }
69
+ return merged;
70
+ }
71
+ async function resolve(host, options) {
72
+ const signal = AbortSignal.timeout(options.timeout);
73
+ const results = (await Promise.allSettled(options.resolvers.flatMap((resolver)=>options.queryTypes.map((queryType)=>{
74
+ if (resolver.startsWith("https")) {
75
+ return resolveByDoH(host, resolver, queryType, signal);
76
+ } else {
77
+ throw new Error(`Unsupported resolver: ${resolver}`);
78
+ }
79
+ })))).map((n)=>n.status === "fulfilled" ? n.value : undefined).filter(Boolean);
80
+ return merge(results);
81
+ }