| [BATCH] pass hide-lock folder Hey, haven't been on here and posted since i joined. well lately i have made some new friends and i discovered they were into computers and all my geeky-ness came crashing back. I heard about a batch that when opened prompted the user for a password, then once password had been entered a folder appeared and you could store whatever in the file, then you re-open the batch it asks you if you would like to hide the folder. is yes is entered then the folder dissapears and cannot be found far-less opened. So i sat down one night and started code-ing, then 2 days and a lot of energy juice later i had it.
code:
@ECHO OFF
echo Hidden Lock Folder Batch Program Written by Jack White.
echo Program Written Friday October 9th, 2009
echo ---- ---- ---- ---- ---- ---- ---- ---- ----
echo Veritasium Programming
echo ---- ---- ---- ---- ---- ---- ---- ---- ----
title Folder JacksArea
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNJacksArea
if NOT EXIST JacksArea goto MDJacksArea
:AuthConfirm
echo Are you sure you want to Lock Folder (Y/N)
set/p "cho=>"
if %cho%==Y goto JacksArea
if %cho%==y goto JacksArea
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto AuthConfirm
:JacksArea
ren JacksArea "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder JacksArea Locked!
goto End
:UNJacksArea
echo Enter password to Unlock Folder
set/p "pass=>"
if NOT %pass%== fredfred goto FailUnlock
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" JacksArea
echo Folder UnLocked successfully!
goto End
:FailUnlock
echo Invalid password!
echo Try again? (Y/N)
set/p "choice=>"
if %choice%==Y goto UNJacksArea
if %choice%==y goto UNJacksArea
if %choice%==N goto END
if %choice%==n goto END
:MDJacksArea
md JacksArea
echo Folder JacksArea created successfully!
goto End
:End
-----------------------------------------
save this as a .bat
Once you have locked the folder after you have placed files in it or whatever, the folder will dissapear, but if you have show hidden folders on, it will remain as a hidden folder untill you refresh that window (F5).
this is an extremley handy file protection tool for using on usb keys at school or whatever, the password is
fredfred
This is not Full prove though because if a person uses a program such as OLLYDBG they can view the program as a source and then it is simple to find the password.
Im currently working on a double passworded hide lock folder, that will corrupt the files within the folder or delete them if the password is failed 3 times. also so that the password is stored in another file, within the hidden folder, so the user (person trying to get in) cant view it but the program knows where to go to get it.
Hope You like my little program, any feedback is 100% welcome good or bad. Also any advice/help on the program i am attempting to write now would be a help. this is my 3rd Batch program, but the only one which i think is good enough to be up here.
more to come..
cheers, jack/veritasium
__________________ OJAY--93 |