Thankfully, curl can't be tricked in such a manner. I'd have a more substantial comment, I hope, if the site was loading.
Firefox and IE's "View source" can be spoofed to show anything
11–20 of 43 posts
Re: Firefox and IE's "View source" can be spoofed to show anything
#12Firefox and IE show the "current" source, which is liable to be replaced as shown by dave1010uk.
Type the following into the Chrome Dev Tools console, then the Firebug console:
testBool = true;
document.write('');
typeof testBool;
Chrome shows boolean, firefox shows undefined.Re: Firefox and IE's "View source" can be spoofed to show anything
#13Re: Firefox and IE's "View source" can be spoofed to show anything
#14Re: Firefox and IE's "View source" can be spoofed to show anything
#15Actually, chrome downloads the source again when you choose "view source". You can see the "modded" source with ctrl/cmd+shift+I.
Re: Firefox and IE's "View source" can be spoofed to show anything
#16Re: Firefox and IE's "View source" can be spoofed to show anything
#17Since the site seems to be down, you can read the article (no images unfortunately) in Google's Cache[1]. [1]: https://webcache.googleusercontent.com/search?q=cache:http:/...
I've recreated a simple proof of concept here: http://taskthere.com/viewsource/ It works in Firefox 6, not sure about any other browsers. If you want to see the actual source, disable JavaScript (or use Chrome or curl).
Re: Firefox and IE's "View source" can be spoofed to show anything
#18Re: Firefox and IE's "View source" can be spoofed to show anything
#19Older Internet Explorer and Firefox versions displayed the source that was downloaded, not the one generated/modified by scripts. It makes so much more sense, especially since there was always an option to view the generated source (by using JavaScript for an example) but I don't see how you can access the downloaded source at all if View Source is replaced by View Generated Source. Hm, actually one could use FireBug…
Re: Firefox and IE's "View source" can be spoofed to show anything
#20Earlier quoted context omitted.
I've recreated a simple proof of concept here: http://taskthere.com/viewsource/ It works in Firefox 6, not sure about any other browsers. If you want to see the actual source, disable JavaScript (or use Chrome or curl).
To see the actual source in Firefox 6, I just viewed the source without dismissing the alert, there was no need to disable anything. The only thing is that with the alert, I couldn't right click on the page and click on "View Page Source", I had to use the menu item Tools: Web Developer: Page Source (or its keyboard shortcut).
Ctrl/Cmd-u can also be used to view source in Firefox.