Look up IP addresses

This commit is contained in:
3wc 2023-03-25 15:59:24 -04:00
parent 4174f7d5d5
commit 4f848f02af
2 changed files with 792 additions and 791 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,11 +11,12 @@ process_result() {
wiki=$1
farm=$(echo "$wiki" | xargs tldextract | cut -d' ' -f2,3 | sed 's/ /./g')
status_http=$(curl -I -q --silent -m 5 $wiki > /dev/null && echo -n "OK" || echo -n "FAIL")
status_https=$(echo $wiki | sed 's/http:/https:/' | xargs curl -I -q --silent -m 5 > /dev/null && echo "OK" || echo "FAIL")
echo "$wiki,$farm,$status_http,$status_https";
status_https=$(echo "$wiki" | sed 's/http:/https:/' | xargs curl -I -q --silent -m 5 > /dev/null && echo "OK" || echo "FAIL")
ip=$(echo "$wiki" | sed -e 's;http://;;' -e 's;/;;' | xargs dig +short | tail -1)
echo "$wiki,$farm,$status_http,$status_https,$ip";
}
echo "Wiki,Farm,HTTP?,HTTPS?" > ./wikiverse-https-scan.csv
echo "Wiki,Farm,HTTP?,HTTPS?,IP" > ./wikiverse-https-scan.csv
for wiki in $(pup '#results a attr{href}' < "$html_file"); do
process_result "$wiki" &