forked from skalvin/Upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscan2.sh
71 lines (58 loc) · 1.64 KB
/
scan2.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
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
#!/bin/bash
# Function to display usage
usage() {
echo -e "\e[33mUsage: $0 [-d domain] [-l list.txt]\e[0m"
exit 1
}
# Parse command line arguments
while getopts ":d:l:" opt; do
case $opt in
d)
domain=$OPTARG
;;
l)
list_file=$OPTARG
;;
*)
usage
;;
esac
done
# Check if either domain or list file is provided
if [ -z "$domain" ] && [ -z "$list_file" ]; then
usage
fi
# Function to perform scans
scan_domain() {
local domain=$1
echo -e "\e[34mScanning $domain\e[0m"
# 1. Run waymore.py
echo -e "\e[32mRunning waymore.py for $domain\e[0m"
python waymore.py -i $domain -mode U -xcc
# 2. XSS scan
echo -e "\e[32mRunning XSS scan on $domain\e[0m"
cat results/$domain/waymore.txt | grep "=" | uro | nuclei -t /home/g0x0kakashi/fuzz/xss/reflected-xss.yaml -fuzz
# 3. Open Redirect scan
echo -e "\e[32mRunning Open Redirect scan on $domain\e[0m"
cat results/$domain/waymore.txt | grep "=" | uro | nuclei -t /home/g0x0kakashi/fuzz/redirect/open-redirect.yaml -fuzz
# 4. LFI scan
echo -e "\e[32mRunning LFI scan on $domain\e[0m"
cat results/$domain/waymore.txt | grep "=" | uro | nuclei -t /home/g0x0kakashi/fuzz/lfi/linux-lfi-fuzz.yaml -fuzz
echo -e "\e[34mScan completed for $domain\e[0m"
}
# Scan a single domain if provided
if [ -n "$domain" ]; then
scan_domain "$domain"
fi
# Scan domains from the list file if provided
if [ -n "$list_file" ]; then
if [ ! -f "$list_file" ]; then
echo -e "\e[31mFile $list_file not found!\e[0m"
exit 1
fi
domains=$(cat "$list_file")
for domain in $domains; do
scan_domain "$domain"
done
fi
echo -e "\e[33mAll scans completed.\e[0m"