forked from Cyb0r9/ispy
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.sh
executable file
·78 lines (73 loc) · 2.53 KB
/
setup.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
#!/bin/bash
#Colors
white="\033[1;37m"
grey="\033[0;37m"
purple="\033[0;35m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
Cyan="\033[0;36m"
Cafe="\033[0;33m"
Fiuscha="\033[0;35m"
blue="\033[1;34m"
nc="\e[0m"
#
#path=/opt/metasploit-framework/embedded/framework/modules/exploits/windows/smb/eternalblue_doublepulsar.rb # new Path for MSF6
path=/usr/share/metasploit-framework/modules/exploits/windows/smb/eternalblue_doublepulsar.rb #Old Path install eternalblue_doublepulsar.rb
clear
if hash msfconsole 2>/dev/null; then
echo -e "$white[$green+$white] Metasploit installed $nc"
else
echo -e "$white[$green!$white]$red Metasploit not installed$nc"
echo -e "$blue installing ..$nc"
apt update
apt install metasploit-framework -y
echo -e "$white[$green+$white] Metasploit installed successfully."
fi
if hash curl 2>/dev/null; then
echo -e "$white[$green+$white] Curl installed $nc"
else
echo -e "$white[$green!$white]$red Curl not installed$nc"
echo -e "$blue installing ..$nc"
apt update
apt install curl -y
echo -e "$white[$green+$white] Curl installed successfully."
fi
if hash python2 2>/dev/null; then
echo -e "$white[$green+$white] Python installed $nc"
else
echo -e "$white[$green!$white]$red Python not installed$nc"
echo -e "$blue installing ..$nc"
apt update; apt install python2 -y
echo -e "$white[$green+$white] Python installed successfully."
fi
if [ -f $path ]; then
echo -e "$white[$green+$white] DoublePulsar installed$nc "
else
echo -e "$white[$green!$white]$red DoublePulsar not installed$nc"
echo -e "$blue installing ..$nc"
tmppath=$PWD
git clone https://github.com/ElevenPaths/Eternalblue-Doublepulsar-Metasploit
cp -R -f Eternalblue-Doublepulsar-Metasploit /root
cp /root/Eternalblue-Doublepulsar-Metasploit/eternalblue_doublepulsar.rb /usr/share/metasploit-framework/modules/exploits/windows/smb/
#/opt/metasploit-framework/embedded/framework/modules/exploits/windows/smb/ #MSF6_Path
#/usr/share/metasploit-framework/modules/exploits/windows/smb/ #MSF4_Path
rm -rf $tmppath/Eternalblue-Doublepulsar-Metasploit
fi
depend=$(dpkg -s wine32 | grep 'Status' | awk -F':' '/Status: / {print $2}') #Check package wine32 installed
if [ "$depend" = " install ok installed" ]; then
echo -e "$white[$green+$white] Wine installed $nc"
else
echo -e "$white[$green!$white]$red Wine not installed$nc"
echo -e "$blue installing ..$nc"
dpkg --add-architecture i386
apt update; apt install wine wine32 wine64 winexe windows-binaries -y
winecfg
fi
echo -e "$green"
echo -e "you are ready to launch ispy"
sleep 1
echo -e "launching ispy$nc"
sleep 1
chmod +x ispy
./ispy