invernizzi / scapy-http

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

HTTPResponse #43

Open luoyechao opened 5 years ago

luoyechao commented 5 years ago

In the packet,I get the HTTPResponse.When I use the res['HTTPRespons'].User-Agent to access the user-agent, '-' in python can't be use.How should I resolve the problem?

bsitruk commented 5 years ago

You can use

getattr(res['HTTPResponse'], 'User-Agent')