fireandforget version
This commit is contained in:
parent
4faf53168d
commit
93cbcfefd5
24 changed files with 565 additions and 1840 deletions
22
ethertools/receivebroadcast.py
Normal file
22
ethertools/receivebroadcast.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- mode: Python -*-
|
||||
|
||||
# or tcpdump -i eth1 port 54545 -XX
|
||||
|
||||
import socket
|
||||
|
||||
|
||||
def find_LJ():
|
||||
"""Listen for broadcast packets."""
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
s.bind(("0.0.0.0", 54545))
|
||||
|
||||
while True:
|
||||
data, addr = s.recvfrom(1024)
|
||||
print(" %s " % (data, ))
|
||||
print("Packet from %s: " % (addr, ))
|
||||
|
||||
|
||||
find_LJ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue