Advertisement
Imthedude025

BATCH IDLock | Look for keycard text file (BATCH)

Jun 28th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. :::::::::::::::::::::::::::::::::::::::::::::
  2. ::Made by RU$$ [http://russdev.mooo.com/] ::
  3. ::BATCH IDLock | Look for keycard text file::
  4. :::::::::::::::::::::::::::::::::::::::::::::
  5. @ECHO OFF
  6. @SETLOCAL
  7. @TITLE BATCH IDLock ^| Look for keycard text file
  8. :::::::::::::::::::::::::::::::::::::::::::::
  9. ::CONFIG | Select a drive to have as IDLock
  10. ::
  11. set DRIVE=D:
  12. set PASSWORD=FallenSpaceHolder
  13. ::Put this in KeyCode.txt (Make it read only!)
  14. ::
  15. ::key=RmFsbGVuU3BhY2VIb2xkZXI
  16. :::::::::::::::::::::::::::::::::::::::::::::
  17. Echo Waiting for correct keycode. Insert keycard in drive (%DRIVE%)
  18.  
  19. :START
  20. if exist "%DRIVE%\KeyCode.txt" (goto :EX) else (goto :START)
  21.  
  22. :EX
  23. ::GetKeyFromDRIVE
  24. for /f "delims== tokens=1,2" %%G in (%DRIVE%\KeyCode.txt) do set %%G=%%H
  25.  
  26. <!-- : batch portion
  27.  
  28. call :atob b64[0] %key%
  29.  
  30. goto :CON
  31. goto :EOF
  32.  
  33. :btoa <var_to_set> <str>
  34. :atob <var_to_set> <str>
  35. for /f "delims=" %%I in ('cscript /nologo "%~f0?.wsf" %0 "%~2"') do set "%~1=%%I"
  36. goto :EOF
  37.  
  38. : VBScript -->
  39. <job>
  40. <script language="VBScript">
  41. Set htmlfile = WSH.CreateObject("htmlfile")
  42. htmlfile.write("<meta http-equiv='x-ua-compatible' content='IE=10' />")
  43. if WSH.Arguments(0) = ":btoa" then
  44. WScript.Echo htmlfile.parentWindow.btoa(WSH.Arguments(1))
  45. else
  46. WScript.Echo htmlfile.parentWindow.atob(WSH.Arguments(1))
  47. end if
  48. </script>
  49. </job>
  50.  
  51. :CON
  52. cls
  53. Echo Waiting for correct keycode. Insert keycard in drive (%DRIVE%)
  54. if exist "%DRIVE%\KeyCode.txt" (Echo [wrong keycode detected])
  55. if %b64[0]%==%PASSWORD% (goto :VALID) else (goto :START)
  56.  
  57. :VALID
  58. cls
  59. echo The keycard password is correct!
  60. echo.
  61. pause.
  62.  
  63. cd C:\Windows\System32
  64. start calc.exe
  65.  
  66. exit.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement