browserwgettrafficwebautomationcap

Differences between wget and browser wireshark traffic


I'm trying to get Wireshark output that is as close as possible to using a browser manually, via wget or urllib.

The output is different, and I was wondering why, and how do I overcome this?

Thanks!


Solution

  • wget is used primarily to grab whole or partial web sites for offline viewing, or for fast download of single files from HTTP or FTP servers instead.

    A browser request contains HTTP headers like User Agent, Referer, etc.

    If you want to mimic wget to a browser like request, you can pass HTTP headers with your wget request.

    Something like this-

    # wget http://www.remote.co.in/images/myimage.jpg --header="User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0" --header="Accept: image/png,image/;q=0.8,/*;q=0.5" --header="Accept-Language: en-US,en;q=0.5" --header="Accept-Encoding: gzip, deflate" --header="Referer: http://www.mywebsite.com"