November 9th, 2003, 09:11 PM
disable file saving?
After browsing around this site posted by an admin here: http://scifi.pages.at/hackits/
November 9th, 2003, 09:32 PM
What about using a language that is parsed before it's presented to the user? like php? (I'm just tossing it out as a suggestion as I don't know what your limitations are)
November 9th, 2003, 09:38 PM
I have php installed on the server. I just want to know if it is possible to deny access of someone saving a file to their harddrive. I think the answer is no under this condition, because for the script to run it has to have enough permission for someone to be able to save it. This was just me experimenting. If you want to see what I am talking about go here: http://220.127.116.11/number7.htm
All you would have to do to get past that password prompt is right click on the link above and do save target as. Then look at the source to see where it is loading the script from in this case it is:
Then make a link to that and right click and do save target as. And there you have it. Just open the .js file in a text editor and you're in. I just want to disable the user being able to right click on the second link and save the file. I don't think it can be done. Someone please prove me wrong.
November 9th, 2003, 09:45 PM
http://websiteowner.info/articles/et...rightclick.asp <-- gives reasons why NOT to disable right click
November 9th, 2003, 09:50 PM
That wouldn't work because then all they would have to do is know the location of the file, the make their own html page with a link to it and they could right click to their little hearts content. I don't think what I am trying to do is possible. I was just experimenting around. Thanks for the replies.
November 10th, 2003, 09:58 AM
You *CANNOT* stop people being able to read the contents of your .js file. It is simply not possible.
Even if the web browser had a way of preventing it, the user could still use a different tool, different web browser, or just sniff the js off the wire as it comes in (did I mention they could fish it out of their browser's disc cache?)
The permissions on the file are on the server, and won't affect the file once it's downloaded. Having the server file unwriteable is a good idea, but won't stop the users.
November 10th, 2003, 01:44 PM
I don't believe it is possible to lock a .js file without taking the permission of actually 'using' the file away.
If you have the ability for Pearl or some other server side languages simple do what Msmittens stated. If you do not have the ability Hotscipts has FREE downloadable scipts with many such password protect scripts.
Sorry for the rambling need to get to class peace!
November 10th, 2003, 02:49 PM
Thanks for the replies gals/guys. That's pretty much what I thought. Just wanted to confirm.