You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example given in "Automatically decoding layers" shows
eth_frame = ethernet.Ethernet(capfile.packets[0].raw())
wifi_frame = wifi.WIFI(capfile.packets[1].raw())
print(eth_frame)
ethernet from 00:11:22:33:44:55 to ff:ee:dd:cc:bb:aa type IPv4
print(wifi_frame)
QoS data (sa: None, ta: 00:11:22:33:44:55, ra: ff:ee:dd:cc:bb:aa, da: None)
ip_packet = ip.IP(eth_frame.payload)
print(ip_packet)
When tested on python 3.9.x the example requires additional "binascii.unhexlify" to create IP packet from Ethernet and UDP from IP.
ip_packet = ip.IP(binascii.unhexlify(eth_frame.payload))
udp_frame = udp.UDP(binascii.unhexlify(ip_packet.payload))
The text was updated successfully, but these errors were encountered:
Example given in "Automatically decoding layers" shows
When tested on python 3.9.x the example requires additional "binascii.unhexlify" to create IP packet from Ethernet and UDP from IP.
ip_packet = ip.IP(binascii.unhexlify(eth_frame.payload))
udp_frame = udp.UDP(binascii.unhexlify(ip_packet.payload))
The text was updated successfully, but these errors were encountered: