-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.sh
238 lines (163 loc) · 4.22 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/bin/bash
while :
do
clear
echo
echo
echo -e "\033[32m _________ .______. .___ \033[0m"
echo -e "\033[32m / _____/____ ____ __| _/\_ |__ _______ ___ ____ __| _/ \033[0m"
echo -e "\033[32m \_____ \\__ \ / \ / __ | | __ \ / _ \ \/ // __ \ / __ | \033[0m"
echo -e "\033[32m / \/ __ \| | \/ /_/ | | \_\ ( <_> > <\ ___// /_/ | \033[0m"
echo -e "\033[32m /_______ (____ /___| /\____ | |___ /\____/__/\_ \\___ >____ | \033[0m"
echo -e "\033[32m \/ \/ \/ \/ \/ \/ \/ \/ \033[0m"
echo
int_handler (){
clear
echo
echo -e "\033[1m [+] Adios\033[0m"
echo
kill $PPID
exit 1
}
trap 'int_handler' INT
if [ "$(id -u)" != "0" ]; then
echo "Ejecute este script como root (usando sudo)."
exit 1
fi
Comprobar (){
if command -v manalyze >/dev/null 2>&1; then
echo -e "\n[✔️] manalyze"
else
echo -e "\n[❌] manalyze"
fi
if command -v peframe >/dev/null 2>&1; then
echo -e "\n[✔️] peframe"
else
echo -e "\n[❌] peframe"
fi
if command -v pestr >/dev/null 2>&1; then
echo -e "\n[✔️] pestr"
else
echo -e "\n[❌] pestr"
fi
if command -v pscodedump >/dev/null 2>&1; then
echo -e "\n[✔️] pscodedump"
else
echo -e "\n[❌] pscodedump"
fi
if command -v olevba >/dev/null 2>&1; then
echo -e "\n[✔️] olevba"
else
echo -e "\n[❌] olevba"
fi
if command -v xlmdeobfuscator >/dev/null 2>&1; then
echo -e "\n[✔️] xlmdeobfuscator"
else
echo -e "\n[❌] xlmdeobfuscator"
fi
if command -v pdfextract >/dev/null 2>&1; then
echo -e "\n[✔️] pdfextract"
else
echo -e "\n[❌] pdfextract"
fi
if command -v pdfresurrect >/dev/null 2>&1; then
echo -e "\n[✔️] pdfresurrect"
else
echo -e "\n[❌] pdfresurrect"
fi
}
Instalar (){
if command -v manalyze >/dev/null 2>&1; then
echo -e "\n[✔️] manalyze"
else
echo -e "\n[❌] manalyze"
apt-get install libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libssl-dev build-essential cmake git
pkg install boost-libs-1.55.0_8 libressl cmake git
git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze
cmake .
make -j5
cd bin && ./manalyze --version
cd ..
make install
fi
if command -v peframe >/dev/null 2>&1; then
echo -e "\n[✔️] peframe"
else
echo -e "\n[❌] peframe"
sudo apt install git
git clone https://github.com/guelfoweb/peframe.git
cd peframe
sudo apt-get install libreadline-dev
pip3 install -r requirements.txt
pip3 install readline
sudo bash install.sh
sudo python3 setup.py install
fi
if command -v pestr >/dev/null 2>&1; then
echo -e "\n[✔️] pstr"
else
echo -e "\n[❌] pstr"
sudo apt-get install pev
fi
if command -v pcodedmp >/dev/null 2>&1; then
echo -e "\n[✔️] pcodedmp"
else
echo -e "\n[❌] pcodedmp"
pip install pcodedmp -U
fi
if command -v olevba >/dev/null 2>&1; then
echo -e "\n[✔️] olevba"
else
echo -e "\n[❌] olevba"
pip install oletools
fi
if command -v xlmdeobfuscator >/dev/null 2>&1; then
echo -e "\n[✔️] xlmdeobfuscator"
else
echo -e "\n[❌] xlmdeobfuscator"
pip install XLMMacroDeobfuscator --force
fi
if command -v pdfextract >/dev/null 2>&1; then
echo -e "\n[✔️] pdfextract"
else
echo -e "\n[❌] pdfextract"
pip install pdfextract
fi
if command -v pdfresurrect >/dev/null 2>&1; then
echo -e "\n[✔️] pdfresurrect"
else
echo -e "\n[❌] pdfresurrect"
git clone https://github.com/enferex/pdfresurrect.git
cd pdfresurrect
./configure
make
./configure --prefix=/my/desired/path/
./configure --enable-debug
make install
fi
if [ -d Manalyze ]; then
rm -r Manalyze;
fi
}
echo -e "\033[1m [1] Comprobar requsitos \033[0m"
echo -e "\033[1m [2] Instalar requisitos \033[0m"
echo -e "\033[1m [3] Salir \033[0m"
echo
#leemos del teclado
read -p $'\033[1m [+] Seleccione una opción: \033[0m' opcion
case $opcion in
1) echo
Comprobar
sleep 3.0;;
2) echo
Instalar
sleep 1.5;;
3) echo
clear
echo
echo -e "\033[1m [+] Adios\033[0m"
echo
exit;;
esac
echo
done