ylliX - Online Advertising Network

Magical Bytes

“Magic bytes” are a common part of a file header. The first few bytes of a file can often be used to identify what type of file it is. For example, a bitmap file starts with “BM”, and a PGM file always starts with “PN” where “N” is a number between 1 and 6, describing […]

Scapy: How to get an Ether frame in bytes

I am capturing a single package using scapy: from scapy.all import * while True: data = sniff(iface=”lo”, count = 1) Then I try to convert the resulting object into bytes: print(raw(data)) And I’m getting an error: TypeError: ‘Ether’ object cannot be interpreted as an integer I need to capture a packet and store it in […]