2021-06-18 06:31:59 +00:00
|
|
|
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: |
|
2022-05-18 17:55:25 +00:00
|
|
|
() => {
|
|
|
|
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'
|
|
|
|
}
|
2021-06-18 06:31:59 +00:00
|
|
|
extractors:
|
|
|
|
- type: kval
|
|
|
|
part: extract
|
|
|
|
kval:
|
|
|
|
- extract
|