Files
nuclei-templates/headless/extract-urls.yaml
2024-12-01 13:57:55 +00:00

30 lines
823 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: 490a004630440220304e65f8ede2ae4a87e8eb684a0e50b99c4c3f70d963b51a24722930087ad3600220431cd3e613ca2b15f306dc92d13c375e41c19eb755f60a2b0caadbcae008bffc:922c64590222798bb761d5b6d8e72950