Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] ... Special variables like BaseURL should be accessible in flow/javascript/code protocol. #6002

Open
r14s opened this issue Jan 23, 2025 · 1 comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@r14s
Copy link

r14s commented Jan 23, 2025

Describe your feature request

Currently special variables like BaseURL, Path, ... aren't accessible from flow/javascript/code protocol.
Example:

id: test
info:
  name: test
  author: test
  severity: info
flow: |
  log("{{BaseURL}}");
  log(template["BaseURL"]);
http:
  - method: GET
    path:
      - "{{BaseURL}}"

Output:

[JS] {{BaseURL}}
[JS] <nil>

Describe the use case of the feature

I've wanted to implement a CVE that needs two segments of the path to be modified.
One payload must be added before target path element.
Second payload must be inbetween the target path element.
For example:
/home/admin -> /home/PAYLOAD1/adPAYLOAD2min
I've wanted to implement it via Path and regex but Path/BaseURL aren't accessible.

Describe alternatives you've considered

No response

Additional context

No response

@r14s r14s added the Type: Enhancement Most issues will probably ask for additions or changes. label Jan 23, 2025
@GeorginaReeder
Copy link

Thanks for your feature request @r14s , we'll take a look into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

2 participants