-
October 26th, 2003, 01:56 PM
#1
Banned
Password Protect Folders
Here is an easy but not-very-secure way of passwrod protecting folders using javascript
1. Right click in any folder window to bring up the file menu and select Customise This Folder
(You can also goto to View--------->Customise This Folder
2. Choose Create Or Edit an HTML Document
3. When the document opens, immediately after the <head> tag there is a <style> tag. After the style tag you will see...
<script language="JavaScript">
Immediately after this, insert the following code(change only the password):
var pass=prompt("Please Enter Password");
if(pass!="Type_Your_password_here")
{window.location="C:"}
I have tested this only on win98 although it should work for other platforms as well.
the security provided however is very bleak and can easily be bypassed.
Note: The View Folders As Webpage must be set to true in Folder Options....
Th3 SpId3R
-
October 26th, 2003, 02:12 PM
#2
That's a cool thing you noticed, (you can do lots of cool things by editing the "folder webpage") but this isn't a tutorial, it should be moved to some other forum, like Windows Security for example.
The above sentences are produced by the propaganda and indoctrination of people manipulating my mind since 1987, hence, I cannot be held responsible for this post\'s content - me
www.elhalf.com
-
October 26th, 2003, 04:18 PM
#3
i agree with el-half its a neet trick but it's not a tut. thanks for sharing but please move it
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
-
October 26th, 2003, 05:05 PM
#4
Banned
does anyone have any ideas of how to improve this code?????????????????
-
October 26th, 2003, 07:23 PM
#5
now that it's in the proper forum...that is a neat trick. thanks for sharing.
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
-
October 27th, 2003, 06:28 AM
#6
I've done this a lot. The way I do this code it doesn't even load the folder, while your code just goes to C:.
So here it is:
1) Find the function Load().
2) Directly under "function Load() {" put in code to prompt password, but if incorrect to return 0;
That's it. BTW, the code I usually use is this:
if ("password" != prompt("Enter the Password","Type it here")) { return 0; }
Viola! Very compact and effecient code. Of course if you wanted your password to not be known by someone who views the source, you could use some kind of one-way encryption and then compare the results of running the prompt through that one-way function to the result you saved in there of your password. It at least protects your password, because once they get that far you're toast anyways.
I'm glad someone took interest in this. I recommend that you check this thread out (by me), and get Version 1.1: http://www.antionline.com/showthread...&postid=600165
-Tim_axe
-
October 27th, 2003, 07:45 AM
#7
Member
That was gr8, i have had my workmate bothering me how to password protect some folders (under 98 and xp), and i have been telling him "i will find out".
The FACT that people ignore FACTS
doesnt mean that FACTS are not FACTS
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
|
|