2021-12-04 17:40:11 +00:00
|
|
|
|
|
|
|
id: headless-extract-values
|
|
|
|
info:
|
|
|
|
name: Headless Extract Value
|
|
|
|
author: pdteam
|
|
|
|
severity: info
|
|
|
|
tags: headless
|
|
|
|
|
|
|
|
headless:
|
|
|
|
- steps:
|
|
|
|
- action: navigate
|
|
|
|
args:
|
|
|
|
url: "{{BaseURL}}"
|
|
|
|
- action: waitload
|
|
|
|
# From headless/extract-urls.yaml
|
|
|
|
- action: script
|
|
|
|
name: extract
|
|
|
|
args:
|
|
|
|
code: |
|
2022-03-22 13:18:01 +00:00
|
|
|
() => '\n' + [...new Set(Array.from(document.querySelectorAll('[src], [href], [url], [action]')).map(i => i.src || i.href || i.url || i.action))].join('\r\n') + '\n'
|
2021-12-04 17:40:11 +00:00
|
|
|
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
words:
|
|
|
|
- "test.html"
|
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: kval
|
|
|
|
part: extract
|
|
|
|
kval:
|
|
|
|
- extract
|