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
I'm trying to user scapy_http, but I have a problem of referncing fields that have a "-" in them.
So doing something like pkt[HTTPRequest].Host is OK, but pkt[HTTPRequest].User-Agent is not.
I saw that in Steeve Barbeau's original code he used different lists for the fields_rfc(e.g. User-Agent) and the fields_desc(UserAgent), thus allowing to reference the user agent by pkt[HTTPRequest].UserAgent.
Is there a way to do something like this ???
Tnx,
Omri
The text was updated successfully, but these errors were encountered:
Hi Omri,
I've decided to go for 'User-Agent' (because I expect it to be written that way :) ). This choice does have this drawback, but it's easily fixed like so:
Hi Omri,
I've decided to go for 'User-Agent' (because I expect it to be written
that way :) ). This choice does have this drawback, but it's easily fixed
like so:
print pkt[HTTPRequest].fields['User-Agent']
prints out
'Wget/1.13.4 (linux-gnu)'
—
Reply to this email directly or view it on GitHub #7 (comment).
Hi,
I'm trying to user scapy_http, but I have a problem of referncing fields that have a "-" in them.
So doing something like pkt[HTTPRequest].Host is OK, but pkt[HTTPRequest].User-Agent is not.
I saw that in Steeve Barbeau's original code he used different lists for the fields_rfc(e.g. User-Agent) and the fields_desc(UserAgent), thus allowing to reference the user agent by pkt[HTTPRequest].UserAgent.
Is there a way to do something like this ???
Tnx,
Omri
The text was updated successfully, but these errors were encountered: