nuclei-templates/headless/extract-urls.yaml

30 lines
825 B
YAML

id: extract-urls
info:
name: Extract URLs from HTML attributes
author: dwisiswant0
severity: info
tags: headless,extractor
headless:
- steps:
- args:
url: "{{BaseURL}}"
action: navigate
- action: waitload
- action: script
name: extract
args:
code: |
() => {
return '\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'
}
extractors:
- type: kval
part: extract
kval:
- extract
# digest: 4a0a0047304502201929be3307cd1badad321f4fce5ff44feda065bae4ab72a7817ea16fa8201afb022100be1f94a508d5d79dbff66c137c8c8959b1168743fc8bfa3f612ae4ef3210ec45:922c64590222798bb761d5b6d8e72950