forked from Cignoraptor-ita/vozzappa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vozz-eng
420 lines (346 loc) · 9.12 KB
/
vozz-eng
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
#!/bin/bash
clear
echo " "
echo -e "\e[01;34mVOZZAPPA - Whatsapp profiler and forensics tool\e[01;32m"
cat dise.txt
echo -e "\e[00;33mCodename: Test05\e[00m"
echo "-------"
echo -e "\e[01;37mCoded by cignoraptor\e[00m"
echo "-------"
echo " "
echo "Insert file to analyze: "
read filer
cat $filer | grep -Eio "[a-zA-Z0-9]+:" > i.txt
#toglie numeri
sed 's/[0-9]*//g' i.txt > base.txt
#toglie :
sed -e "s/://" base.txt > pro.txt
rm base.txt
#identificazione utenti
echo "Users identification: "
cat pro.txt | tr -cs "[:alnum:]" "\n"| tr "[:lower:]" "[:lower:]" | awk '{h[$1]++}END{for (i in h){print h[i]" "i}}'|sort -nr | cat -n | head -n 2
echo " "
echo -e "\e[00;,33mInsert user to analyze \e[00;31m(name)\e[00m: "
read utente
echo $utente > ute.txt
utea=$(cat ute.txt)
#rm ute.txt
echo "$utea:"
cat $filer > doc.txt
cat doc.txt | grep -e "$utea" > targ
echo -e "- - - - \e[01;32mNEGATIVE WORDS\e[00m"
echo " "
echo -e "\e[00;31mHATE AND DANGERS...\e[00m"
echo -e "\e[01;37m====================================\e[00m"
echo " "
cat targ | grep --color -e hate -e "kill" -e murde
echo " "
echo -e "\e[01;37m====================================\e[00m"
echo " "
echo -e "\e[00;33mGENERAL...\e[00m"
cat targ | grep --color -e horrible -e fack -e shit -e motherfucker -e stupid -e cretin -e idot -e disgust -e shame
echo " "
echo -e "\e[01;37m====================================\e[00m"
echo " "
echo " "
echo " "
echo -e "- - - - \e[01;32mINTEREST\e[00m"
echo " "
echo -e "\e[00;31mWANT\e[00m"
cat targ | grep --color -e want
cat targ | grep --color -E "i would like"
cat targ | grep --color -w -e "i must" -e "i'd like"
echo " "
echo -e "\e[01;37m====================================\e[00m"
echo " "
echo -e "\e[00;31mPLEASURE\e[00m"
cat targ | grep --color -w -e "i like"
cat targ | grep --color -w -e "love"
cat targ | grep --color -e adore -e "fantasti" -e "amazing" -e "wonderful"
echo " "
echo -e "\e[01;37m====================================\e[00m"
echo " "
echo -e "- - - - \e[01;32mREASONS\e[00m"
echo " "
echo -e "\e[00;31mWHY\e[00m"
cat targ | grep --color -e why -e reason
echo " "
echo -e "\e[00;31mBELIEFS\e[00m"
cat targ | grep --color -e "i think" -e creed -e certainly -e believe
echo " "
echo -e "\e[01;37m====================================\e[00m"
echo " "
sed 's/\<and\>//g' targ > tes2
sed 's/\<the\>//g' tes2 > tes3
sed 's/\<in\>//g' tes3 > tes4
sed 's/\<a\>//g' tes4 > tes5
sed 's/\<or\>//g' tes5 > tes6
sed 's/\<nel\>//g' tes6 > tes7
sed 's/\<one\>//g' tes7 > tes8
sed 's/\<una\>//g' tes8 > tes9
sed 's/\<this\>//g' tes9 > tes10
sed 's/\<that\>//g' tes10 > tes11
sed 's/\<ha\>//g' tes11 > tes12
sed 's/\<il\>//g' tes12 > tes13
sed 's/\<del\>//g' tes13 > tes14
sed 's/\<to\>//g' tes14 > tes15
sed 's/\<have\>//g' tes15 > tes16
sed 's/\<è\>//g' tes16 > tes17
sed 's/\<has\>//g' tes17 > tes18
sed 's/\<it\>//g' tes18 > tes19
sed 's/\<these\>//g' tes19 > tes20
sed 's/\<dei\>//g' tes20 > tes21
sed 's/\<dell\>//g' tes21 > tes22
sed 's/\<likes\>//g' tes22 > tes23
sed 's/\<replies\>//g' tes23 > tes24
sed 's/\<http\>//g' tes24 > tes25
sed 's/\<ly\>//g' tes25 > tes26
sed 's/\<bit\>//g' tes26 > tes27
sed 's/\<0\>//g' tes27 > tes28
sed 's/\<retweet\>//g' tes28 > tes29
sed 's/\<alle\>//g' tes29 > tes30
sed 's/\<of\>//g' tes30 > tes31
sed 's/\<piace\>//g' tes31 > tes32
sed 's/\<mi\>//g' tes32 > tes33
sed 's/\<comment\>//g' tes33 > tes34
sed 's/\<immagine\>//g' tes34 > tes35
sed 's/\<contenere\>//g' tes35 > tes36
sed 's/\<all\>//g' tes36 > tes37
sed 's/\<Commenti\>//g' tes37 > tes38
sed 's/\<org\>//g' tes38 > tes39
sed 's/\<www\>//g' tes39 > tes40
sed 's/\<com\>//g' tes40 > tes41
sed 's/\<ed\>//g' tes41 > tes42
sed 's/\<da\>//g' tes42 > tes43
sed 's/\<htm\>//g' tes43 > tes44
sed 's/\<io\>//g' tes44 > tes45
sed 's/\<per\>//g' tes45 > tes46
sed 's/\<che\>//g' tes46 > tes47
sed 's/\<quel\>//g' tes47 > tes48
sed 's/\<i\>//g' tes48 > tes49
sed 's/\<voi\>//g' tes49 > tes50
sed 's/\<tutti\>//g' tes50 > tes51
sed 's/\<quando\>//g' tes51 > tes52
sed 's/\<https\>//g' tes52 > tes53
sed 's/\<twitter\>//g' tes53 > tes54
sed 's/\<search\>//g' tes54 > tes55
sed 's/\<button\>//g' tes55 > tes56
sed 's/\<startpage\>//g' tes56 > tes57
sed 's/\<do\>//g' tes57 > tes58
sed 's/\<proxy\>//g' tes58 > tes59
sed 's/\<language\>//g' tes59 > tes60
sed 's/\<lang\>//g' tes60 > tes61
sed 's/\<BUTTON\>//g' tes61 > tes62
sed 's/\<web\>//g' tes62 > tes63
sed 's/\<q\>//g' tes63 > tes64
sed 's/\<cat\>//g' tes64 > tes65
sed 's/\<to\>//g' tes65 > tes66
sed 's/\<english\>//g' tes66 > tes67
sed 's/\<with\>//g' tes67 > tes68
sed 's/\<Tweet\>//g' tes68 > tes69
sed 's/\<Retweet\>//g' tes69 > tes70
sed 's/\<src\>//g' tes70 > tes71
sed 's/\<hashtag\>//g' tes71 > tes72
sed 's/\<hash\>//g' tes72 > tes73
sed 's/\<alternate\>//g' tes73 > tes74
sed 's/\<html\>//g' tes74 > tes75
sed 's/\<it\>//g' tes75 > tes76
sed 's/\<It\>//g' tes76 > tes77
sed 's/\<IT\>//g' tes77 > tes78
sed 's/\<del\>//g' tes78 > tes79
sed 's/\<DEL\>//g' tes79 > tes80
sed 's/\<LANGUAGE\>//g' tes80 > tes81
sed 's/\<PROXY\>//g' tes81 > tes82
sed 's/\<LANG\>//g' tes82 > tes83
sed 's/\<spg\>//g' tes83 > tes84
sed 's/\<DO\>//g' tes84 > tes85
sed 's/\<highlight\>//g' tes85 > tes86
sed 's/\<ma\>//g' tes86 > tes87
sed 's/\<pi\>//g' tes87 > tes88
sed 's/\<l\>//g' tes88 > tes89
sed 's/\<si\>//g' tes89 > tes90
sed 's/\<non\>//g' tes90 > tes91
sed 's/\<perch\>//g' tes91 > tes92
sed 's/\<mi\>//g' tes92 > tes93
sed 's/[0-9]*//g' tes93 > tes94
#toglie : e <mediaerror>
sed "s/[<][^)]*[>]//g" tes94 > tes95
sed -e "s/://" tes95 > fi.txt
rm tes2
rm tes3
rm tes4
rm tes5
rm tes6
rm tes7
rm tes8
rm tes9
rm tes10
rm tes11
rm tes12
rm tes13
rm tes14
rm tes15
rm tes16
rm tes17
rm tes18
rm tes19
rm tes20
rm tes21
rm tes22
rm tes23
rm tes24
rm tes25
rm tes26
rm tes27
rm tes28
rm tes29
rm tes30
rm tes31
rm tes32
rm tes33
rm tes34
rm tes35
rm tes36
rm tes37
rm tes38
rm tes39
rm tes40
rm tes41
rm tes42
rm tes43
rm tes44
rm tes45
rm tes46
rm tes47
rm tes48
rm tes49
rm tes50
rm tes51
rm tes52
rm tes53
rm tes54
rm tes55
rm tes56
rm tes57
rm tes58
rm tes59
rm tes60
rm tes61
rm tes62
rm tes63
rm tes64
rm tes65
rm tes66
rm tes67
rm tes68
rm tes69
rm tes70
rm tes71
rm tes72
rm tes73
rm tes74
rm tes75
rm tes76
rm tes77
rm tes78
rm tes79
rm tes80
rm tes81
rm tes82
rm tes83
rm tes84
rm tes85
rm tes86
rm tes87
rm tes88
rm tes89
rm tes90
rm tes91
rm tes92
rm tes93
rm tes94
rm tes95
#echo -e "-----> \e[01;32mTOP 20 WORDS\e[00m..."
#echo "INSERISCI NUOVO NOME FILE..ELIMINA E,LA,IN,A,O,NEL ECC..."
#read nuov
sed 's/di//g' fi.txt > risu
rm fi.txt
#echo "INSERISCI PAROLE DA CERCARE "
#read uno
#read due
echo " "
echo -e "\e[01;37m====================================\e[00m"
echo -e "\e[01;33mTOP 20 WORDS\e[00m"
cat risu | tr -cs "[:alnum:]" "\n"| tr "[:lower:]" "[:upper:]" | awk '{h[$1]++}END{for (i in h){print h[i]" "i}}'|sort -nr | cat -n | head -n 20
echo " "
echo -e "\e[01;34mSENTIMENT ANALYSIS\e[00m"
echo -e "\e[01;33mAnalyze the number of \e[01;31mbad :(\e[00m o \e[01;36mhappy :)\e[00m phrases for topic\e[00m"
echo " "
cat targ | grep -e ":(" -e hate -e shit -e murde -e ugly -e disgust -e kille -e violen -e fuck -e idot -e asshole -e pain -e hideous -e sick -e horrible -e coward -e dirty -e upset -e shame -e despair > bad.txt
cat targ | grep -w -e "i don't like" -e "not stand you" > b2.txt
cat targ | grep -e ":)" -e adore -e defend -e good -e beautiful -e well -e fantastic -e amazing -e wonder -e honey -e fine -e solar -e cheer -e happ -e joy -e "nice" -e thanks > happy.txt
cat targ | grep -w -e love -e "i like" > ha2.txt
cat bad.txt b2.txt > bf.txt
rm bad.txt && rm b2.txt
mv bf.txt bad.txt
cat happy.txt ha2.txt > h1.txt
rm happy.txt && rm ha2.txt
mv h1.txt happy.txt
echo " "
echo -e "\e[00;31m============\e[00m"
cat bad.txt | wc -l && echo -e "phrases \e[01;31m:(\e[00m"
echo " "
echo -e "\e[01;36m============\e[00m"
cat happy.txt | wc -l && echo -e "phrases \e[01;36m:)\e[00m"
echo " "
echo " "
#rm bad.txt
#rm happy.txt
rm risu
#------
#------
sleep 1
echo " "
found=$(cat bad.txt | wc -l)
ha=$(cat happy.txt | wc -l)
if [[ $found -gt $ha ]]; then
echo "Possible danger, vulgar words"
elif [[ $found -eq $ha ]]; then
echo "Balanced target , low percentage of imminent danger"
elif [[ $ha -gt $found ]]; then
echo "Positive target , unlikely imminent danger"
else
echo "error"
fi
sleep 0.5
echo " "
echo -e "\e[01;34mDepth analysis"
echo " "
sleep 1
echo " "
echo -e "\e[00m"
bc <<<"$found*40/100" > ra.txt
bc <<<"$ha*40/100" > ra3.txt
ris=$(cat ra.txt)
ris3=$(cat ra3.txt)
cat bad.txt happy.txt > pr.txt
prov=$(cat pr.txt)
if [[ $prov = "0" ]]
then
echo -e "\e[01;33mImpossible to proceed for the advanced calculation!\e[00m"
echo "Too low values"
fi
echo "======================="
if [[ $ha -ge $ris ]]; then
echo -e "\e[00;33m! \e[00;35mLow probability of imminent danger: < 40% = \e[00;37mNot high percentage of danger/vulgarity\e[00m"
elif [[ $ha -lt $ris ]]; then
echo -e "\e[00;31mWARNING! \e[01;33mImminent danger: > 60% = \e[01;41mviolence\e[00m"
else
echo -e "\e[00;33mPossible threat: \e[00;38mNot extreme anger but negative percentage around 50%"
fi
rm ra.txt && rm ra3.txt
rm bad.txt
rm happy.txt && rm ute.txt
rm targ && rm pro.txt
rm i.txt && rm pr.txt
rm doc.txt