Sign in to follow this  
Followers 0
Hyflex

Possible Encryption Script?

9 posts in this topic

I have been going through the scripts already made but couldn't find anything what suited my needs and were easy enough to modify..

I am looking to sort a script so it has 3 boxes and a tick box..

Box 1 (480x125) as in input box for me to enter some text

Box 2 is a text box to enter a word/phrase..etc as the encrypt/decrypt key.. and accompaning this a switch to Encrypt/Decrypt.

Box 3 (480x125) as an output box as the "final result"

Im not even quite sure how to get encryption/decryption to work as a simple script..

Share this post


Link to post
Share on other sites



The _StringEncrypt() is not save! Search example forum for more safe methods...

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 375, 412)
$Edit1 = GUICtrlCreateEdit("", 70, 24, 480, 125)
GUICtrlSetData(-1, "Add info to en/decrypt")
$Input1 = GUICtrlCreateInput("Enter Passphrase", 70, 176, 480, 21)
$Button1 = GUICtrlCreateButton("Encrypt", 152, 224, 97, 33, 0)
$Button2 = GUICtrlCreateButton("Decrypt", 340, 224, 97, 33, 0)
$Edit2 = GUICtrlCreateEdit("", 70, 296, 480, 125)
GUICtrlSetData(-1, "Output")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1 ; Encrypt
            GUICtrlSetData($Edit2, _StringEncrypt(1, GUICtrlRead($Edit1), GUICtrlRead($Input1), 1))

        Case $Button2 ; Decrypt
            GUICtrlSetData($Edit2, _StringEncrypt(0, GUICtrlRead($Edit1), GUICtrlRead($Input1), 1))

    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Doesn't need to be 100% fool proof, just better than default text being sent...

Slight problem, its really really hard to select all the text in the boxes to copy... how can i get round this?

Edited by XxXGoD

Share this post


Link to post
Share on other sites

In his code box click on "Popup" then select the text from there.

Share this post


Link to post
Share on other sites

In his code box click on "Popup" then select the text from there.

Lol, no I am on about in the actual program...

If I was to type in: Encrypt me now, fast, quick, encrypt!

Passphrase = Enter Passphrase

It returns me:

AA354D00BEE5004D968B7417704BF0B4168E289C641CAE64726596814D7C635CAF151EDDAB56AD1F85D2A1F6123F33D2D80D94B342C146D681050E3A3620FDA09EAA8AA3480C8D76D3B8

I have to use mouse to select it, I want to be able to just do CTRL + A and then CTRL + C or press a button to copy..

Share this post


Link to post
Share on other sites

Add a button $copy and a case = ClipPut(GUICtrlRead($Edit2))...

Thanks buddy, I will try when I get to my PC...

Share this post


Link to post
Share on other sites

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#NoTrayIcon
#Region AutoIt3Wrapper directives section
#AutoIt3Wrapper_icon=\blockdevice.ico
#AutoIt3Wrapper_Version=B
#AutoIt3Wrapper_OutFile=DSCrypt.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=Y
#AutoIt3Wrapper_Run_Tidy=Y
#AutoIt3Wrapper_Res_Description=Encrypter/Decrypter with password authentication
#AutoIt3Wrapper_Res_Fileversion=1.9.9.0
#EndRegion

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("DSCrypt, thanks to KaFu", 600, 450, 375, 400)

$Button1 = GUICtrlCreateButton("Encrypt", 100, 225, 100, 35, 0)
$Button2 = GUICtrlCreateButton("Decrypt", 300, 225, 100, 35, 0)

$Button3 = GUICtrlCreateButton("Copy", 515, 50, 80, 50, 0)
$Button4 = GUICtrlCreateButton("Copy", 515, 325, 80, 50, 0)

$Input1 = GUICtrlCreateInput("Password", 25, 176, 480, 21)

$Edit1 = GUICtrlCreateEdit("", 25, 25, 480, 125)
GUICtrlSetData(-1, "Input")
$Edit2 = GUICtrlCreateEdit("", 25, 300, 480, 125)
GUICtrlSetData(-1, "Output")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1 ; Encrypt
            GUICtrlSetData($Edit2, _StringEncrypt(1, GUICtrlRead($Edit1), GUICtrlRead($Input1), 1))
        
        Case $Button2 ; Decrypt
            GUICtrlSetData($Edit2, _StringEncrypt(0, GUICtrlRead($Edit1), GUICtrlRead($Input1), 1))
        
        Case $Button3 ; Copy Edit 1
            ClipPut(GUICtrlRead($Edit1))
        
        Case $Button4 ; Copy Edit 2
            ClipPut(GUICtrlRead($Edit2))

    EndSwitch
WEnd

Why isn't the icon working for me.. I can't even get the icon to work if I put it through the compile program..

I have a link: http://www.yousendit.com/download/Y1RyaXRBQ3Q3bUFLSkE9PQ

For the icons in .jpg i need convert.. correctly maybe anyone help? I have 18/22/24/32/64/128px pictures..

Share this post


Link to post
Share on other sites

#AutoIt3Wrapper_Icon=file_locked.ico

The file needs to be of the type .ico

I use IrfanView as my standard picture viewer, it can save any file to .ico. For more complex icon operations (multi-icons, icon libraries) I use @icon sushi.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0