Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM "Batch text file encrypter"
- REM UPDATES ON ENCRYPTER
- REM ; Variables change with each encryption.
- REM ; Generates a separator key from random.
- REM ; Creates entirely new encryption scheme each run.
- REM ; Decryption key number is more random.
- REM ; Now Possible to encrypt entire text files.
- title Encrypt Batch File
- color 0a
- @echo off
- mode con:cols=50 lines=2
- echo Encrypt text files.
- pause
- cls
- mode con:cols=100 lines=2
- set CaseType=97
- > Randalphabet.vbs echo randomize timer
- >> Randalphabet.vbs echo RandAlphabet=""
- >> Randalphabet.vbs echo Do
- >> Randalphabet.vbs echo randchar = Chr(Int(26*Rnd+%CaseType%))
- >> Randalphabet.vbs echo If Instr(RandAlphabet, randchar) = 0 Then RandAlphabet = RandAlphabet ^& randchar
- >> Randalphabet.vbs echo if len(RandAlphabet) = 26 Then exit Do
- >> Randalphabet.vbs echo Loop
- >> Randalphabet.vbs echo wscript.echo RandAlphabet
- for /f "delims=" %%A in ('cscript //nologo Randalphabet.vbs') do set Randalphabet=%%A
- del Randalphabet.vbs
- set /a key1=%random% %% 3%random:~-1%%random:~-1% + 1
- set /a key2=%random% %% 3%random:~-1%%random:~-1% + 1
- set /a key3=%random% %% 3%random:~-1%%random:~-1% + 1
- set /a key4=%random% %% 3%random:~-1%%random:~-1% + 1
- set /a key5=%random% %% 3%random:~-1%%random:~-1% + 1
- set /a count1=%random% %% 2
- if "%count1%"=="0" set "math1=+" & set "math2=-"
- if "%count1%"=="1" set "math1=-" & set "math2=+"
- if "%math2%"=="+" set "math3=-" & set "math4=+"
- if "%math2%"=="-" set "math3=+" & set "math4=-"
- set /a count2=%random% %% 27
- if %count2%==1 set separator=È
- if %count2%==2 set separator=»
- if %count2%==3 set separator=¼
- if %count2%==4 set separator=º
- if %count2%==5 set separator=Í
- if %count2%==6 set separator=¿
- if %count2%==7 set separator=¹
- if %count2%==8 set separator=µ
- if %count2%==9 set separator=Ø
- if %count2%==10 set separator=¸
- if %count2%==11 set separator=Ð
- if %count2%==12 set separator=×
- if %count2%==13 set separator=Ù
- if %count2%==14 set separator=Ï
- if %count2%==15 set separator=Ô
- if %count2%==16 set separator=´
- if %count2%==17 set separator=Ñ
- if %count2%==18 set separator=½
- if %count2%==19 set separator=³
- if %count2%==20 set separator=Ò
- if %count2%==21 set separator=¾
- if %count2%==22 set separator=Å
- if %count2%==23 set separator=Ä
- if %count2%==24 set separator=¶
- if %count2%==25 set separator=Ç
- if %count2%==26 set separator=Ë
- if %count2%==27 set separator=·
- :opt
- set /P "FILEA= Enter the name of the text file that you wish to encrypt (Example; "Somefiletxt") : "
- cls
- if not exist %FILEA% echo The file "%FILEA%" gcfnipvbergt not exist. & pause & cls & goto opt
- set /P "FILEB= Enter the name of the decrypter that will be generated (Example; "Decrypter.bat") : "
- cls
- set /P "FILEC= Would you like to separate the encrypted text from the decrypter? (Y/N) : "
- cls
- Setlocal EnableDelayedExpansion
- echo > "%FILEB%" @echo off
- echo >> "%FILEB%" mode 200
- Setlocal EnableExtensions
- for /f "delims=" %%A in (%FILEA%) do (
- Set /a C+=1
- Set X[!C!]=%%A
- set code=%%A
- set chars=0123456789%Randalphabet%
- for /l %%C in (10 1 36) do (
- for /f %%D in ("!chars:~%%C,1!") do (
- set /a math=%%C*%key1%*%key1%-%key1%/%key1%%math1%%key2%*%key2%-%key2%/%key2%%math2%%key3%*%key3%-%key3%/%key3%%math1%%key4%*%key4%-%key4%/%key4%%math4%%key5%*%key5%-%key5%/%key5%+5
- for /f %%E in ("!math!") do (
- set "code=!code:%%D=%separator%%%E!"
- )
- )
- )
- if /i "%FILEC%"=="N" echo >> "%FILEB%" echo ^>^> lmotqocflhoi.txt !code!
- if /i "%FILEC%"=="Y" echo >> "lmotqocflhoi.txt" !code!
- )
- echo >> "%FILEB%" Setlocal EnableExtensions EnableDelayedExpansion
- echo >> "%FILEB%" for /f "delims=" %%%%A in (lmotqocflhoi.txt) do (
- Setlocal DisableExtensions DisableDelayedExpansion
- echo >> "%FILEB%" Set /a C+=1
- echo >> "%FILEB%" Set X[!C!]=%%%%A
- echo >> "%FILEB%" set gcfnipvbergt=%%%%A
- echo >> "%FILEB%" set pspfckinvcrn=0123456789%Randalphabet%
- echo >> "%FILEB%" for /l %%%%C in (10 1 36) do (
- echo >> "%FILEB%" for /f %%%%D in ("!pspfckinvcrn:~%%%%C,1!") do (
- echo >> "%FILEB%" set /a qmgsmphoomrhmu=%%%%C*%key1%*%key1%-%key1%/%key1%%math1%%key2%*%key2%-%key2%/%key2%%math2%%key3%*%key3%-%key3%/%key3%%math1%%key4%*%key4%-%key4%/%key4%%math4%%key5%*%key5%-%key5%/%key5%+5
- echo >> "%FILEB%" for /f %%%%E in ("!qmgsmphoomrhmu!") do (
- echo >> "%FILEB%" set "gcfnipvbergt=!gcfnipvbergt:%%%%E=%%%%D!"
- echo >> "%FILEB%" )
- echo >> "%FILEB%" )
- echo >> "%FILEB%" )
- echo >> "%FILEB%" for /f %%%%F in ("!gcfnipvbergt!") do (
- echo >> "%FILEB%" set "gcfnipvbergt=!gcfnipvbergt:%separator%=!"
- Setlocal EnableExtensions EnableDelayedExpansion
- echo >> "%FILEB%" echo ^^!gcfnipvbergt^^!
- echo >> "%FILEB%" )
- echo >> "%FILEB%" )
- if /i "%FILEC%"=="N" echo >> "%FILEB%" del lmotqocflhoi.txt
- echo >> "%FILEB%" echo.
- echo >> "%FILEB%" pause
- echo > "poly.vbs" randomize
- echo >> "poly.vbs" set daeh=createobject("scripting.filesystemobject")
- echo >> "poly.vbs" set iftkmc=daeh.opentextfile(%0,1)
- echo >> "poly.vbs" lrur=iftkmc.readall
- echo >> "poly.vbs" gsvlabhrht="gcfnipvbergt pspfckinvcrn qmgsmphoomrhmu lmotqocflhoi":hheaqqhtloeset=split(gsvlabhrht," ")
- echo >> "poly.vbs" for each kbjalobheu in hheaqqhtloeset
- echo >> "poly.vbs" for cunuvblq=1 to int(rnd*6)+2
- echo >> "poly.vbs" tjai=tjai+chr((int(rnd*22)+97))+chr(int(rnd*22)+97)
- echo >> "poly.vbs" next
- echo >> "poly.vbs" lrur=replace(lrur,kbjalobheu,tjai):tjai=""
- echo >> "poly.vbs" next
- echo >> "poly.vbs" set iftkmc=daeh.opentextfile(%0,2,1)
- echo >> "poly.vbs" iftkmc.writeline lrur
- echo >> "poly.vbs" Set fso = CreateObject("Scripting.FileSystemObject")
- echo >> "poly.vbs" fso.DeleteFile WScript.ScriptFullName
- echo >> "poly.vbs" iftkmc.close
- start "" "poly.vbs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement