ch4rl1e97

RegHide 1.0

Aug 12th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.57 KB | None | 0 0
  1. SETLOCAL EnableDelayedExpansion
  2. :top
  3. REM Appologies for the messiness and non-uniform  and capitalisation, it's in progress :p
  4. REM Warning: Currently no function to delete all the reg values, also is hardcoded to only function in HKCU\Secretz, so that's where you'll find the mess to delete :p
  5. goto Decide
  6.  
  7. :encode
  8. ECHO YOU MUST DELETE YOUR ORIGINAL FILE MANUALLY AFTER THIS PROCESS IS COMPLETE.
  9. ECHO PLEASE PLACE YOUR FILE IN THE SAME DIRECTORY (FOLDER) AS THIS SCRIPT.
  10. pause
  11. set /p OriginalFile="Type the full name of your file, including it's extention (e.g. 'stuff.doc') "
  12. set int=0
  13. Certutil -encode "%OriginalFile%" encoded.encoded
  14. for /f "tokens=*" %%a in (encoded.encoded) do (
  15. set /a int=!int!+1
  16. REG ADD HKCU\Secretz /v !int! /d %%a
  17. )
  18. set /a int=%int%+1
  19. REG ADD HKCU\Secretz /v count /d %int%
  20. exit
  21.  
  22. :decode
  23. set int=2
  24. echo -----BEGIN CERTIFICATE----- > recompiled.dat
  25. set /p "type=Original File Type? (Do not type the ".") "
  26. set /p "newname=Name for recompiled file? "
  27. FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query "HKCU\Secretz" /v "count"') DO set "fin=%%B"
  28.  
  29. :loop
  30.  
  31. FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query "HKCU\Secretz" /v "%int%"') DO set "RegData=%%B"
  32.  
  33. set /a int=%int%+1
  34. if %int% EQU %fin% goto output
  35. echo %RegData%>>recompiled.dat
  36. goto loop
  37. :output
  38. echo -----END CERTIFICATE----- >> recompiled.dat
  39. Certutil -decode recompiled.dat %newname%.%type%
  40. REM For testing this next line is commented out.
  41. REM delete recompiled.dat
  42. exit
  43.  
  44. :Decide
  45. set /p usr=Encode or decode? [E/D]
  46. if %usr% EQU E goto encode
  47. if %usr% EQU D goto decode
Advertisement
Add Comment
Please, Sign In to add comment