From 1840badcf20fbbe7fb4bbb8f702bc38e7776a0c8 Mon Sep 17 00:00:00 2001 From: Ice3man Date: Mon, 18 Nov 2024 20:58:39 +0530 Subject: [PATCH] bugfix: fixed failing integration tests for flow and multi --- cmd/integration-test/flow.go | 2 +- cmd/integration-test/multi.go | 2 +- integration_tests/flow/conditional-flow.yaml | 4 ++-- integration_tests/protocols/code/pre-condition.yaml | 2 +- integration_tests/protocols/code/py-env-var.yaml | 2 +- integration_tests/protocols/code/py-file.yaml | 2 +- integration_tests/protocols/code/py-interactsh.yaml | 2 +- integration_tests/protocols/code/py-snippet.yaml | 2 +- integration_tests/protocols/multi/dynamic-values.yaml | 6 +++--- integration_tests/protocols/multi/evaluate-variables.yaml | 8 ++++---- .../protocols/multi/exported-response-vars.yaml | 6 +++--- integration_tests/workflow/code-template-1.yaml | 2 +- integration_tests/workflow/code-template-2.yaml | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/cmd/integration-test/flow.go b/cmd/integration-test/flow.go index cfcb504489..46ae7cf5f7 100644 --- a/cmd/integration-test/flow.go +++ b/cmd/integration-test/flow.go @@ -22,7 +22,7 @@ var flowTestcases = []TestCaseInfo{ type conditionalFlow struct{} func (t *conditionalFlow) Execute(filePath string) error { - results, err := testutils.RunNucleiTemplateAndGetResults(filePath, "blog.projectdiscovery.io", debug) + results, err := testutils.RunNucleiTemplateAndGetResults(filePath, "cloud.projectdiscovery.io", debug) if err != nil { return err } diff --git a/cmd/integration-test/multi.go b/cmd/integration-test/multi.go index ff2aed8e22..7915d96cb5 100644 --- a/cmd/integration-test/multi.go +++ b/cmd/integration-test/multi.go @@ -14,7 +14,7 @@ type multiProtoDynamicExtractor struct{} // Execute executes a test case and returns an error if occurred func (h *multiProtoDynamicExtractor) Execute(templatePath string) error { - results, err := testutils.RunNucleiTemplateAndGetResults(templatePath, "blog.projectdiscovery.io", debug) + results, err := testutils.RunNucleiTemplateAndGetResults(templatePath, "docs.projectdiscovery.io", debug) if err != nil { return err } diff --git a/integration_tests/flow/conditional-flow.yaml b/integration_tests/flow/conditional-flow.yaml index dd76c89b54..8496016acc 100644 --- a/integration_tests/flow/conditional-flow.yaml +++ b/integration_tests/flow/conditional-flow.yaml @@ -14,7 +14,7 @@ dns: matchers: - type: word words: - - "ghost.io" + - ".vercel-dns.com" internal: true http: @@ -25,4 +25,4 @@ http: matchers: - type: word words: - - "ghost.io" \ No newline at end of file + - "html>" \ No newline at end of file diff --git a/integration_tests/protocols/code/pre-condition.yaml b/integration_tests/protocols/code/pre-condition.yaml index 2190ffecbe..be9f1c908c 100644 --- a/integration_tests/protocols/code/pre-condition.yaml +++ b/integration_tests/protocols/code/pre-condition.yaml @@ -23,4 +23,4 @@ code: - type: dsl dsl: - true -# digest: 4a0a0047304502200307590191cb7c766b6c21e5777d345bdddf7adf9d6da8f7d336d585d9ac4a8b022100fd30fb0c7722778eb3d861d60e721d805925b8d8df2b979ef2104c35ec57d5cb:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 490a00463044022048c083c338c0195f5012122d40c1009d2e2030c583e56558e0d6249a41e6f3f4022070656adf748f4874018d7a01fce116db10a3acd1f9b03e12a83906fb625b5c50:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file diff --git a/integration_tests/protocols/code/py-env-var.yaml b/integration_tests/protocols/code/py-env-var.yaml index 067c183bb7..c37759954c 100644 --- a/integration_tests/protocols/code/py-env-var.yaml +++ b/integration_tests/protocols/code/py-env-var.yaml @@ -20,4 +20,4 @@ code: - type: word words: - "hello from input baz" -# digest: 4a0a0047304502203fe1d7d52bc2a41886d576a90c82c3be42078baaa4b46e1f3d8519665d6f88b202210081feb82c41150c5b218e226fc4f299ded19f42ba01ef34ba60b0634b4ea6ee12:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 4b0a00483046022100cbbdb7214f669d111b671d271110872dc8af2ab41cf5c312b6e4f64126f55337022100a60547952a0c2bea58388f2d2effe8ad73cd6b6fc92e73eb3c8f88beab6105ec:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file diff --git a/integration_tests/protocols/code/py-file.yaml b/integration_tests/protocols/code/py-file.yaml index 3521ec902d..3c7e00bca8 100644 --- a/integration_tests/protocols/code/py-file.yaml +++ b/integration_tests/protocols/code/py-file.yaml @@ -18,4 +18,4 @@ code: - type: word words: - "hello from input" -# digest: 4b0a00483046022100afb5ebff14a40e7f9b679ffc4d93ce7849e33eb398ebb47f2e757cd24831f9dd02210089ffa21b2763e99ebce95dfc5b91e1e62da4ccdc9d2ad5c48584fa350ba335af:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 4a0a00473045022032b81e8bb7475abf27639b0ced71355497166d664698021f26498e7031d62a23022100e99ccde578bfc0b658f16427ae9a3d18922849d3ba3e022032ea0d2a8e77fadb:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file diff --git a/integration_tests/protocols/code/py-interactsh.yaml b/integration_tests/protocols/code/py-interactsh.yaml index 0ccab7a7cd..fdf7a5d632 100644 --- a/integration_tests/protocols/code/py-interactsh.yaml +++ b/integration_tests/protocols/code/py-interactsh.yaml @@ -26,4 +26,4 @@ code: part: interactsh_protocol words: - "http" -# digest: 4b0a00483046022100939f83e74d43932a5bd792b1fd2c100eec2df60f2b2a8dd56b5c8ef5faa92b17022100f93031b0de373af7d78e623968ea5a2d67c4561ef70e3e6da15aef7e5c853115:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 4a0a0047304502201a5dd0eddfab4f02588a5a8ac1947a5fa41fed80b59d698ad5cc00456296efb6022100fe6e608e38c060964800f5f863a7cdc93f686f2d0f4b52854f73948b808b4511:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file diff --git a/integration_tests/protocols/code/py-snippet.yaml b/integration_tests/protocols/code/py-snippet.yaml index 5e36c1a673..0762f58bf7 100644 --- a/integration_tests/protocols/code/py-snippet.yaml +++ b/integration_tests/protocols/code/py-snippet.yaml @@ -21,4 +21,4 @@ code: - type: word words: - "hello from input" -# digest: 4a0a00473045022100b8e676ce0c57b60c233a0203539dec20457bbb5f1790d351a5d45405b6668b2602204b1f2fa18e7db099f05329009597ceb2d9b7337562c1a676e8d50ea2f1c6fcbe:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 4b0a00483046022100ced1702728cc68f906c4c7d2c4d05ed071bfabee1e36eec7ebecbeca795a170c022100d20fd41796f130a8f9c4972fee85386d67d61eb5fc1119b1afe2a851eb2f3e65:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file diff --git a/integration_tests/protocols/multi/dynamic-values.yaml b/integration_tests/protocols/multi/dynamic-values.yaml index 2bd3113488..4872c6bf3d 100644 --- a/integration_tests/protocols/multi/dynamic-values.yaml +++ b/integration_tests/protocols/multi/dynamic-values.yaml @@ -13,7 +13,7 @@ dns: - type: dsl name: blogid dsl: - - trim_suffix(cname,'.ghost.io') + - trim_suffix(cname,'.vercel-dns.com') internal: true http: @@ -24,6 +24,6 @@ http: matchers: - type: dsl dsl: - - contains(body,'ProjectDiscovery.io') # check for http string - - blogid == 'projectdiscovery' # check for cname (extracted information from dns response) + - contains(body,'introduction') # check for http string + - blogid == 'cname' # check for cname (extracted information from dns response) condition: and \ No newline at end of file diff --git a/integration_tests/protocols/multi/evaluate-variables.yaml b/integration_tests/protocols/multi/evaluate-variables.yaml index f1a6fd98c0..7d0338ca23 100644 --- a/integration_tests/protocols/multi/evaluate-variables.yaml +++ b/integration_tests/protocols/multi/evaluate-variables.yaml @@ -7,7 +7,7 @@ info: variables: - cname_filtered: '{{trim_suffix(dns_cname,".ghost.io")}}' + cname_filtered: '{{trim_suffix(dns_cname,".vercel-dns.com")}}' dns: - name: "{{FQDN}}" # DNS Request @@ -24,7 +24,7 @@ http: matchers: - type: dsl dsl: - - contains(http_body,'ProjectDiscovery.io') # check for http string - - cname_filtered == 'projectdiscovery' # check for cname (extracted information from dns response) - - ssl_subject_cn == 'blog.projectdiscovery.io' + - contains(http_body,'introduction') # check for http string + - cname_filtered == 'cname' # check for cname (extracted information from dns response) + - ssl_subject_cn == 'docs.projectdiscovery.io' condition: and \ No newline at end of file diff --git a/integration_tests/protocols/multi/exported-response-vars.yaml b/integration_tests/protocols/multi/exported-response-vars.yaml index 1edfa65f34..b6b9417232 100644 --- a/integration_tests/protocols/multi/exported-response-vars.yaml +++ b/integration_tests/protocols/multi/exported-response-vars.yaml @@ -20,7 +20,7 @@ http: matchers: - type: dsl dsl: - - contains(http_body,'ProjectDiscovery.io') # check for http string - - trim_suffix(dns_cname,'.ghost.io') == 'projectdiscovery' # check for cname (extracted information from dns response) - - ssl_subject_cn == 'blog.projectdiscovery.io' + - contains(http_body,'introduction') # check for http string + - trim_suffix(dns_cname,'.vercel-dns.com') == 'cname' # check for cname (extracted information from dns response) + - ssl_subject_cn == 'docs.projectdiscovery.io' condition: and \ No newline at end of file diff --git a/integration_tests/workflow/code-template-1.yaml b/integration_tests/workflow/code-template-1.yaml index 81a9773ae0..1d8f9154fe 100644 --- a/integration_tests/workflow/code-template-1.yaml +++ b/integration_tests/workflow/code-template-1.yaml @@ -19,4 +19,4 @@ code: regex: - 'hello from (.*)' group: 1 -# digest: 490a00463044022050da011362cf08c2cb81e812c7f86d7282afe0562d4bf00d390f1300d19bc910022029e9d305da69e941ac18797645aecb217abde6557f891e141301b48e89a3c0cd:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 490a0046304402206b3648e8d393ac4df82c7d59b1a6ee3731c66c249dbd4d9bf31f0b7f176b37ec02203184d36373e516757c7d708b5799bc16edb1cebc0a64f3442d13ded4b33c42fb:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file diff --git a/integration_tests/workflow/code-template-2.yaml b/integration_tests/workflow/code-template-2.yaml index 1fb9805501..c135b52251 100644 --- a/integration_tests/workflow/code-template-2.yaml +++ b/integration_tests/workflow/code-template-2.yaml @@ -18,4 +18,4 @@ code: - type: word words: - "hello from first" -# digest: 4b0a00483046022100b3b8759c0df028455eb59b1433ac240e5d4604b011bb0c63680bd3cc159ac6f0022100f44aa11b640d11ad0e2902897f4eb51666ab3cd83c31dfd2590f6e43391e39b0:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file +# digest: 490a0046304402204cbb1bdf8370e49bb930b17460fb35e15f285a3b48b165736ac0e7ba2f9bc0fb022067c134790c4a2cf646b195aa4488e2c222266436e6bda47931908a28807bdb81:4a3eb6b4988d95847d4203be25ed1d46 \ No newline at end of file