invernizzi / scapy-http

Support for HTTP in Scapy
Other
301 stars 77 forks source link

User-Agent parse error #14

Closed zorelworld closed 8 years ago

zorelworld commented 8 years ago

pkt[http.HTTPRequest].Host is right.But pkt[http.HTTPRequest].User-Agent is wrong.if my field have '-',the error will Appear

invernizzi commented 8 years ago

Hi, thanks for the bug report. I tried to reproduce it, using a User-Agent with a '-' in it, but I do not get any parsing error. Would you mind giving me an example, or more information about the bug? Thanks!

invernizzi commented 8 years ago

I'm closing this because I couldn't reproduce it. Please, reopen this bug if needed.

jgrover commented 7 years ago

Also encountering this error, where an error appears when a hyphen is used. Got around it by just doing a regex search against the full header. Using the latest scapy3k package on Python 3.5.1 / Ubuntu 16.04.

Edit: Slight clarification. There is no error produced on screen. It just doesn't find the field value name.

jgrover commented 7 years ago

Dug a little further with this. The header dictionary is formed properly by the scapy_http library, but the problem exists in the scapy direct dictionary structure/method.