01-12-2021, 05:00 PM
Hope some of the good people on Grey Sec can help me with my python script, I’ve used the Linux vim editor to compile the script and ran it in the Terminal
So, I’m scanning my network and looking for packets with 802.11 layers and want to get the MAC Address
When I run the script it doesn’t give any _error_ message but it also doesn’t give any results
Here’s the script
Devices = set()
def PacketHandler(pkt):
if pkt.haslayer(Dot11)
dot11_layer=pkt.getlayer(Dot11)
if dot11_layer.addr2 and (dot11_layer.addr2 not in Devices)
Devices.add(dot11_layer.addr2)
print(dot11_layer.addr2)
sniff(iface=sys.argv[1], count=int(sys.argv[2]), prn=PacketHandler)
So, I’m scanning my network and looking for packets with 802.11 layers and want to get the MAC Address
When I run the script it doesn’t give any _error_ message but it also doesn’t give any results
Here’s the script
Devices = set()
def PacketHandler(pkt):
if pkt.haslayer(Dot11)
dot11_layer=pkt.getlayer(Dot11)
if dot11_layer.addr2 and (dot11_layer.addr2 not in Devices)
Devices.add(dot11_layer.addr2)
print(dot11_layer.addr2)
sniff(iface=sys.argv[1], count=int(sys.argv[2]), prn=PacketHandler)