Skip to content

Instantly share code, notes, and snippets.

@lepz0r
Last active December 12, 2020 19:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lepz0r/c8af18dca519cb7dfc5d7f0e49c5926d to your computer and use it in GitHub Desktop.
Save lepz0r/c8af18dca519cb7dfc5d7f0e49c5926d to your computer and use it in GitHub Desktop.
Protect .zip file from STOP/DJVU ransomware
@echo off
::
:: USE THIS ONLY ON THE .ZIP FILE, IF THE FILE ISN'T ZIP FILE JUST PUT IT IN THE .ZIP FILE
:: Just save this file and drag & drop a file to this file
:: Tested filetype: .zip
:: In case of infection just remove the extension of the ransomware and extract the .zip file normally
:: Demo: https://youtu.be/36HmHXqmCwQ
::
powershell -Command $out = new-object byte[] 7000000; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes(\"$env:temp\randomfile\", $out)
copy /b %TEMP%\randomfile+"%1" "%~d1%~p1%~n1_protected%~x1"
del %TEMP%\randomfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment