forked from RajChowdhury240/OSCP-CheatSheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecon.sh
98 lines (77 loc) · 3.24 KB
/
Recon.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
#---------------------------------------------------------------------------------#
# Name = Quick n' Dirty Recon Script #
# #
# #
# Usage = chmod +x Recon.sh && ./Recon.sh <IP Address> #
#---------------------------------------------------------------------------------#
# check for IP argument
if [ -z "$1" ]; then
echo -e "\e[35m[*] Usage: \e[36m$0 <IP Address>"
echo -e "\e[39m"
exit 1
fi
# check if packages are installed
if [ ! type nmap &> /dev/null ]; then
echo " "
echo "Please install nmap and rerun the script."
echo " "
exit 0
fi
if [ ! type nikto &> /dev/null ]; then
echo " "
echo "Please install nikto and rerun the script."
echo " "
exit 0
fi
if [ ! type dirb &> /dev/null ]; then
echo " "
echo "Please install dirb and rerun the script."
echo " "
exit 0
fi
if [ ! locate enum4linux &> /dev/null ]; then
echo " "
echo "Please install enum4linux and rerun the script."
echo " "
exit 0
fi
# go ahead and start scanning
echo " "
echo -e "\e[35m#----------------------------------#"
echo -e "\e[35m# \e[36m TCP Scan \e[35m #"
echo -e "\e[35m#----------------------------------#"
echo " "
echo -e "\e[39m"
nmap -Pn -p- -A $1 -r -n --open
echo " "
echo -e "\e[35m#----------------------------------#"
echo -e "\e[35m# \e[36m Nikto Scan \e[35m #"
echo -e "\e[35m#----------------------------------#"
echo " "
echo -e "\e[39m"
nikto -h http://$1/
echo " "
nikto -h https://$1/
echo " "
echo -e "\e[35m#----------------------------------#"
echo -e "\e[35m# \e[36m Dirb Scan \e[35m #"
echo -e "\e[35m#----------------------------------#"
echo " "
echo -e "\e[39m"
dirb http://$1/ /usr/share/wordlists/dirb/big.txt
echo " "
dirb https://$1/ /usr/share/wordlists/dirb/big.txt
echo " "
echo -e "\e[35m#----------------------------------#"
echo -e "\e[35m# \e[36m Enum4linux \e[35m #"
echo -e "\e[35m#----------------------------------#"
echo " "
echo -e "\e[39m"
enum4linux $1
echo " "
echo -e "\e[35m#----------------------------------#"
echo -e "\e[35m# \e[36m Happy Hunting! \e[35m #"
echo -e "\e[35m#----------------------------------#"
echo " "
echo -e "\e[39m"