2

I am using jNetPcap library to extract packet information from an offline Pcap file.When I capture packets on Wi-fi network with Microsoft Interface I am able to extract the Http header with all fields. However with Intel Interface(i.e when I am on Proxy Connection), I am unable to get the complete http header, certain fields such as RequestURl,Request Version,RequestMethod are missing. The fields can be seen on Wireshark files but they aren't showing up in my program output. Kindly let me know why this happens.

    String req_url = http.fieldValue(Request.RequestUrl);

And the output is :

    Http:  ******* Http offset=54 (0x36) length=463 protocol suite=TCP/IP

    Http: 
    Http:             HOST = google.com
    Http: PROXY-CONNECTION = keep-alive
    Http:       USER-AGENT = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7
    Http:           ACCEPT = text/html,application/xhtml+xml,applic(etc..)
    Http:          REFERER = http://googleads.g.doubleclick.net/pagead/drt/s
    Http:  ACCEPT-ENCODING = gzip,deflate,sdch
    Http:  ACCEPT-LANGUAGE = en-US,en;q=0.8
    Http:   ACCEPT-CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.3
Rhiya
  • 271
  • 6
  • 21
  • 1
    perhaps the capture is truncating packets? It would help if you could post the captures files. – rupello Feb 23 '12 at 14:32
  • I can see them in my captured Pcap files. But It doesn't show in my program output. I am using jNetPcap library and there is inbuilt function to access the headers. The code looks like this String req_url = http.fieldValue(Request.RequestUrl); – Rhiya Feb 24 '12 at 02:16

0 Answers0