Last active
December 19, 2019 20:16
-
-
Save noobsdt/57be252ebcd3232280e989ff843e875e to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
grn='\033[0;32m' | |
red='\033[0;31m' | |
nc='\033[0m' | |
echo "##############################" | |
echo "# Simple Live Domain Checker #" | |
echo "# By Noob Sdt v0.25 #" | |
echo "##############################" | |
start=$(date +"%r") | |
echo "Program Starts At $start" | |
file=$1 | |
echo -e "${grn}[+] Httprobe Started ...${nc}" | |
cat $file | httprobe -c 50 > domains.txt | |
h=domains.txt | |
echo -e "${grn}[+] Httprobe Finished It's Work!${nc}" | |
echo " " | |
for (( i=100; i<=$( wc -l < "$h"); i+=100 )); do | |
head -n "$i" "$h" | tail -n 100 | | |
while IFS= read -r line | |
do | |
req=`curl --write-out "%{http_code}\n" --silent --output /dev/null "$line"` | |
if [[ $req == 200 || $req == 201 || $req == 202 || $req == 204 || $req == 301 || $req == 302 || $req == 304 || $req == 401 || $req == 403 || $req == 404 || $req == 500 ]]; | |
then | |
echo "$line is reachable!" | |
echo $line >> live_domain.txt | |
else | |
echo -e "${red}$line is down :(${nc}" | |
echo $line >> down.txt | |
fi | |
done < "$h" & | |
wait | |
done | |
end=$(date +"%r") | |
echo "Scanned has finished at $end" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment