Created
December 16, 2019 21:42
-
-
Save james-see/e1683f04519821e5fdf6ab9d03cd7c13 to your computer and use it in GitHub Desktop.
how to quickly get head status of each url for onion sites
This file contains hidden or 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
#!/bin/bash | |
while read LINE; do | |
curl -o /dev/null --silent --socks5-hostname 127.0.0.1:9050 --head --write-out "%{http_code} $LINE\n" "$LINE" | |
done < url-list.txt |
Updated with Redis intergration:
#!/bin/bash
redis-cli flushall
redis-cli set starttime "$(TZ=UTC date -R)"
while read LINE; do
if [[ $(curl -o /dev/null -s --socks5-hostname 127.0.0.1:9050 --head --connect-timeout 15 --max-time 20 -w '%{http_code}\n' "$LINE") == "200" ]]; then redis-cli sadd up "$LINE"; else redis-cli sadd down "$LINE"; fi
done < url-list.txt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated with Redis intergration: