Open hipotermia opened 1 month ago
I'll leave it here for notes:
code:
- engine:
- sh
- bash
source: id
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
- |
GET / HTTP/1.1
Host: {{Hostname}}
extractors:
- type: dsl
dsl:
- 'concat("status_code_1: ", status_code_1)'
- 'concat("status_code_2: ", status_code_2)'
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
- |
GET / HTTP/1.1
Host: {{Hostname}}
extractors:
- type: dsl
dsl:
- 'concat("status_code_1: ", status_code_1)'
- 'concat("status_code_2: ", status_code_2)'
Output:
[issue-5748-b] [http] [info] http://scanme.sh ["status_code_1: 200"]
[issue-5748-b] [http] [info] http://scanme.sh ["status_code_2: 200"]
[issue-5748-c] [http] [info] http://scanme.sh ["status_code_1: 200"]
[issue-5748-c] [http] [info] http://scanme.sh ["status_code_1: 200","status_code_2: 200"]
I'm going to be off for a few days, so I’m dropping this here as a note (for myself as well). I suspect that the underlying issue might be found here:
This was introduced in https://github.com/projectdiscovery/nuclei/pull/5426.
Is there an existing issue for this?
Current Behavior
When using the code protocol, DSL responses are not functioning as expected.
status_code_1 == 200
evaluates to true.status_code_2 == 200
evaluates to true.However, when comparing the two status codes:
status_code_1 == status_code_2
does not match.And by removing the code protocol, works.
Expected Behavior
status_code_1 == status_code_2
should match if are equal, regardless if code is being used.Steps To Reproduce
The following template should hit, but it doesn't.
Relevant log output
No response
Environment
Anything else?
No response