Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_UseX64=n
- #AutoIt3Wrapper_Change2CUI=y
- #AutoIt3Wrapper_Res_Description=Binder by Candyland
- #AutoIt3Wrapper_Res_Fileversion=0.2.1.0
- #AutoIt3Wrapper_Res_LegalCopyright=CC-BY-NC
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.15.0 (Beta)
- Author: Candyland
- Licens: CC-BY-NC readable here: https://creativecommons.org/licenses/by-nc/3.0/de/
- Description: This Program Binds an file onto another. The file will be encrypted via RC4 and copied to another files end.
- This is may usefull to sent suspicious information to another people.
- Example: You bind a suspicious information(myaddress.txt) to an .jpg and sent it through dropbox to the recipient.
- Usage: Encrypt:
- Start the Program, Press Yes for Encode. First Choose the file you want to run when the user clicks it.
- Second choose the file to encrypt and hide. Third choose a Password or use the predefined. Click OK.
- After some time a Beep appears(right after it the program end) now the file is binded.
- Runtimefiles=max300Mb, Hiddenfile=max20mb.
- the Result will be saved to the same directory as the executable runs under the name Binded.*
- Decrypt:
- Start the Program, Press No for Decode. First Choose the file you know from its binded.
- Second Enter the correct(Case-Sensitive) Password. Click OK.
- The Hidden file will be decrypted and saved under Result.* Same Directory.
- Does not Work with [..] as runtime. everything that shows its own source. [.txt .html .bat .vbs etc.]
- PS: The technique could be used in crypters. But there is no legitimate reason for. Dont market my script.
- Executable could be downloaded here: --Nothing to see here--
- #ce ----------------------------------------------------------------------------
- #include <crypt.au3>
- #include "_Base64.au3" ;<=https://www.autoitscript.com/forum/topic/21399-base64-converter/
- #include <MsgBoxConstants.au3>
- Local $iAnswer = MsgBox(BitOR($MB_YESNO, $MB_SYSTEMMODAL), "Bind program by Candyland", "Yes=Add an Encode file to an Working File" & @CRLF & "No=Decode an Binded file")
- If $iAnswer = 7 Then ;<=On No
- $O_Choose = FileOpenDialog("Choose File to decode", @ScriptDir, "(*.*)", 1) ;<=Give me something to works with, exspecially some binded stuff
- If @error Then Exit
- $R_Choose = FileRead(FileOpen($O_Choose, 16))
- $Seperate_Choose = StringMid($R_Choose, StringInStr($R_Choose, StringTrimLeft(StringToBinary("-=TESTME=-"), 2)) + StringLen(StringToBinary("-=TESTME=-")) - 2, -1) ;<=Search for the Binded
- $NumberOfChar_Choose = BinaryToString("0x" & StringLeft($Seperate_Choose, 2)) ;<=give me the leng of the chars via number
- $NumberOfChar_ChooseTrimm = StringTrimLeft($Seperate_Choose, 2) ;<=Trimm it
- $CharsGetting_Choose = StringLeft($NumberOfChar_ChooseTrimm, $NumberOfChar_Choose * 2) ;<=give me the (file.***) (whatever that word was)
- $CharsToString_Choose = BinaryToString("0x" & $CharsGetting_Choose)
- $Specify_Result = @ScriptDir & "\Result." & $CharsToString_Choose ;<=Specify what the Result.**** <= was
- $Specify_ResultTrimm = "0x" & StringTrimLeft($NumberOfChar_ChooseTrimm, $NumberOfChar_Choose * 2) ;<=Trimm it. $Specify_ResultTrimm has now the binded binary and can Decrypt it
- $Decode_Password = InputBox("Password getting", "The file is protected by a password." & @CRLF & "Warning it's Visible" & @CRLF & @CRLF & "The extracted will be Named Result." & $CharsToString_Choose, "\6sdx'sJX&,n21ads*")
- If @error Then Exit ;<=Everyone likes long lines. You could click on Cancel on every Question to end the Programm.
- _Crypt_Startup()
- Local $EnDecrypt_Algo = $CALG_RC4
- Local $Derive_Decode_Password = _Crypt_DeriveKey($Decode_Password, $EnDecrypt_Algo)
- Local $Decrypt_Binary = _Crypt_DecryptData($Specify_ResultTrimm, $Derive_Decode_Password, $CALG_USERKEY) ;<=Decrypt the Binded
- _Crypt_DestroyKey($Derive_Decode_Password)
- _Crypt_Shutdown()
- $Base64EnDecode_String = _Base64Decode(BinaryToString($Decrypt_Binary)) ;<=To make it not as easy for the hacker to crack this, it is =>Base64=>
- FileDelete($Specify_Result) ;<=Make room for the new Result file
- $Write_FileOpen = FileOpen($Specify_Result, 16 + 1)
- FileWrite($Write_FileOpen, $Base64EnDecode_String) ;<=Write The Decrypted,Decoded file down.
- Beep(500, 500) ;<=Booop(s)
- Exit
- ElseIf $iAnswer = 6 Then ;<= On Yes
- $C_Choose_Runtime = FileOpenDialog("Choose File for Runtime", @ScriptDir, "(*.*)", 1) ;<=Choose a file which should be running when clicked on file(runtime)
- If @error Then Exit
- $ExtractFileName = StringTrimLeft($C_Choose_Runtime, StringInStr($C_Choose_Runtime, "\", 1, -1)) ;<=Get Filename and (.***)
- $C_Choose_Bind = FileOpenDialog("Choose File to Bind", @ScriptDir, "(*.*)", 1) ;<=Choose the File to be Encrypted and binded!
- If @error Then Exit
- $ExtractEndung_Bind = StringMid($C_Choose_Bind, StringInStr($C_Choose_Bind, ".") + 1, -1) ;<=Binded (file.***)
- $GetLengOf_ExtractEndung = StringLen($ExtractEndung_Bind) ;<=Leng of $ExtractEndung_Bind
- $Specify_Result = @ScriptDir & "\Binded_" & $ExtractFileName
- $Encode_Password = InputBox("Password giving", "The file will be encrypted" & @CRLF & "Choose Password. Warning it's Visible" & @CRLF & @CRLF & "The binded file will be Named Binded_" & $ExtractFileName, "\6sdx'sJX&,n21ads*")
- If @error Then Exit ;<=Remember it ^^
- $O_Choose_Bind = FileOpen($C_Choose_Bind, 16) ;<=Open In binary
- $R_Choose_Bind = FileRead($O_Choose_Bind) ;<=Read it
- $Base64EnDecode_String = _Base64Encode(BinaryToString($R_Choose_Bind)) ;<=Encode it =>Base64=>
- _Crypt_Startup()
- Local $EnDecrypt_Algo = $CALG_RC4
- Local $Derive_Decode_Password = _Crypt_DeriveKey($Encode_Password, $EnDecrypt_Algo)
- Local $Encrypt_Binary = _Crypt_EncryptData($Base64EnDecode_String, $Derive_Decode_Password, $CALG_USERKEY) ;<= Encrypt the Base64 string with a algorithm for RC4
- _Crypt_DestroyKey($Derive_Decode_Password)
- _Crypt_Shutdown()
- $O_Choose_Runtime = FileOpen($C_Choose_Runtime, 16) ;<=Open In binary
- $R_Choose_Runtime = FileRead($O_Choose_Runtime) ;<=Read it
- FileDelete($Specify_Result) ;<=Make room for the new Result file
- $O_Result = FileOpen($Specify_Result, 16 + 1)
- FileWrite($O_Result, $R_Choose_Runtime) ;<=First Write the Runtimefile
- FileWrite($O_Result, StringToBinary("-=TESTME=-" & $GetLengOf_ExtractEndung & $ExtractEndung_Bind)) ;<=Then write a "Trenner", the Leng of $ExtractEndung_Bind & the (.***)
- FileWrite($O_Result, $Encrypt_Binary) ;<=Nooow write to the end the encrypted file
- FileClose($O_Result)
- FileClose($O_Choose_Runtime)
- Beep(500, 500) ;<= boop booooop boooooop(s)
- Exit
- ;Programm is here, couple of lines and chars big
- ;Then there is in the mid of nothing coming a line like -=TESTME=-3jpg 3 stands for the leng of the chars behind =-3=>
- ;So the program now knows how much chars he has to read and trim. After it it has 3 chars which is in this case jpg
- ;Now it knows that the binded file is a .jpg which could be usefull when sending file with special(.***)(not knowing the word)
- ;and all after it is the binded encrypted file.
- ;File looks like this:
- ;Here is the Source of the Runtime File, like a .mp3
- ;Then there comes on the end of the .mp3 => -=TESTME=-6ascipq
- ;All after it is the Encrypted file!
- EndIf
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement