22 lines
416 B
Python
Executable File
22 lines
416 B
Python
Executable File
#!/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() |