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

IEEE80211 Protocol unpack Frame #474

Open
legend21313 opened this issue Apr 29, 2020 · 0 comments
Open

IEEE80211 Protocol unpack Frame #474

legend21313 opened this issue Apr 29, 2020 · 0 comments
Labels

Comments

@legend21313
Copy link

legend21313 commented Apr 29, 2020

I just captured via wireshark the network traffic. I am trying to get the http request. The problem is that my whole data is captured in IEEE80211 Protocol, almost all example are about ethernet Protocol.

#!/usr/bin/env python

import dpkt

f = open('data/data.pcap','rb')
pcap = dpkt.pcap.Reader(f)

for ts, buf in pcap:
 eth = dpkt.ieee80211.IEEE80211(buf)
 ip = eth.data
 tcp = ip.data

 if tcp.dport == 80 and len(tcp.data) > 0:
  http = dpkt.http.Request(tcp.data)
  print (http.uri)

f.close()

I am getting Error:

Traceback (most recent call last):
  File "C:/Users/user/parser/take.py", line 11, in <module>
    tcp = ip.data
AttributeError: 'bytes' object has no attribute 'data'

How can I access the data in a IEEE80211 Protocol?
I hope anyone can help me.
@kbandla

Thanks

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

No branches or pull requests

2 participants