I needed to view the POST data sent to a website when I completed a form on a webpage and submitted the form. I wanted to view the POST data so that I could use the command line tool cURL to submit a form that would result in a database being queried for certain information. I wanted to use cURL so that I could automate a periodic query of the database with a script and automatically download relevant webpages from the site to my laptop.
I looked at the source code for the page and tried submitting parameter and value combinations I thought would return the appropriate information, but the result page I got when I submitted the form with cURL wasn't exactly the same as when I used Firefox to submit the form, so I wanted to see the POST data Firefox was submitting when I used the form to submit the database query.
I couldn't just use tcpdump to observe the traffic, since the connection to the website was via a VPN connection and the site is accessed via HTTPS rather than HTTP the data transferred between my browser and the website was encrypted. The HttpFox add-on for Firefox allowed me to observe the data submitted to the website with Firefox 3.6.22 even with HTTPS over a VPN connection being used.
To install the addon for Firefox go to the HttpFox :: Add-ons for Firefox webpage and click on the "Add to Firefox" button. When it is added, restart Firefox to complete the installation.
To use HttpFox, within Firefox, click on Tools then select HttpFox and choose Toggle Httpfox Shift+F2 or you can simply hit the Shift and F2 keys together, if using a keyboard for a Microsoft Windows system; on a Mac OS X keyboard, hit Shift, fn and F2. Then click on Start next to the green triangle that will be in the HttpFox area that will appear at the bottom of the Firefox window.
Note: HttpFox did not actually display any data for me when I used HttpFox 0.8.10 with Firefox 3.6.21 under Windows XP running under VMWare nor with Firefox 3.6.22 under Mac OS X 10.6.8 unless I had HttpFox run in its own window. You can run it in its own window by choosing Tools, HttpFox, then Open in Own Window. Or under Tools / HttpFox, you can choose Options and then check the box next to "Open HttpFox always in own window" and then click on Ok.
You can also access HttpFox by clicking on the icon for it that appears in the lower, right-hand corner of the Firefox window.
Once you click on Start next to the green triangle in the HttpFox window, data sent between your Firefox browser and websites will be shown in the HttpFox window as shown below.
To see details on transmissions, click on one of the lines that appear beneath the Started column header and select from Headers, Cookies, Query String, POST Data, or Content .
An example with " Headers" selected appears below.
An example with "POST" selected after a request was submitted for a Google email account appears below. It shows the parameters and associated values submitted when the form was submitted to Google for an email account. POST and GET are the two commonly used methods used when submitting a form to a website.
References:
Created: September 9, 2011