Advertisement
Juicebox4253

Untitled

Jul 25th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. cls
  2. @ECHO OFF & setlocal DisableDelayedExpansion
  3. set counter=4
  4. title Folder Private
  5. if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
  6. if NOT EXIST Private goto MDLOCKER
  7. :CONFIRM
  8. echo Are you sure you want to lock the folder(Y/N)
  9. set/p "cho=>"
  10. if %cho%==Y goto LOCK
  11. if %cho%==y goto LOCK
  12. if %cho%==n goto END
  13. if %cho%==N goto END
  14. echo Invalid choice.
  15. goto CONFIRM
  16. :LOCK
  17. taskkill /FI "IMAGENAME eq explorer.exe" /FI "WINDOWTITLE eq FolderName*"
  18. ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
  19. attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
  20. echo Folder locked
  21. goto End
  22. :UNLOCK
  23. if %counter% equ 0 goto End
  24. Mode 50, 30 & color 0e
  25. echo Enter Password to access inside
  26. set /p "input=>Username:"
  27.  
  28. set "psCommand=powershell -Command "$pword = read-host 'Enter password' -AsSecureString ; ^
  29. $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
  30. [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
  31. for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
  32. )
  33.  
  34. if NOT %input%==your_username_here goto FAIL (
  35. if NOT %password%==password_here goto FAIL
  36. )
  37. attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
  38. ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
  39. echo Folder Unlocked successfully
  40. %SystemRoot%\explorer.exe "Folder_directory"
  41. goto End
  42. :FAIL
  43. echo.
  44. set /a counter -=1
  45. echo.
  46. @echo on
  47. @echo off
  48. color a0
  49. echo INCORRECT USERNAME OR PASSWORD
  50. echo.
  51. if %counter% lss 4 echo %counter% attempts left
  52. pause
  53. goto :UNLOCK
  54.  
  55. :MDLOCKER
  56. md Private
  57. echo Private created successfully
  58. goto End
  59. :End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement