views:

520

answers:

3

Hi, Say a webpage loads an external javascript at load, is there any such FireFox plugin that I could use to modify the javascript before the page actually processes it? (not just specifically javascript)

Thanks in advance. (also I'm pretty sure Tamper Data plugin only changes header data and not actual content being received)

+1  A: 

You have a couple options:

  1. Tamper Data will modify POST parameters (and GET really since you can modify the URL).
  2. You can also combine FoxyProxy (https://addons.mozilla.org/en-US/firefox/addon/2464) with any number of free interactive proxies (Fiddler, Paros, Burp, Charles)
  3. Finally you can choose to not use a proxy and write up a greasemonkey script.

I think you'll likely have the most luck with the FoxyProxy + proxy approach. Unfortunately it's not a single addon.

Mystic
A: 

I believe GreaseMonkey can modify the data in the page, though I'm not sure if it's executed before or after the page loads.

atk
After the page loads.
Cal S
+4  A: 

For everyone that has never used tamperdata: Tamper data is for OUTGOING requests. Tamper Data can modify the ENTIRE request, except the URL which requires you to replay the request.

Using GreaseMonkey you can make stand-alone custom plugins that can modify any element of the page before it loads.

Here is THE GUIDE you want which explains GreaseMonkey.

Here are a massive number of GreaseMonkey "UserScripts". This site contains many examples of what you are looking for.

Rook
I know it can edit elements but it can't edit page resources, images, etc (or can it?)
Cal S
Probably not the images themselves, but you have full control over the html, so you could change the img links. If you want to modify binaries then you should go with a proxy.
Rook