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-26-2024
- */
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ;#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 Y13, Select:
- Gui, Add, Edit, X110 Y13 vFolderEdit -Multi ReadOnly, % A_ScriptDir ; Default folder
- Gui, Add, Button, X350 Y10 gBrowseButton, Browse
- Gui, Add, Text, X10 Y63, Password:
- Gui, Add, Edit, X110 Y60 Password vPasswordEdit
- Gui, Add, Text, X10 Y123, File EXT:
- Gui, Add, Edit, X110 Y120 vFEXT
- Gui, Add, Button, Default X350 Y120 gEncryptButton, Encrypt
- Gui, Add, Text, X10 Y183, File EXT:
- Gui, Add, Edit, X110 Y180 w180 vFEXT2, enc
- Gui, Add, Button, X350 Y180 gDecryptButton, Decrypt
- Gui, Show, W450 H250 X20 Y0, Najeeb Files Encryption Tools
- Return
- BrowseButton:
- FileSelectFolder, SelectedFolder
- GuiControl,, FolderEdit, %SelectedFolder%
- Return
- EncryptButton:
- Gui, Submit, NoHide
- Loop, Files, %FolderEdit%\*.%FEXT% ; Change the extension based on your File format
- {
- CurrentFile := A_LoopFileFullPath
- EncryptedFile := A_LoopFileDir "\" A_LoopFileName ".enc"
- Password := GuiControlGet,,PasswordEdit
- ; Use OpenSSL or another encryption tool to encrypt the File with the provided password
- ; Replace the following line with your encryption command
- RunWait, DATA\openssl.exe enc -aes-256-cbc -in "%CurrentFile%" -out "%EncryptedFile%" -k "%Password%"
- }
- MsgBox, Encryption completed.
- Return
- DecryptButton:
- Gui, Submit, NoHide
- Loop, Files, %FolderEdit%\*.%FEXT2% ; Change the extension based on your encrypted format
- {
- CurrentFile := A_LoopFileFullPath
- DecryptedFile := A_LoopFileDir "\" A_LoopFileName ".Nul"
- Password := GuiControlGet,,PasswordEdit
- ; Use OpenSSL or another decryption tool to decrypt the File with the provided password
- ; Replace the following line with your decryption command
- RunWait, DATA\openssl.exe enc -aes-256-cbc -d -in "%CurrentFile%" -out "%DecryptedFile%" -k "%Password%"
- }
- MsgBox, Decryption completed.
- 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