| |
- builtins.object
-
- WifiDeauth
class WifiDeauth(builtins.object) |
|
WifiDeauth(targets: str = '*', bssid: str = '*', interface: str = None, debug: int = 0, **kwargs)
This class implement Deauth Wifi attack (DoS Wifi attack).
targets(str) = "*": MAC address to Deauth (use glob and regex syntax), default deauth all
bssid(str) = "*": gateway BSSID (use glob and regex syntax), default all BSSID is used
interface(str) = None: if interface use this interface else use default scapy interface |
|
Methods defined here:
- __init__(self, targets: str = '*', bssid: str = '*', interface: str = None, debug: int = 0, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- check_addr(self, packet: scapy.packet.Packet) -> bool
- This function is filter and analyse MAC source and BSSID.
>>> addr=":".join(["0A"]*6); deauth = WifiDeauth()
>>> assert deauth.check_addr(RadioTap()/Dot11(type=0, subtype=12, addr1=addr, addr2=addr, addr3=addr))
>>> deauth = WifiDeauth(addr, addr)
>>> assert deauth.check_addr(RadioTap()/Dot11(type=0, subtype=12, addr1=addr, addr2=addr, addr3=addr))
>>> deauth = WifiDeauth("*:*", "*:*")
>>> assert deauth.check_addr(RadioTap()/Dot11(type=0, subtype=12, addr1=addr, addr2=addr, addr3=addr))
>>> deauth = WifiDeauth("0A:.*", ".*:0A")
>>> assert deauth.check_addr(RadioTap()/Dot11(type=0, subtype=12, addr1=addr, addr2=addr, addr3=addr))
>>> deauth = WifiDeauth("^[A-Za-z0-9]{2}$", "^[A-Za-z0-9]{2}$")
>>> assert not deauth.check_addr(RadioTap()/Dot11(type=0, subtype=12, addr1=addr, addr2=addr, addr3=addr))
- check_packet(self, packet: scapy.packet.Packet) -> bool
- This function is a filter, if return True launch
Deauth if return False don't launch Deauth.
>>> from scapy.all import Ether, IP, TCP; addr=":".join(["0A"]*6); deauth = WifiDeauth()
>>> assert not deauth.check_packet(RadioTap())
>>> assert not deauth.check_packet(RadioTap()/Dot11(type=0, subtype=12, addr1=addr, addr2=addr, addr3=addr))
>>> assert deauth.check_packet(RadioTap()/Dot11(type=2, subtype=12, addr1=addr, addr2="01:01:01:01:01:01", addr3=addr))
>>> assert not deauth.check_packet(Ether()/IP()/TCP())
- deauth(self, packet: scapy.packet.Packet) -> None
- This function send Deauth packet.
- sniff(self)
- This function sniff the network traffic and launch deaut attack if
is Dot11 packet and BSSID, source MAC address and interface match.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |