Created
November 28, 2019 19:47
-
-
Save gwen001/eabe3eb200ee817165d6552ddb909f4b to your computer and use it in GitHub Desktop.
oneliner to extract links from the target itself
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read h; do curl -siL https://$h|sed -n -E "s/.*<.*(href|src|url)[=:]['\"]?([^'\">]+).*/\2/p" ; done < hosts.txt | |
function olink { | |
curl -siL https://$1|sed -n -E "s/.*(href|src|url)[=:]['\"]?([^'\">]+).*/\2/p" | |
} | |
function olinks { | |
while read h; do curl -siL https://$h|sed -n -E "s/.*<.*(href|src|url)[=:]['\"]?([^'\">]+).*/\2/p" ; done < $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment