-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRooterhttpscan.sh
More file actions
86 lines (76 loc) · 8.42 KB
/
Rooterhttpscan.sh
File metadata and controls
86 lines (76 loc) · 8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
# Author Shubham Rooter
BLUE='\033[94m'
RED='\033[91m'
GREEN='\033[92m'
ORANGE='\033[93m'
RESET='\e[0m'
TARGET="$1"
CURRENT_PATH=$(pwd)
if [ -z $TARGET ]; then
echo -e "$GREEN ░██████╗██╗░░██╗██╗░░░██╗██████╗░██╗░░██╗░█████╗░███╗░░░███╗ ██████╗░░█████╗░░█████╗░████████╗███████╗██████╗░"
echo -e "$GREEN ██╔════╝██║░░██║██║░░░██║██╔══██╗██║░░██║██╔══██╗████╗░████║ ██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔══██╗"
echo -e "$GREEN ╚█████╗░███████║██║░░░██║██████╦╝███████║███████║██╔████╔██║ ██████╔╝██║░░██║██║░░██║░░░██║░░░█████╗░░██████╔╝"
echo -e "$GREEN ░╚═══██╗██╔══██║██║░░░██║██╔══██╗██╔══██║██╔══██║██║╚██╔╝██║ ██╔══██╗██║░░██║██║░░██║░░░██║░░░██╔══╝░░██╔══██╗"
echo -e "$GREEN ██████╔╝██║░░██║╚██████╔╝██████╦╝██║░░██║██║░░██║██║░╚═╝░██║ ██║░░██║╚█████╔╝╚█████╔╝░░░██║░░░███████╗██║░░██║"
echo -e "$GREEN ╚═════╝░╚═╝░░╚═╝░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░╚═╝ ╚═╝░░╚═╝░╚════╝░░╚════╝░░░░╚═╝░░░╚══════╝╚═╝░░╚═╝ "
echo ""
echo -e "$GREEN [+] by Shubham Rooter"
echo -e "$GREEN [+]https://github.com/shubham-rooter $RESET"
echo -e "$GREEN [-] Usage: Rooterhttpscan <Subdomainlist.txt>$RESET"
exit
fi
if [[ $TARGET == "--help" ]] || [[ $TARGET == "-h" ]]; then
echo -e "$BLUE ░██████╗██╗░░██╗██╗░░░██╗██████╗░██╗░░██╗░█████╗░███╗░░░███╗ ██████╗░░█████╗░░█████╗░████████╗███████╗██████╗░"
echo -e "$BLUE ██╔════╝██║░░██║██║░░░██║██╔══██╗██║░░██║██╔══██╗████╗░████║ ██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔══██╗"
echo -e "$BLUE ╚█████╗░███████║██║░░░██║██████╦╝███████║███████║██╔████╔██║ ██████╔╝██║░░██║██║░░██║░░░██║░░░█████╗░░██████╔╝"
echo -e "$BLUE ░╚═══██╗██╔══██║██║░░░██║██╔══██╗██╔══██║██╔══██║██║╚██╔╝██║ ██╔══██╗██║░░██║██║░░██║░░░██║░░░██╔══╝░░██╔══██╗"
echo -e "$BLUE ██████╔╝██║░░██║╚██████╔╝██████╦╝██║░░██║██║░░██║██║░╚═╝░██║ ██║░░██║╚█████╔╝╚█████╔╝░░░██║░░░███████╗██║░░██║"
echo -e "$BLUE ╚═════╝░╚═╝░░╚═╝░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░╚═╝ ╚═╝░░╚═╝░╚════╝░░╚════╝░░░░╚═╝░░░╚══════╝╚═╝░░╚═╝ "
echo ""
echo -e "$GREEN [+] by Shubham Rooter"
echo -e "$GREEN [+] https://github.com/shubham-rooter"
echo -e "$GREEN [+] Find alive host $RESET"
echo -e "$GREEN [-] Usage: Rooterhttpscan <Subdomainlist.txt>$RESET"
exit
fi
if [ ! -f $TARGET ]; then
echo -e "$RED [+] --------- File Not Found -------------- [+] $RESET"
echo -e "$RED [+] --------- Check - FILE PATH -------------- [+] $RESET"
exit
fi
createdir=$(mkdir -p "$CURRENT_PATH/live-dead-domains/")
FILENAME=$( basename $TARGET )
echo -e "$ORANGE ░██████╗██╗░░██╗██╗░░░██╗██████╗░██╗░░██╗░█████╗░███╗░░░███╗ ██████╗░░█████╗░░█████╗░████████╗███████╗██████╗░"
echo -e "$ORANGE ██╔════╝██║░░██║██║░░░██║██╔══██╗██║░░██║██╔══██╗████╗░████║ ██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔══██╗"
echo -e "$ORANGE ╚█████╗░███████║██║░░░██║██████╦╝███████║███████║██╔████╔██║ ██████╔╝██║░░██║██║░░██║░░░██║░░░█████╗░░██████╔╝"
echo -e "$ORANGE ░╚═══██╗██╔══██║██║░░░██║██╔══██╗██╔══██║██╔══██║██║╚██╔╝██║ ██╔══██╗██║░░██║██║░░██║░░░██║░░░██╔══╝░░██╔══██╗"
echo -e "$ORANGE ██████╔╝██║░░██║╚██████╔╝██████╦╝██║░░██║██║░░██║██║░╚═╝░██║ ██║░░██║╚█████╔╝╚█████╔╝░░░██║░░░███████╗██║░░██║"
echo -e "$ORANGE ╚═════╝░╚═╝░░╚═╝░╚═════╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░╚═╝ ╚═╝░░╚═╝░╚════╝░░╚════╝░░░░╚═╝░░░╚══════╝╚═╝░░╚═╝ "
echo -e ""
echo -e "$GREEN [+] by Shubham Rooter"
echo -e "$GREEN [+] https://github.com/shubham-rooter"
echo -e "$GREEN [+] Find alive host $RESET"
echo -e "$GREEN [-] Usage: Rooterhttpscan <Subdomainlist.txt>$RESET"
echo -e "$ORANGE + ------------------------------=[Gathering Subdomains]=-------------- +$RESET"
echo -e ""
for foo in $(cat $TARGET)
do
ping -c1 -W1 $foo > /dev/null 2>&1
if [[ $? -eq 0 ]];
then
echo -e "$GREEN [+]--- LIVE ---[+] $foo $RESET"
echo -e "$foo" | tee -a $CURRENT_PATH/live-dead-domains/live-$FILENAME > /dev/null 2>&1
else
echo -e "$RED [+]--- DEAD ---[+] $foo $RESET"
echo -e "$foo" | tee -a $CURRENT_PATH/live-dead-domains/dead-$FILENAME > /dev/null 2>&1
fi
done
echo -e ""
echo -e "$BLUE Working SubDomains saved to: live-dead-domains/live-$FILENAME"
echo -e "$BLUE Inlive SubDomains saved to: live-dead-domains/dead-$FILENAME"
vcounter=$(cat $CURRENT_PATH/live-dead-domains/live-$FILENAME | sort -u | wc -l )
fcounter=$(cat $CURRENT_PATH/live-dead-domains/dead-$FILENAME | sort -u | wc -l )
orgcounter=$(cat $TARGET | sort -u | wc -l )
echo -e "$RED TOTAL DOMAINS : ${orgcounter} , LIVE : ${vcounter} , DOWN : ${fcounter} $RESET"
echo -e "$GREEN + -- ----------------------------=[Thanks For Using]=----------------------------------- -- +$RESET"