0

I am running the HTTP extension to Scapy from here. This is what I did:

  1. Started scapy and did sniff(filter="tcp",count=100)
  2. Opened a browser and searched for an image
  3. Came back to Scapy and did a=_ and if HTTPResponse in a: print a.show()

It seems that there are no HTTPResponse packets, which is impossible since I see responses in the browser. Why does this happen?

1
  • Could you please post your entire code? I'm not going to ask your question, I just want to see a full example of it :-) Feb 7, 2014 at 17:23

1 Answer 1

3

sniff return a vector of packets, on which you need to iterate and check if each packet has the HTTP layer you are looking for:

a = sniff(...)
for packet in a:
    if HTTPResponse in packet:
        packet.show()

This should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.