-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTakeoverAll.sh
39 lines (35 loc) · 916 Bytes
/
TakeoverAll.sh
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
#!/bin/bash
# Check for the presence of required arguments
if [[ $# -lt 2 ]]; then
echo "Usage: $0 -f <subdomain_file> -o <output_file>"
exit 1
fi
# Parse arguments
while getopts ":f:o:" opt; do
case $opt in
f)
file="$OPTARG"
;;
o)
output="$OPTARG"
;;
\?)
echo "Invalid option: -$OPTARG"
exit 1
;;
:)
echo "Option -$OPTARG requires an argument."
exit 1
;;
esac
done
# Loop through subdomains
while read subdomain; do
# Check for subdomain takeover using subzy
subzy -d $subdomain >> $output
# Check for subdomain takeover using subjack
subjack -w $subdomain -t 100 -timeout 30 -ssl -c >> $output
# Check for subdomain takeover using NtHiM
nthim -d $subdomain >> $output
done < $file
echo "Scan results saved to $output"