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

Extracting tagged parameters (e.g., HT capabilities) using dpkt #475

Open
ghost opened this issue May 8, 2020 · 0 comments
Open

Extracting tagged parameters (e.g., HT capabilities) using dpkt #475

ghost opened this issue May 8, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented May 8, 2020

I would like to extract tagged parameters (e.g., HT capabilities) using dpkt.

image

I'm trying to make a python code for reading and saving the red one.

import dpkt
import socket

r = b"\x00\x00\x18\x00.@\x00\xa0 \x08\x00\x00\x00\x0b\x85\t\xa0\x00\xa5\x00\x00\x00\xa5\x00\x80\x00\x00\x00\xff\xff\xff\xff\xff\xff\x80\xe8o\xd9\x06\xa0\x80\xe8o\xd9\x06\xa0\xe0\xd0\x8e\xe1*\x02\x11\x05\x00\x00d\x001\x04\x00\nWUNIST_AAA\x01\x08\x8b\x96\x0c\x12\x18$0H\x03\x01\x06\x05\x04\x00\x01\x00\x00\x07\x06KR \x01\r\x14*\x01\x002\x02`l\x0b\x05\x00\x00\x93\x8d[-\x1a\xad\t\x03\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000\x14\x01\x00\x00\x0f\xac\x04\x01\x00\x00\x0f\xac\x04\x01\x00\x00\x0f\xac\x01(\x00=\x16\x06\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x08\x00\x10\x00\x00\x00\x00\x00\x00\xdd\x18\x00P\xf2\x02\x01\x01\x8c\x00\x03\xa4\x00\x00'\xa4\x00\x00BC^\x00b2/\x00\x85\x1e\x00\x00\x8f\x00\x0f\x00\xff\x03@\x00110-10F-12\x00\x00\x00\x00\x00\x00\x00\x00\x00-"

packet = dpkt.radiotap.Radiotap(r)
packet_signal = -(256 - packet.ant_sig.db)  # dBm
frame = packet.data

I have found many functions in dpkt, but there is no functions related to the contents of the tagged parameters (e.g., HT capabilities, extended capabilities, etc.,). For example, packet_signal = -(256 - packet.ant_sig.db) would be used for extracting RSSI.

Is it possible to abstract them using dpkt?

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

0 participants