Password Protect Folders
Results 1 to 7 of 7

Thread: Password Protect Folders

  1. #1
    Banned
    Join Date
    Oct 2003
    Posts
    19

    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

  2. #2
    Senior Member
    Join Date
    Jun 2003
    Posts
    772
    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

  3. #3
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    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.’”

  4. #4
    Banned
    Join Date
    Oct 2003
    Posts
    19
    does anyone have any ideas of how to improve this code?????????????????

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    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.’”

  6. #6
    Senior Member
    Join Date
    Oct 2001
    Posts
    786
    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

  7. #7
    Member
    Join Date
    Oct 2003
    Posts
    85
    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
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides