-
Notifications
You must be signed in to change notification settings - Fork 324
/
findsploit
executable file
·130 lines (122 loc) · 4.76 KB
/
findsploit
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
# Findsploit by @xer0dayz
# https://sn1persecurity.com
#
# Finsploit is a simple bash script to quickly and easily search both local and online exploit databases.
#
clear
VER='2.0'
SEARCHSPLOIT_SCRIPT='/usr/bin/searchsploit'
NMAP_SCRIPTS='/usr/share/findsploit/nmap/nmap'
MSF_SEARCH_DIR='/usr/share/findsploit/msf_search'
BROWSER_CMD='firefox'
VAR1=$1;
VAR2=$2;
VAR3=$3;
VARS="$*"
OKRED='\033[91m'
COLOR2='\033[1m\033[92m'
OKRED='\033[1m'
OKBLUE='\033[94m'
OKRED='\033[91m'
OKGREEN='\033[92m'
OKORANGE='\033[93m'
RESET='\e[0m'
REGEX='^[0-9]+$'
function logo {
echo -e "$OKRED ___ _ _ _ _ _ "
echo -e "$OKRED / __(_)_ __ __| |___ _ __ | | ___ (_) |_ "
echo -e "$OKRED / _\ | | '_ \ / _\` / __| '_ \| |/ _ \| | __|"
echo -e "$OKRED/ / | | | | | (_| \__ \ |_) | | (_) | | |_ "
echo -e "$OKRED\/ |_|_| |_|\__,_|___/ .__/|_|\___/|_|\__|"
echo -e "$OKRED |_| "
echo ""
echo -e "$OKRED + -- --=[ findsploit v$VER by @xer0dayz"
echo -e "$OKRED + -- --=[ https://sn1persecurity.com$RESET"
echo ""
}
function update {
logo
echo -e "$OKRED + -- --=[ Checking for updates... $RESET"
if [[ $(curl -s https://api.github.com/repos/1N3/Findsploit/tags) == "" ]];
then
echo -e "$OKRED + -- --=[ Error: no active internet connection $RESET"
echo ""
exit 1
fi
LATEST_VERSION=$(curl -s https://api.github.com/repos/1N3/Findsploit/tags | grep -Po '"name":.*?[^\\]",'| head -1 | cut -c11-13)
if [[ "$LATEST_VERSION" != "$VER" && "$LATEST_VERSION" != "" ]];
then
echo -e "$OKRED + -- --=[ Findsploit v$LATEST_VERSION is available to download. $RESET"
echo -e "$OKRED + -- --=[ Do you want to update Findsploit [Y/n]: $RESET"
read answer
if [[ "$answer" == "Y" || "$answer" == "y" ]] ;
then
cd ~ || { echo -e "$OKRED + -- --=[ Update Failed $RESET" ; exit 1 ; }
rm -r Findsploit 2> /dev/null
git clone https://github.com/1N3/Findsploit || { echo -e "$OKRED + -- --=[ Couldn't download latest version $RESET" ; exit 1; }
cd Findsploit || { echo -e "$OKRED + -- --=[ Update Failed $RESET" ; exit 1 ;}
git checkout $LATEST_VERSION 2> /dev/null
./install.sh
cd ..
rm -r Findsploit
else
exit 1
fi
else
echo -e "$OKRED + -- --=[ Findsploit is already the latest version $RESET"
echo ""
fi
}
if [ -z "$1" ];
then
logo
echo -e "$OKRED + -- --=[ Usage: findsploit windows xp remote, etc. $RESET"
echo ""
echo ""
exit;
fi
if [[ "$1" == "--update" || "$1" == "-u" ]];
then
update
exit
else
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
logo
echo -e "$OKRED + -- --=[ SEARCHING: $COLOR2 $VARS $RESET"
echo ""
echo -e "$OKRED + -- --=[ NMAP SCRIPTS $RESET"
echo ""
egrep -i "$VAR1" $NMAP_SCRIPTS | egrep -i "$VAR2" --color=auto | egrep -i "$VAR3" --color=auto
echo ""
echo -e "$OKRED + -- --=[ METASPLOIT EXPLOIT S$RESET"
echo ""
egrep -i "$VAR1" $MSF_SEARCH_DIR/* | egrep -i "$VAR2" --color=auto | egrep -i "$VAR3" --color=auto
echo ""
echo -e "$OKRED + -- --=[ EXPLOITDB EXPLOITS $RESET"
echo ""
$SEARCHSPLOIT_SCRIPT $VARS
echo ""
echo 'https://www.exploit-db.com/search?q='$VAR1'+'$VAR2'+'$VAR3
echo 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+exploit'
echo 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+exploit+site:www.securityfocus.com'
echo 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+site:0day.today'
echo 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+site:www.security-database.com'
echo 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+site:packetstormsecurity.com'
echo 'https://exploits.shodan.io/?q='$VAR1'+'$VAR2'+'$VAR3
echo 'https://vulners.com/search?query='$VAR1'+'$VAR2'+'$VAR3
echo ""
echo -e "$OKORANGE + -- --=[ Press any key to search online or Ctrl+C to exit...$RESET"
read test
$BROWSER_CMD 'https://sn1persecurity.com' 2> /dev/null &
sleep 5
$BROWSER_CMD 'https://www.exploit-db.com/search?q='$VAR1'+'$VAR2'+'$VAR3 2>/dev/null &> /dev/null
$BROWSER_CMD 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+exploit' 2>/dev/null &> /dev/null
$BROWSER_CMD 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+exploit+site:www.securityfocus.com' 2> /dev/null &> /dev/null
$BROWSER_CMD 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+site:0day.today' 2> /dev/null &> /dev/null
$BROWSER_CMD 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+site:www.security-database.com' 2> /dev/null
$BROWSER_CMD 'https://www.google.ca/search?q='$VAR1'%20'$VAR2'%20'$VAR3'+site:packetstormsecurity.com' 2> /dev/null &> /dev/null
$BROWSER_CMD 'https://exploits.shodan.io/?q='$VAR1'+'$VAR2'+'$VAR3 2> /dev/null &> /dev/null
$BROWSER_CMD 'https://vulners.com/search?query='$VAR1'+'$VAR2'+'$VAR3 2> /dev/null &> /dev/null
fi
exit