Add payload

This commit is contained in:
clerie 2024-06-03 15:04:07 +02:00
parent 2d6564f300
commit c939c7b85b

View File

@ -6,8 +6,9 @@ s.bind(("wlp3s0", 0))
src_addr = 0xffffffffffff
dst_addr = 0xffffffffffff
ethertype = 0x1337
payload = b'Hello World'
packet = dst_addr.to_bytes(6) + src_addr.to_bytes(6) + ethertype.to_bytes(2)
packet = dst_addr.to_bytes(6) + src_addr.to_bytes(6) + ethertype.to_bytes(2) + payload
print(packet)
s.send(packet)