From ce1b1e42e7c90176c7038989f1fb01ecd0ee8a68 Mon Sep 17 00:00:00 2001 From: theunkownhacker <128781393+theunkownhacker@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:43:41 +1000 Subject: [PATCH 1/2] Update wifijammer --- wifijammer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifijammer b/wifijammer index 5cee576..c9728d5 100755 --- a/wifijammer +++ b/wifijammer @@ -237,7 +237,7 @@ def channel_hop(mon_iface, args): print('['+R+'-'+W+'] Could not execute "iw"') os.kill(os.getpid(), SIGINT) sys.exit(1) - for line in proc.communicate()[1].split('\n'): + for line in proc.communicate()[1].decode().split('\n'): if len(line) > 2: # iw dev shouldnt display output unless there's an error err = '['+R+'-'+W+'] Channel hopping failed: '+R+line+W From a1eed5e8010767b7ffd19b02ee2e9821c7737719 Mon Sep 17 00:00:00 2001 From: TheUnknownHacker <128781393+The-UnknownHacker@users.noreply.github.com> Date: Sat, 20 Jul 2024 12:46:04 +1000 Subject: [PATCH 2/2] Update wifijammer for Python3 support --- wifijammer | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wifijammer b/wifijammer index c9728d5..1e21b2f 100755 --- a/wifijammer +++ b/wifijammer @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import fcntl @@ -13,6 +13,7 @@ import sys import os from scapy.all import * import logging + logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up Scapy conf.verb = 0 # Scapy I thought I told you to shut up @@ -157,7 +158,7 @@ def get_iface(interfaces): for iface in interfaces: count = 0 proc = Popen(['iwlist', iface, 'scan'], stdout=PIPE, stderr=DN) - for line in proc.communicate()[0].split('\n'): + for line in proc.communicate()[0].decode().split('\n'): if ' - Address:' in line: # first line in iwlist scan for a new AP count += 1 scanned_aps.append((count, iface)) @@ -368,7 +369,7 @@ def cb(pkt): # Filter out all other APs and clients if asked if args.accesspoint: # track bssid for essid - if (pkt.haslayer(Dot11Beacon) or pkt.haslayer(Dot11ProbeResp)) and pkt[Dot11Elt].info in args.accesspoint: + if (pkt.haslayer(Dot11Beacon) or pkt.haslayer(Dot11ProbeResp)) and pkt[Dot11Elt].info.decode() in args.accesspoint: args.accesspoint.add(pkt[Dot11].addr3.lower()) # bail if bssid is not in target list if not args.accesspoint.intersection([pkt.addr1.lower(), pkt.addr2.lower()]): @@ -394,11 +395,11 @@ def cb(pkt): def APs_add(clients_APs, APs, pkt, chan_arg, world_arg): - ssid = pkt[Dot11Elt].info + ssid = pkt[Dot11Elt].info.decode() bssid = pkt[Dot11].addr3.lower() try: # Thanks to airoscapy for below - ap_channel = str(ord(pkt[Dot11Elt:3].info)) + ap_channel = str(pkt[Dot11Elt:3].info[0]) chans = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'] if not args.world else [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'] if ap_channel not in chans: