Reputation: 709
How can I intercept the post data a page is sending in FF or Chrome via configuration, extension or code? (Code part makes this programming related. ;)
I currently use Wireshark/Ethereal for this, but it's a bit difficult to use.
Upvotes: 42
Views: 98395
Reputation: 53
In network tab of Web Developer tools in firefox right click on the PUT, POST or any type of request, you will find "Use as Fetch in Console" option. Here we can seed the data we are passing.
Upvotes: 0
Reputation: 11
Programatically, you can do this with dBug - it's a small code module you can integrate into any website. I use it with CodeIgniter and it works perfectly.
Upvotes: 0
Reputation: 3115
With Firefox you can use the Network tab (Ctrl+Shift+E or Command+Option+E). The sub-tab "Params" shows the submitted form data.
Reference: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_details#Params
Alternatively, in the console (Ctrl+Shift+K or Command+Option+K) right click on the big pane and check "Log Request and Response Bodies". Then when the form is submitted, a line with POST <url>
will appear. Click on it; it will open a new window with the form data.
As of the time of originally writing this reply, both methods messed up newlines in textarea fields. The former deleted them, the latter converted them to blanks. I haven't checked with a newer version.
Upvotes: 28
Reputation: 11666
You could just use the Chrome Developer Tools, if you only need to track requests. Activate them with Ctrl+Shift+I and select the Network tab.
This works also when Chrome talks HTTPS with another server (and unless you have the HTTPS private key you cannot use Wireshark to sniff that traffic).
(I copied this answer from this related query.)
Upvotes: 28
Reputation: 176169
For Firefox there is also TamperData, and even more powerful and cross-browser is Fiddler.
Upvotes: 3