Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* INFO NAJEEB OPENSSL FILES ENCRYPTION
- Written by: Najeeb Shah Khan (najeebshahkhan@gmail.com)
- Last Modified: 1-27-2024
- Download DATA Folder Here
- https://drive.google.com/file/d/1NTPP-YAb6TrPxrqWxlo7IOo6_z9lVgGv/view?usp=sharing
- */
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ;#warn
- #NoEnv
- #SingleInstance, Force
- SetBatchLines, -1
- setworkingdir,%a_scriptdir%
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- SkinForm(Apply, A_ScriptDir . "\DATA\USkin.dll", A_ScriptDir . "\DATA\M1.msstyles")
- OnExit, GetOut
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Gui,default
- Gui,Color, 091D33, 091D33
- Gui,Font, s12 cDDDDDD, Calibri
- Gui, Add, Text, x10 y10 w200 h20, (FileName.enc)(FileName.EXT)
- Gui, Add, Text, x10 y30 w80 h20, Extenion:
- Gui, Add, Edit, x100 y30 w120 h20 vEXT
- Gui, Add, Text, x10 y60 w80 h20, Password:
- Gui, Add, Edit, x100 y60 w120 h20 vPassword, ; vPassword assigns the input to the variable Password
- Gui, Add, Button, x10 y100 w100 h30 gEncrypt, Encrypt Files
- Gui, Add, Button, x120 y100 w100 h30 gDecrypt, Decrypt Files
- Gui, Show, , File Encryption Tool
- return
- Encrypt:
- Gui, Submit, NoHide
- ; Get the list of files to encrypt
- FileSelectFile, FilesToEncrypt, 3,, Select files to encrypt, (*.*)|*.*
- ; Check if the user selected any files and entered a password
- if (FilesToEncrypt)
- {
- GuiControlGet, Password,
- ; Use OpenSSL to encrypt the files
- RunWait, DATA\openssl.exe enc -aes-256-cbc -salt -in %FilesToEncrypt% -out %EXT% -k "%Password%"
- ; Provide feedback to the user
- MsgBox, Encryption complete. Output saved to encrypted_files.enc.
- } else {
- MsgBox, No files selected for encryption or password not entered.
- }
- return
- Decrypt:
- Gui, Submit, NoHide
- ; Get the file to decrypt
- FileSelectFile, EncryptedFile, 1,, Select file to decrypt, (*.enc)|*.enc
- ; Check if the user selected any file and entered a password
- if (FilesToEncrypt)
- {
- GuiControlGet, Password,
- ; Use OpenSSL to decrypt the file
- RunWait, DATA\openssl.exe enc -aes-256-cbc -d -in %EncryptedFile% -out %EXT% -k "%Password%"
- ; Provide feedback to the user
- MsgBox, Decryption complete. Output saved to decrypted_files.
- } else {
- MsgBox, No file selected for decryption or password not entered.
- }
- return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- GetOut:
- ;GuiClose:
- Gui, Hide
- SkinForm(0)
- ExitApp
- Return
- SkinForm(Param1 = "Apply", DLL = "", SkinName = ""){
- if(Param1 = Apply){
- DllCall("LoadLibrary", str, DLL)
- DllCall(DLL . "\USkinInit", Int,0, Int,0, AStr, SkinName)
- }else if(Param1 = 0){
- DllCall(DLL . "\USkinExit")
- }
- }
- ;============ END SCRIPT BUTTON_MENU ==============
- #R::Reload
- #S::Suspend
- #P::Pause
- #ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement