Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update #55

Open
DmitriKh opened this issue Sep 12, 2021 · 1 comment
Open

Documentation update #55

DmitriKh opened this issue Sep 12, 2021 · 1 comment

Comments

@DmitriKh
Copy link
Contributor

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))

@Don42
Copy link
Contributor

Don42 commented Nov 28, 2021

This seems more like a bug than a documentation issue.

I was trying to reproduce this issue, but both samples/test.pcap and test/test_data/test.pcap seem to be missing.

Are you able to provide the code you ran (was it just the example code) and the test.pcap file you were using (in case that makes a difference)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants