Running a .js file from browser address bar

Learn the basics of how to exploit JavaScript.

Running a .js file from browser address bar

Post by fsdowie on Tue Aug 09, 2011 4:48 pm
([msg=60719]see Running a .js file from browser address bar[/msg])

Hi,

Is there any way to run .js files found in a server from the address bar of the browser? . When I call the file from the url address, the content opens in the browser but not actually runs the script.

Thanks!

F.
fsdowie
New User
New User
 
Posts: 2
Joined: Tue Aug 09, 2011 4:39 pm
Blog: View Blog (0)


Re: Running a .js file from browser address bar

Post by mShred on Tue Aug 09, 2011 4:55 pm
([msg=60720]see Re: Running a .js file from browser address bar[/msg])

The .js file is most likely being called from another page. When you load the URL, it displays the contents of the JavaScript file. Say you have an index.html file and within it is blah.js. blah.js is being called on by the index page when it's loaded, or when another conditional statement is met.
Image

For those about to rock.
User avatar
mShred
Administrator
Administrator
 
Posts: 1713
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)


Re: Running a .js file from browser address bar

Post by fsdowie on Tue Aug 09, 2011 5:13 pm
([msg=60723]see Re: Running a .js file from browser address bar[/msg])

Well, in this case these are files that were left in the server but it seems there's no file calling them. May be there was a reference before but now the code has changed and they are not part of the site anymore. Still I want to know if that's fine or someone can go and run those files (from a client computer or from the url bar) even when no page is calling them right now.

Thanks!
fsdowie
New User
New User
 
Posts: 2
Joined: Tue Aug 09, 2011 4:39 pm
Blog: View Blog (0)


Re: Running a .js file from browser address bar

Post by mShred on Tue Aug 09, 2011 6:49 pm
([msg=60724]see Re: Running a .js file from browser address bar[/msg])

I don't see what the problem would be. Just used space. I also don't see how you would know that the files aren't being called upon.
But i suppose you could whip out Firebug (or whatever you use) and write a script that draws from that page if you really wanted to.
Image

For those about to rock.
User avatar
mShred
Administrator
Administrator
 
Posts: 1713
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)


Re: Running a .js file from browser address bar

Post by tremor77 on Wed Aug 10, 2011 8:27 am
([msg=60748]see Re: Running a .js file from browser address bar[/msg])

you could draw up a page of your own to reference the .js files and run it right from your desktop. you should be able to open those up directly as well and view the code to get an idea of what they are doing.
Image
User avatar
tremor77
Contributor
Contributor
 
Posts: 870
Joined: Wed Mar 31, 2010 12:00 pm
Location: New York
Blog: View Blog (0)



Return to Javascript

Who is online

Users browsing this forum: No registered users and 0 guests