-
Fake a HTTP referrer
Hi,
Is it possible to send a form as normal, but fake it's referrer URL?
I have a script, however it must be called from a specific server. Is there a way to overcome this? If I submit the form via the file on my hard drive, as the HTTP referrer doesn't match, an error is produced.
I was thinking maybe use JavaScript or something?
TIA.
-
i don't think that you can altar it. that would probably get a lot of people mad, because just about any website could steal their scripts.
perhaps what you could do, is store what the referrer is in a text file, and then include it. that way you can easily change it when you move it from your HD to your site.
-
Yes, you can fake the referrer, cookies, user agent, or anything. Just use telnet to connect to a server and manually type the HTTP commands.
-
Hmm. Thanks for that JoshT. Do you have any source, perhaps in Visual Basic to do that? As in connect to a server, and post a form, faking the referrer?
Thanks.
-
I don't have any decent code handy, but use your favorite language to content to a webserver and send the following (note newlines, and my HTTP might be a little off).
And referer is supposed to be misspelled.
:D
-
JoshT,
I tried it your way, but I get 'Bad Request'. If I spell it 'referrer', there is no error, but the script does not work.
Please help :(
-
EDIT: Now it works with 'referer' but it still doesn't execute.
-
Hmm. Try a simpler request and see if you have any problems:
(then 2 newlines / enters)
-
Also, whatever number you put for Content-length, the server won't send a response until you've sent it that much data.
-
JoshT!
The Content-length wasn't right!! It now works! THANKS!