Jump to content

Search the Community

Showing results for tags 'Decrypt'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 7 results

  1. I am sure you guys know of a simple solution but I am still kind of new to AutoIt and its special functions. I want my code to be able to know how to encrypt and decrypt "A" and "a" as two different chars. my code is very long so here is just a snippet/example of it. ;Encode== Global $charAA = "" ; ( Capital letter A ) = Global 184 = ¸ ( Cedilla ) $charAA = $charAA & Chr(65) Global $chara = "" ; ( Lowercase letter a ) = Global 251 = û ( û Latin Small Letter U With Circumflex ) $chara = $chara & Chr(97) ;Decode== Global $ch184 = "" ;( Copyright symbol ) = $charAA $ch184 = $ch184 & Chr(184) Global $ch251 = "" ;( û Latin Small Letter U With Circumflex ) = $chara $ch251 = $ch251 & Chr(251) ;Encode== stringreplace($test_String, $charAA, $ch184) stringreplace($test_String, $chara, $ch251) ;Decode== stringreplace($$new_String, $ch184, $charAA) stringreplace($$new_String, $ch251, $chara) ( NOTE: my stringreplace function is nested in my actual code. I only separated them here for readability. ) I know there are better ways to Encrypt and Decrypt a message but I'm doing this as a fun side project for me and a select group of friends to enjoy. Again My code is not encrypting or decrypting capitals and lower case properly even though I use their ANSI codes. Example: Input "A a B b" Encrypt: ". . $ $" Decrypt: "A A B B" Any and all help will be greatly appreciated.
  2. Hello, I think this is a simple question if you know the answer. At this function i try to (encrypt -> decrypt -> change -> encrypt ->decrypt->check ) an array. This is a snippet from a larger script but the error is the same. I do this encrypt decrypt action so i can save some setting along the way in a file. But at the end (when i change the data and not when i dont change the data) is empty. does somebody see what i'm doing wrong here? Func test() Local $LC_timestamp = @MDAY & "." & @MON & "." & @YEAR & "_" & @HOUR & ":" & @MIN & ":" & @SEC Global $GL_USS_base_count = 4 Global $GL_USS_base[$GL_USS_base_count][2] = [["nickname", "FMS"], ["last_login", $LC_timestamp], ["login_count", "1" ], ["naam3", $LC_timestamp]] Global $encrypted_GL_USS_true[$GL_USS_base_count] Global $encrypted_GL_USS_content_true[$GL_USS_base_count] Global $GL_array_decrypted_USS_names[$GL_USS_base_count] Global $GL_array_decrypted_USS_settings[$GL_USS_base_count] MsgBox($MB_SYSTEMMODAL, "should be 1", $GL_USS_base[2][1]) ;make for $i = 0 to $GL_USS_base_count -1 $encrypted_GL_USS_true[$i] = _Crypt_EncryptData($GL_USS_base[$i][0], $GL_encr_key_settings, $CALG_AES_128) $encrypted_GL_USS_content_true[$i] = _Crypt_EncryptData($GL_USS_base[$i][1], $GL_encr_key_settings, $CALG_AES_128) Next ;get for $i = 0 to $GL_USS_base_count -1 $GL_array_decrypted_USS_names[$i] = binarytostring(_Crypt_DecryptData(binary($encrypted_GL_USS_true[$i]), $GL_encr_key_settings, $CALG_AES_128)) $GL_array_decrypted_USS_settings[$i] = binarytostring(_Crypt_DecryptData(binary($encrypted_GL_USS_content_true[$i]), $GL_encr_key_settings, $CALG_AES_128)) Next MsgBox($MB_SYSTEMMODAL, "should be 1", $GL_array_decrypted_USS_settings[2]) ;change $GL_array_decrypted_USS_settings[2] = $GL_array_decrypted_USS_settings[2] + "1" MsgBox($MB_SYSTEMMODAL, "should be 2", $GL_array_decrypted_USS_settings[2]) ;save for $i = 0 to $GL_USS_base_count -1 $encrypted_GL_USS_true[$i] = _Crypt_EncryptData($GL_array_decrypted_USS_names[$i], $GL_encr_key_settings, $CALG_AES_128) $encrypted_GL_USS_content_true[$i] = _Crypt_EncryptData($GL_array_decrypted_USS_settings[$i], $GL_encr_key_settings, $CALG_AES_128) Next ;get for $i = 0 to $GL_USS_base_count -1 $GL_array_decrypted_USS_names[$i] = binarytostring(_Crypt_DecryptData(binary($encrypted_GL_USS_true[$i]), $GL_encr_key_settings, $CALG_AES_128)) $GL_array_decrypted_USS_settings[$i] = binarytostring(_Crypt_DecryptData(binary($encrypted_GL_USS_content_true[$i]), $GL_encr_key_settings, $CALG_AES_128)) Next ;check MsgBox($MB_SYSTEMMODAL, "should be 2", $GL_array_decrypted_USS_settings[2]) ;why is this emty????? EndFunc thanks in advanced
  3. Hello, I'm having trouble whit a scipt what I'm building where this is a snippit from, and hope somebody can help me whit. The problem lies in when i push the "add" button i want to check if the "user" already exists. But the search code i build founds 2 hits when i know there is only 1 hit. does somebody knows what I'm doing wrong? thanks in advance. Ps. if somebody knows " if i found the right user how can i rewrite the password for him/her? " an answer to that will be most appriciated #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> #include <Array.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <File.au3> #Include <Timers.au3> #include <Crypt.au3> #include <GuiEdit.au3> $Form1 = GUICreate("Pie", 170, 235, 190, 200) local $usernames[0] local $passwords[0] global $selectuser = GUICtrlCreateCombo("", 21, 95, 130, 20) $addusername = GUICtrlCreateButton("Add", 21, 170, 130, 30) $usernamefield = GUICtrlCreateInput("", 21, 120, 130, 20) $passwordfield = GUICtrlCreateInput("", 21, 145, 130, 20, 0x0020) func encrypt() Local $hFileOpen = FileOpen("data.srmt", $FO_APPEND) if guictrlread($usernamefield) <> "" then ;~ local $encryptedusername = string(guictrlread($usernamefield)) ;~ local $encryptedpassword = string(guictrlread($passwordfield)) local $encryptedusername = string(_Crypt_EncryptData(guictrlread($usernamefield), "P14h735536jk3fvvbg", $CALG_AES_128)) local $encryptedpassword = string(_Crypt_EncryptData(guictrlread($passwordfield ), "P14h735536jk3fvvbg", $CALG_AES_128)) Local $iCheck_hit = False ConsoleWrite (@CRLF & "##############################################"& @CRLF) if ubound($usernames)> 0 then for $i = 0 to ubound($usernames)-1 If guictrlread($usernamefield) = $usernames[$i] Then $iCheck_hit = True ConsoleWrite ( "Found! "& @CRLF & $usernames[$i] & " = " & guictrlread($usernamefield) & @CRLF & "i = " & $i & @CRLF & @CRLF) ;~ Else ;~ ConsoleWrite ( "No! "& @CRLF & $usernames[$i] & " = " & guictrlread($usernamefield) & @CRLF & "i = " & $i & @CRLF & @CRLF) EndIf next EndIf ConsoleWrite ( "##############################################"& @CRLF) If $iCheck_hit = False Then FileWrite($hFileOpen, $encryptedusername & @CRLF) FileWrite($hFileOpen, $encryptedpassword & @CRLF) EndIf EndIf FileClose($hFileOpen) EndFunc func decrypt() Local $hFileOpen = FileOpen("data.srmt", $FO_READ) ;~ consolewrite(_FileCountLines("data.srmt") & " lines in the file" & @CRLF) for $i = 1 to _FileCountLines("data.srmt")/2 local $encryptedusername = FileReadLine($hFileOpen) local $encryptedpassword = FileReadLine($hFileOpen) ;~ consolewrite($encryptedusername & @CRLF) ;~ consolewrite($encryptedpassword & @CRLF) ;~ _ArrayAdd($usernames, FileReadLine($hFileOpen)) ;~ _ArrayAdd($passwords, FileReadLine($hFileOpen)) _ArrayAdd($usernames, binarytostring(_Crypt_DecryptData(binary($encryptedusername), "P14h735536jk3fvvbg", $CALG_AES_128))) _ArrayAdd($passwords, binarytostring(_Crypt_DecryptData(binary($encryptedpassword), "P14h735536jk3fvvbg", $CALG_AES_128))) Next FileClose($hFileOpen) ;~ consolewrite(ubound($usernames) & " entries in array") ;~ _arraydisplay($usernames) if ubound($userNames)> 0 then for $i = 0 to ubound($usernames)-1 GUICtrlSetData($selectuser, $usernames[$i]) next EndIf endfunc func updatecomboandinfo() if not GUICtrlRead($usernamefield) = "" Then _ArrayAdd($usernames, GUICtrlRead($usernamefield)) _ArrayAdd($passwords, GUICtrlRead($passwordfield)) GUICtrlSetData($selectuser, $usernames[UBound($usernames)-1]) EndIf EndFunc decrypt() GUISetState(@SW_SHOW) While True $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $addusername updatecomboandinfo() encrypt() GUICtrlSetData($usernamefield, "") GUICtrlSetData($passwordfield, "") Case $selectuser if ubound($usernames)> 0 then for $i = 0 to ubound($usernames)-1 ;~ msg( "error",$array_decrypted_usernames[$i]) If $usernames[$i] = GUICtrlRead($selectuser) Then GUICtrlSetData($usernamefield, $usernames[$i]) GUICtrlSetData($passwordfield, $passwords[$i]) consolewrite("YES " & $i & " = " & $usernames[$i] & " | ctr = " & GUICtrlRead($selectuser) & @CRLF) Else ;~ msg( "error",$array_decrypted_usernames[$i]) consolewrite("NO " & $i & " = " & $usernames[$i] & " | ctr = " & GUICtrlRead($selectuser) & @CRLF) EndIf next EndIf EndSwitch WEnd
  4. Hi everyone, I'm building some script that will encrypt some user password and store it in an ini file. I'd like to recall the password in a putty session but I can't figure out how to decrypt it: So far, I have: Global $Images = "C:\SAC_IS\ATL_Laptop\Resources\Images\" Global $WorkingDir = "C:\SAC_IS\Switches_Toolbox\" Global $Settings = $WorkingDir & "\Settings.ini" DirCreate ($WorkingDir) _FirstRun() While 1 Sleep(10) WEnd Func _FirstRun() If FileExists ("C:\SAC_IS\Switches_Toolbox\Settings.ini") Then _LoginfoGUI() Else MsgBox (64, "PUTTY EXECUTABLE", "First, select PUTTY.EXE path") Global $PuttyPath = FileOpenDialog("Please indicate putty.exe path", @HomeDrive, "exe (*.exe)") _LoginfoGUI() If @Error Then Global $Error = MsgBox(21, "Error!", "Can't find PUTTY.EXE!"& @CRLF & "Click Retry or Cancel to Quit") If $Error = $IDRETRY Then _FirstRun() Else _Exit() EndIf Else FileInstall ("C:\Users\h74033\Desktop\Scirpts\Switches\Settings.ini", $WorkingDir & "\Settings.ini", 1) IniWrite ($Settings, "Putty", "Path", $PuttyPath) EndIf EndIf ; SwitchesToolboxGui() Endfunc Func _Exit() Exit EndFunc Func _LoginfoGUI() Global $LoginfoGUI = GUICreate("Switches Toolbox Configuration", 300, 300, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $LoginfoGUI) GUICtrlCreatePic ($Images & "\SAClogo.jpg", 30, 10, 240, 80) GUISetBkColor ($Color_White) GUICtrlCreateLabel("-- SWITCHES TOOLBOX --", 85, 100, 150, 25) GUICtrlSetFont (-1, 8.5, 700, 0) GUICtrlCreateLabel("Please provide required information:", 10, 130, 250, 25) GUICtrlCreateLabel("-Global ID:", 10, 170, 60, 30) GUICtrlSetFont (-1, 8.5, 700, 0) GUICtrlCreateLabel("-Password:", 10, 210, 70, 30) GUICtrlSetFont (-1, 8.5, 700, 0) Global $GIDInput = GUICtrlCreateInput("", 90, 168, 80, 20) Global $PassInput = GUICtrlCreateInput("", 90, 205, 150, 20, $ES_PASSWORD) GUICtrlCreateButton ("Submit", 100, 245, 100, 25) GUICtrlSetOnEvent(-1, "_Submit") GUISetState(@SW_SHOW) EndFunc Func _Submit() Global $GID = GuiCtrlRead($GIDInput) Global $EncryptedPwd = _Crypt_HashData (GuiCtrlRead($PassInput), $CALG_MD2) IniWrite ($Settings, "Username", "Gid", $Gid) IniWrite ($Settings, "Encryption", "Password", $EncryptedPwd) ;MsgBox(0, "re", $EncryptedPwd) EndFuncHow can I achieve that please? Thanks in advance
  5. 69 #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\Icons\TC128.ico #AutoIt3Wrapper_Outfile=Flyboy_Personal_Encryption_tool.exe #AutoIt3Wrapper_Outfile_x64=Flyboy_Personal_Encryption_toolx64.exe #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Comment=All purpose text crypt tool #AutoIt3Wrapper_Res_Description=Flyboy_Personal_Encryption_tool #AutoIt3Wrapper_Res_Fileversion=2.2.2. #AutoIt3Wrapper_Res_LegalCopyright=Reardon Studio #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <String.au3> #include <MsgBoxConstants.au3> _Main() ;;;;;;;;;;;;;;;;;;;;;;;;;;;; Flyboy_Personal_Encryption_tool Func _Main() Local $WinMain, $CopyButton, $EditText, $InputPass, $InputLevel, $EncryptButton, $DecryptButton, $string ; GUI and String stuff $WinMain = GUICreate('Jim Smiths (Flyboy) Personal Encryption tool', 800, 400) GUISetBkColor(0xA6CAF0) GUICtrlSetDefBkColor( 0x00ced1) ; Creates window $EditText = GUICtrlCreateEdit('', 5, 5, 760, 350) ; Creates main edit $InputPass = GUICtrlCreateInput('', 5, 360, 160, 20, 0x21) ; Creates the password box with blured/centered input $InputLevel = GUICtrlCreateInput(1, 180, 360, 50, 20, 0x2001) GUICtrlSetLimit(GUICtrlCreateUpdown($InputLevel), 10, 1) ; These two make the level input with the Up|Down ability $EncryptButton = GUICtrlCreateButton('Encrypt', 350, 360, 105, 35) ; Encryption button GUICtrlSetBkColor($EncryptButton, 0xff4500) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $DecryptButton = GUICtrlCreateButton('Decrypt', 460, 360, 105, 35) ; Decryption button GUICtrlSetBkColor($DecryptButton, 0xe0ffff) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $CopyButton = GUICtrlCreateButton('CopyButton', 570, 360, 105, 35) ; CopyButton GUICtrlSetBkColor($CopyButton, 0x00ffff) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $HelpButton = GUICtrlCreateButton('HelpButton', 690, 360, 105, 35) ; HelpButton GUICtrlSetBkColor($HelpButton, 0x00ffff) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateLabel('Password', 15, 385) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;;GUISetBkColor(-1,0xA6CAF0 GUICtrlCreateLabel('Level of encryption 1=low 10=high', 110, 382, 265, 35) ; Simple text labels so you know what is what GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState() ; Shows window While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $EncryptButton GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing anything $string = GUICtrlRead($EditText) ; Saves the editbox for later GUICtrlSetData($EditText, 'Please wait while the text is Encrypted/Decrypted.') ; Friendly message GUICtrlSetData($EditText, _StringEncrypt(1, $string, GUICtrlRead($InputPass), GUICtrlRead($InputLevel))) ; Calls the encryption. Sets the data of editbox with the encrypted string ; The encryption starts with 1/0 to tell it to encrypt/decrypt ; The encryption then has the string that we saved for later from edit box ; It then reads the password box & Reads the level box GUISetState(@SW_ENABLE, $WinMain) ; This turns the window back on ;GUISetState(@SW_SHOW, $CopyButton) ; This turns the CopyButton back on Case $DecryptButton GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing $string = GUICtrlRead($EditText) ; Saves the editbox for later GUICtrlSetData($EditText, 'Please wait while the text is Encrypted/Decrypted.') ; Friendly message GUICtrlSetData($EditText, _StringEncrypt(0, $string, GUICtrlRead($InputPass), GUICtrlRead($InputLevel))) ; Calls the encryption. Sets the data of editbox with the encrypted string ; The encryption starts with 1/0 to tell it to encrypt/decrypt ; The encryption then has the string that we saved for later from edit box ; It then reads the password box & Reads the level box GUISetState(@SW_ENABLE, $WinMain) ; This turns the window back on popup Case $CopyButton GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing anything GUICtrlSetState($EditText, $GUI_FOCUS) $string = GUICtrlRead($EditText) ; Saves the editbox for later ClipPut($string) ; Add new data to the clipboard. ;Run("about.exe") ; Help about. Case $HelpButton MsgBox(262208, "Help Information", _ "Type your message in any application, Outlook, Thunderbird, Office, or" & @LF & _ "even in the Encryption program, although I did not add Spell Check," & @LF & @LF & _ "When message is ready paste it into the Encryption window, " & @LF & @LF & _ "Type in a password and a Encryption level if sending a message to" & @LF & _ "NASA I recommend Encryption level 10 but for normal use and your" & @LF & _ "positive NSA is not watching you. Use level One," & @LF & @LF & _ "Now click the Encrypt Button, When the message looks like Egyptian Hieroglyphics it is complete, " & @LF & @LF & _ "Click the Copy Button and past into your mail program and click send.;" & @LF & @LF & _ "When you receive a Encrypted message. I suggest you use EDIT SELECT ALL and EDIT COPY to Select the Encrypted message " & @LF & @LF & _ "and then paste it into the Encryption window. The reason is the Encrypted message is one LONG line of code " & @LF & _ " and will reach 50,000 characters before making a new line. Type in the password and Encryption level" & @LF & _ "Now you may click the Decryption button and read your safe and secure from all prying eyes personal message," & @LF & @LF & _ "NOTE:: If your computer is used by others, you can secure all manner of messages, notes, letters, memo's " & @LF & _ "and the like with this program." & @LF & @LF & _ "LAST A HINT.. CALL or send a post or a email, to the person(s) whom you share this program " & @LF & _ "and decide on a password and Encryption level you will use, and use the same settings for all messages," & @LF & _ " " & @LF & _ "If You Forget Either The Password Or Encryption Level That Message Is Lost Forever!" & @LF & _ "Christine", 0) EndSwitch WEnd ; Continue loop untill window is closed Exit EndFunc ;==>_Main I patched together a simple message encryption for a friend. all works perfect if both computers, the sender and receiver use the same operating system. but if you send a message from a win7/32 bit and the receiver is using win7/64bit the message is scrambled and unreadable. I have no clue as to why this is happening, and would love to understand it and fix it, Also. if used on a XP32 bit, the compiled 32bit errors out with this Server not found Firefox can't find the server at flyboy_personal_encryption_tool. * Check the address for typing errors such as *ww*.example.com instead of *www*.example.com * If you are unable to load any pages, check your computer's network connection. * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. Try Again Report this error▼ <#> Reporting the address and certificate information for will help us identify and block malicious sites. Thanks for helping create a safer web! Automatically report errors in the future Learn more… <https://support.mozilla.org/kb/certificate-pinning-reports> Report Try again Sending report Report sent Yet the 64bit compiled version runs but when sending a message to win7/32 the message is unreadable. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\Icons\TC128.ico #AutoIt3Wrapper_Outfile=Flyboy_Personal_Encryption_tool.exe #AutoIt3Wrapper_Outfile_x64=Flyboy_Personal_Encryption_toolx64.exe #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Comment=All purpose text crypt tool #AutoIt3Wrapper_Res_Description=Flyboy_Personal_Encryption_tool #AutoIt3Wrapper_Res_Fileversion=2.2.2. #AutoIt3Wrapper_Res_LegalCopyright=Reardon Studio #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <String.au3> #include <MsgBoxConstants.au3> _Main() ;;;;;;;;;;;;;;;;;;;;;;;;;;;; Flyboy_Personal_Encryption_tool Func _Main() Local $WinMain, $CopyButton, $EditText, $InputPass, $InputLevel, $EncryptButton, $DecryptButton, $string ; GUI and String stuff $WinMain = GUICreate('Jim Smiths (Flyboy) Personal Encryption tool', 800, 400) GUISetBkColor(0xA6CAF0) GUICtrlSetDefBkColor( 0x00ced1) ; Creates window $EditText = GUICtrlCreateEdit('', 5, 5, 760, 350) ; Creates main edit $InputPass = GUICtrlCreateInput('', 5, 360, 160, 20, 0x21) ; Creates the password box with blured/centered input $InputLevel = GUICtrlCreateInput(1, 180, 360, 50, 20, 0x2001) GUICtrlSetLimit(GUICtrlCreateUpdown($InputLevel), 10, 1) ; These two make the level input with the Up|Down ability $EncryptButton = GUICtrlCreateButton('Encrypt', 350, 360, 105, 35) ; Encryption button GUICtrlSetBkColor($EncryptButton, 0xff4500) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $DecryptButton = GUICtrlCreateButton('Decrypt', 460, 360, 105, 35) ; Decryption button GUICtrlSetBkColor($DecryptButton, 0xe0ffff) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $CopyButton = GUICtrlCreateButton('CopyButton', 570, 360, 105, 35) ; CopyButton GUICtrlSetBkColor($CopyButton, 0x00ffff) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $HelpButton = GUICtrlCreateButton('HelpButton', 690, 360, 105, 35) ; HelpButton GUICtrlSetBkColor($HelpButton, 0x00ffff) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateLabel('Password', 15, 385) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;;GUISetBkColor(-1,0xA6CAF0 GUICtrlCreateLabel('Level of encryption 1=low 10=high', 110, 382, 265, 35) ; Simple text labels so you know what is what GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState() ; Shows window While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $EncryptButton GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing anything $string = GUICtrlRead($EditText) ; Saves the editbox for later GUICtrlSetData($EditText, 'Please wait while the text is Encrypted/Decrypted.') ; Friendly message GUICtrlSetData($EditText, _StringEncrypt(1, $string, GUICtrlRead($InputPass), GUICtrlRead($InputLevel))) ; Calls the encryption. Sets the data of editbox with the encrypted string ; The encryption starts with 1/0 to tell it to encrypt/decrypt ; The encryption then has the string that we saved for later from edit box ; It then reads the password box & Reads the level box GUISetState(@SW_ENABLE, $WinMain) ; This turns the window back on ;GUISetState(@SW_SHOW, $CopyButton) ; This turns the CopyButton back on Case $DecryptButton GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing $string = GUICtrlRead($EditText) ; Saves the editbox for later GUICtrlSetData($EditText, 'Please wait while the text is Encrypted/Decrypted.') ; Friendly message GUICtrlSetData($EditText, _StringEncrypt(0, $string, GUICtrlRead($InputPass), GUICtrlRead($InputLevel))) ; Calls the encryption. Sets the data of editbox with the encrypted string ; The encryption starts with 1/0 to tell it to encrypt/decrypt ; The encryption then has the string that we saved for later from edit box ; It then reads the password box & Reads the level box GUISetState(@SW_ENABLE, $WinMain) ; This turns the window back on popup Case $CopyButton GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing anything GUICtrlSetState($EditText, $GUI_FOCUS) $string = GUICtrlRead($EditText) ; Saves the editbox for later ClipPut($string) ; Add new data to the clipboard. ;Run("about.exe") ; Help about. Case $HelpButton MsgBox(262208, "Help Information", _ "Type your message in any application, Outlook, Thunderbird, Office, or" & @LF & _ "even in the Encryption program, although I did not add Spell Check," & @LF & @LF & _ "When message is ready paste it into the Encryption window, " & @LF & @LF & _ "Type in a password and a Encryption level if sending a message to" & @LF & _ "NASA I recommend Encryption level 10 but for normal use and your" & @LF & _ "positive NSA is not watching you. Use level One," & @LF & @LF & _ "Now click the Encrypt Button, When the message looks like Egyptian Hieroglyphics it is complete, " & @LF & @LF & _ "Click the Copy Button and past into your mail program and click send.;" & @LF & @LF & _ "When you receive a Encrypted message. I suggest you use EDIT SELECT ALL and EDIT COPY to Select the Encrypted message " & @LF & @LF & _ "and then paste it into the Encryption window. The reason is the Encrypted message is one LONG line of code " & @LF & _ " and will reach 50,000 characters before making a new line. Type in the password and Encryption level" & @LF & _ "Now you may click the Decryption button and read your safe and secure from all prying eyes personal message," & @LF & @LF & _ "NOTE:: If your computer is used by others, you can secure all manner of messages, notes, letters, memo's " & @LF & _ "and the like with this program." & @LF & @LF & _ "LAST A HINT.. CALL or send a post or a email, to the person(s) whom you share this program " & @LF & _ "and decide on a password and Encryption level you will use, and use the same settings for all messages," & @LF & _ " " & @LF & _ "If You Forget Either The Password Or Encryption Level That Message Is Lost Forever!" & @LF & _ "Christine", 0) EndSwitch WEnd ; Continue loop untill window is closed Exit EndFunc ;==>_Main Also thank you TheSaint for Dialog Maker, it makes a great help popup. So how do we make the encrypted string decrypt correctly on different operating systems and processors? The back story is Flyboy's oldest daughter just reconnected to her father, and wants to make peace, However daughter number 2 who lives with the oldest daughter is still filled with bad things. and the oldest daughter is worried if her sister finds messages from their Father to her the house will implode, I thought a easy answer was to encrypt messages,, boy was I wrong. Many thanks for reading,,
  6. Short-Order Encrypter Just a fun project I had making a Crypt GUI that will encrypt and decrypt messages and files. All regular encryption types have been included for use. It will dynamically ask for a password, making it so there are never any passwords stored inside script. All dynamically built. I have included source code for your pleasure I wanted to get this onto the forum just see if anyone had any use for it. I am open and listening for questions, concerns, and comments Short-Order Encrypter.zip Short-Order EncrypterV1.0.5.zip Short-Order EncrypterV1.5.0.zip Short-Order Encrypter V1.6.0.zip Short-Order Encrypter V1.6.1.zip Current Version: 1.6.1.0 Version History:
  7. First example script. Yay for me! So apologies if there is a certain way i need to do this. It is probably more accurate to state that this is code from different people put into a instantly usable script. First, credits go to: For the encrypt\decrypt code: For the Verification against AD code: I have added commentary in the scripts that will hopefully help the newbie factor out a bit. I've been there and its nice to have helpful comments. In case you need to compare your situation with mine: I work on a helpdesk. I log on with a standard signon and use a different signon for administrative tasks. I am using this to run other scripts as an administrator.In "CredCheck.au3", it will check the username and password given against Active Directory. If it fails, it will let you know. If it succeeds, it will run the given program or script as administrator. It also writes the password to an ini file and encrypts it, and also writes the username - unencrypted. In "Unencrypt Test.au3" it will unencrypt the password which will allow it to be injected into password fields of remote pc's if needed. In my case, I did need this. CredCheck.au3 unencrypt test.au3 Good luck and any criticism welcome!
×
×
  • Create New...