Hi All.
I am working to enhance some features of a web based apps.
Sometimes for legitimate purposes you may want to spoof the referring URL when opening a web page.
Constraints: Javascript disabled (as a company policy), browser: Firefox. Language: VB scripting is a must.
I tried:
Option Explicit
Dim objShell, url, referringUrl
url="http://www.examplemainsite.com"
referringUrl="http://access1.examplemainsite.com/preparefordownload.html"
Set objShell=CreateObject("WScript.Shell")
objShell.Run "firefox.exe" & referingUrl
WScript.Sleep 5000 'just for user to wait until full loading of the web page
objShell.SendKeys url ' I need now to open the url
objShell.SendKeys "{ENTER}"
The problem is that when testing, from web server no referring url is sent and therefore the new admin guys are not granted access.
Reasons behind: as the activity increased, new administrators have to help me in handling issues. Instead of creating sessions cookies and authentication (that I will however consider in the future if no other way), they might want get quick access to the core files without the burden to follow a long list of URLs until to get free access to the repository (as normal users do after they click on some pages with ads from the sponsors). As the access is granted (without user and password and no cookies mechanism) only coming from certain urls, you might probably wonder why not providing the new admistrators with the referring url by mail and solve the problem. The answer: there are many locations and for each I have defined a unique referring URL. Those referring URLs need to be changed very often as to avoid users to spread them all over after they have downloaded the video and thus having the url. I have decided to put the referring urls at the disposal of new administrators that will load them from local using a vbscript that accesses a location from the server that is not made public.