|
-
November 9th, 2003, 10:11 PM
#1
disable file saving?
After browsing around this site posted by an admin here: http://scifi.pages.at/hackits/
I started testing some things on my web server. Here is what I was trying to do in javascript. I wrote a small simple function that sets a variable as the password, and prompts the user for input and checks the users input against that password. I saved it as a .js file and had it load on a certain page on my server. What I was trying to do was disable a person being able to obtain the .js file. What I did to try and do this was first put in a directory protected by a .htaccess file. The problem with this is you have to know a username and password just to get to the password prompt. Then I tried making a directory called scripts on the server. This directory had permissions rwx--x--x. Then the file was in that directory with permissions rwxr--r--. I thought this would not allow someone to save this file by making a link to it. Then I tested it by making a link to the .js file and I right clicked and did save as and I was able to save the .js file. My question is how do I get it to where people are unable o obtain the .js file which clearly states the password. I tried making the permissions on it rwx--x--x but it wouldn't even run like that. I know some of you will say why not just use the .htaccess file on all directories you want restricted? The answer is that I don't want any directories restricted, I just want users to not be able to obtain the .js file. Can this be done?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|