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

Dynamic payloads in headless text action #5763

Open
dmaciejak opened this issue Oct 23, 2024 · 1 comment
Open

Dynamic payloads in headless text action #5763

dmaciejak opened this issue Oct 23, 2024 · 1 comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@dmaciejak
Copy link
Contributor

Describe your feature request

Would be nice if it would be possible to use dynamic variable in the action text headless mode. Either including a 'payloads' within the template or via the CLI with -var syntax. I don't think that's currently possible.

Describe the use case of the feature

Was trying to use the template below to work against DVWA.

id: dvwa-login-headless

info:
  name: DVWA Headless Login
  author: dma
  severity: info
  description: |
    DVWA Login template for testing.
  tags: dvwa,login

headless:
  - steps:
      - action: navigate
        args:
          url: "{{BaseURL}}/login.php"
      - action: waitload
      - action: text
        args:
          by: x
          value: {{username}}
          xpath: /html/body/div/div[2]/form/fieldset/input[1]
      - action: text
        args:
          by: x
          value: password
          xpath: /html/body/div/div[2]/form/fieldset/input[2]
      - action: click
        args:
          by: x
          xpath: /html/body/div/div[2]/form/fieldset/p/input
    payloads:
      username:
        - admin
        - root
    matchers:
      - type: word
        part: body
        words:
          - "You have logged in"

Describe alternatives you've considered

No response

Additional context

No response

@dmaciejak dmaciejak added the Type: Enhancement Most issues will probably ask for additions or changes. label Oct 23, 2024
@GeorginaReeder
Copy link

Thanks so much for your feature request @dmaciejak , 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