SHARE
TWEET

BATCH IDLock | Look for keycard text file (BATCH)

Imthedude025 Jun 28th, 2018 (edited) 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top