Jump to content

New _Crypt functions VS old _StringEncrypt functions


Recommended Posts

Is there a way to mantain "compatibility"  between the old and the new (last versions of Autoit) encryption methods ?

I have a client - server system in autoit and I want to encrypt a string with the new functions, and to decrypt with the old functions (in old exe's).

I made some tests with various crypt  algoritms of the new functions VS the old StringDecrypt but with no luck.

Any help appreciated.

Edited by t0nZ
Link to comment
Share on other sites

You can only choose one or the other. _StringEncrypt() is quite outdated.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Of course from now I'll use only the new crypt functions, but for now I want to manage the transition.

I have over an hundred of remote clients and those scripts rely the autoupdate on the exchange of crypted data .

So i was searching how to crypt a string with new functions, in a way decryptable by the old functions.

So you tell me there is no way to obtain compatible encription ? OK.

Btw I can manage this situation with a slighty more complex update....

Thank you.

Link to comment
Share on other sites

Care to share what you decided to do?

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I decided to convert all my scripts to the new encryption method.

The situation: I have developed a standard (for me) function named Selfupdate()

Selfupdate() dowloads from a site an encrypted txt file with directives on updates and other commands for  various different scripts running on remote clients.

I run into this problem recompiling the new version of a script destined to run remotely.

First issue... the script wan't compile with old crypt instructions ... OK, so I go to change it with the new instructions.

But after this the script  will download an encripted file (encripted with old method) now not decriptable, dead end.

Ok I have to change first of all the script on the server that do the encription... but then the remote clients don't update.. dead end.

So I have to make a first remote update with old encription methods, (updating decrypt system on clients)  and I cannot make errors...

I can make it.

Link to comment
Share on other sites

Ok my quick and dirty solution and replacement to old _StringEncrypt functions in  my scripts is this function:

Func Ncrypt($operation, $string, $Key);  string crypt/decrypt function

    ; operation = crypt/decrypt, string= string to operate, key = the password

    Local $iAlgorithm = $CALG_AES_256

    If StringStripWS($string, $STR_STRIPALL) <> "" Then ; Check there is text available to encrypt.
        If $operation = "crypt" Then
            $string = _Crypt_EncryptData($string, $Key, $iAlgorithm); ENcrypt the text 
        Else
            $string = BinaryToString(_Crypt_DecryptData($string, $Key, $iAlgorithm)) ; DEcrypt the text 
        EndIf
    Else
        $string = ""
    EndIf

    Return $string

EndFunc   ;==>Ncrypt

For writing a file with an encripted string I have to :

FileWrite($hFileOpen, StringToBinary($string))

and to decript the same file I download it with Inetread and then I have to:

$string = BinaryToString($string)

    $string = Ncrypt("decrypt", $string, "password")

Now it work well in my old scripts... you think I can improve it ?

Link to comment
Share on other sites

Did anyone notice the StringEncrypt() function I included in the examples for the Crypt functions?

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

#include <string.au3>
MsgBox(64, "", _HWID())

Func _HWID()
$osdrive = StringLeft(@SystemDir, 3)
$original = "0"&@CPUArch & @KBLayout & DriveGetSerial("C:\") & StringUpper(DriveGetType($osdrive)) & DriveSpaceTotal ($osdrive)
;$string2 = StringMid($original, Round(StringLen($original)/2), Round(StringLen($original)/2))
;$string2_mod = _StringToHex(_StringReverse($string2))
;$original = _StringEncrypt(1, $original, $string2_mod, 4)
$original = _StringEncrypt(1, $original, 4)
Return $original
EndFunc

Did anyone notice the StringEncrypt() function I included in the examples for the Crypt functions?

I did and having a lot of issues figuring out how to use the new one

So i made changes per what I thought would work I took your code

; Encrypt text using a generic password.     Local $sEncrypted = StringEncrypt(True, 'Encrypt this data.', 'securepassword')

and used it to replace the old crypt

#include <string.au3>
#include <Crypt.au3>
#include <MsgBoxConstants.au3>
MsgBox(64, "", _HWID())

Func _HWID()
$osdrive = StringLeft(@SystemDir, 3)
$original = "0"&@CPUArch & @KBLayout & DriveGetSerial("C:\") & StringUpper(DriveGetType($osdrive)) & DriveSpaceTotal ($osdrive)
;$string2 = StringMid($original, Round(StringLen($original)/2), Round(StringLen($original)/2))
;$string2_mod = _StringToHex(_StringReverse($string2))
;$original = _StringEncrypt(1, $original, $string2_mod, 4)
;$original = _StringEncrypt(1, $original, 4)
Local $sEncrypted = StringEncrypt(True, $original)
Return $original
EndFunc

all i got was what I had before a error I don't understand

"C:Program FilesAutoIt3SonoMiniIndie5driveGetserial.au3"(13,50) : error: StringEncrypt(): undefined function. It works great in the sample but not for me.. Kinda like my car, it stutters and shakes and makes funny sounds until my husband comes to check it and it runs great for him..

Edited by meows
Link to comment
Share on other sites

The signature of the new one is exactly the same as the old one, so you need to be a little more vigilant.

StringEncrypt(True, $sOriginalData, 'PASSWORD') ; True means encrypt it.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Thank you I will try, Old brain,,  I ended up using old crypt, until I can figure this one out. Project I am working on not allowing me time to research out how to use new crypt in old code.  Many thanks. *hugs*

Very messy but that is what happens when trying to figure things out. In the end I always end up with something I can use.. Not what I really wanted but what I could make that got the essentials done. this is one of 5  number 3 in the list.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=cps250.ico
#AutoIt3Wrapper_Outfile=EvalYES.exe
#AutoIt3Wrapper_Res_Description=placeholder
#AutoIt3Wrapper_Res_Fileversion=12.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=placeholder
#AutoIt3Wrapper_Res_Language=1033
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; *** Start added by AutoIt3Wrapper ***
#include <FontConstants.au3>
; *** End added by AutoIt3Wrapper ***
#include  "ExtMsgBox.au3"

#include <MsgBoxConstants.au3>
#include <FileConstants.au3>
#include<string.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <placeholderdowsConstants.au3>
#include <GuiTab.au3>
#include <Misc.au3>
#include <ColorConstants.au3>
#include <GuiButton.au3>
#include <ExtMsgBox.au3>
#include <constants.au3>
#include <placeholderAPI.au3>
$Regit1 = GUICreate("reg1", 621, 442, 192, 114)
$back1 = GUICtrlCreatePic("C:\Program Files\AutoIt3\placeholder\bd.jpg", 0, 0, 608, 440)

;Opt("GUIOnEventMode", 1)
Local Const $1Font = "Tahoma"
$hButton1 = GUICtrlCreateButton("Register ", 20, 20, 1, 1, GUISetState(@SW_HIDE))

$hButton6 = GUICtrlCreateButton("Read Me", 20, 20, 1, 1, GUISetState(@SW_HIDE))
$hButton7 = GUICtrlCreateButton("Exit", 20, 20, 1, 1, GUISetState(@SW_HIDE))
GUICtrlSetState($hButton1, @SW_HIDE)

;GUISetBkColor(0xC96A00) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT).


;$hTest_GUI = GUICreate("Beat the placeholder",200, 460, 240, 100)
$Label1 = GUICtrlCreateLabel("placeholder", 120, 64, 364, 55, $WS_BORDER)
GUICtrlSetFont($Label1, 24, 400, 0, "SF Gushing Meadow")
GUICtrlSetBkColor($Label1, 0xFF8E77)
GUICtrlSetTip($Label1, "Want to go for the placeholder placeholder?")
$Label2 = GUICtrlCreateLabel(" Get Sono placeholder placeholder.", 144, 120, 290, 31)
GUICtrlSetFont($Label2, 12, 400, 0, "SF Gushing Meadow")
GUICtrlSetBkColor($Label2, 0xD3892E)
$Label3 = GUICtrlCreateLabel(" 1. placeholder Sono placeholderFree version ", 120, 168, 268, 17)
GUICtrlSetBkColor($Label3, 0xFFFBF0)
$Label4 = GUICtrlCreateLabel(" 2. placeholder the placeholder and send in the placeholder code with your full name. ", 120, 192, 366, 17)
GUICtrlSetBkColor($Label4, 0xFFFBF0)
$Label5 = GUICtrlCreateLabel(" 3. Have all placeholder send in their codes ", 120, 216, 196, 17)
GUICtrlSetBkColor($Label5, 0xFFFBF0)
$Label6 = GUICtrlCreateLabel(" 4. downloaded version of Sono placeholder  Full Verson.", 120, 240, 305, 17)
GUICtrlSetBkColor($Label6, 0xFFFBF0)
$Label7 = GUICtrlCreateLabel(" Enter your Full Name for Code to placeholder placeholder placeholder", 152, 272, 246, 17)
GUICtrlSetBkColor($Label7, 0xFFFFFF)
;GUICtrlCreateLabel($sMsg, 10, 160, 180, 240, GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT))
;
GUISetState(@SW_SHOW,$Regit1)
;GUISetState()
Button1Click()
Button6Click()
Button7Click()
While 1
$nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

   Case $hButton1
 Button1Click()


 Case $hButton6
 Button6Click()


 Case $hButton7
     Exit
 Button7Click()


   EndSwitch
WEnd
Func Button6Click()

;Register ()
;Yes your totally right I don't have a clue but I do get things done it just takes a week or 4 to make each line work and placeholder with all the others.
;over three fourth of the comments are deleted as they didnt work.
;This is my wanabee key generator. it is only used for a temp (free) piece of software easier than putting in all the code for full key generator.
;Thank goodness for the examples, Docs, Wiki, and Tutorials.
;Func Register()
Local $securityCodeEncryptionKey = "placeholder" ;this must match the applications key
;Local $securityCodeEncryptionKey = "placeholder" ;this must match the applications key
$str = InputBox ("placeholder Registration","Register to placeholder for placeholder Full version Download for Free & @crlf & @crlf & @crlf & @crlf Input first and last name")
If @error = 1 then exit

$Generate = StringUpper (StringRight ($str,5))
$restore = StringUpper(_StringEncrypt (1, $Generate, $securityCodeEncryptionKey , 1 ))

ClipPut ($restore)

Msgbox (0,"ISS Drive Check","The registration code is: " & $restore & "Your code has been placed on the DESKTOP placeholder.TXT and clipboard You can paste it into a text file to save it")
Local $sEvalString1 = Eval("$restore")
    #forceref $restore
IniWrite (@DesktopCommonDir & "\placeholder.TXT", "General", "registration", $restore)

;    MsgBox($MB_SYSTEMMODAL, "", $restore  )
    ; Initialize the variale $sString with data
    Local $sString = DriveGetSerial(@HomeDrive & "\") ; Find the serial number of the home drive, generally this is the C:\ drive.

    ;Local $sString = "This is a string"

#forceref $sString
    ; Find the value of the variable string sString and assign to the variable $sEvalString.
    ;Local $sEvalString = Eval("sString")

    ; Displaceholder the value of $sEvalString. This should be the same value as $sString.
;    MsgBox($MB_SYSTEMMODAL, "", $sEvalString  )
    ;IniWrite (@ScriptDir & "\known.ini", "General", "RootDrive", $sEvalString)
; FileMove(@TempDir & "\*.au3", @TempDir & "\Au3Files\", $FC_OVERWRITE + $FC_CREATEPATH)
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications","placeholder", "REG_MULTI_SZ", "SOFTWARE\placeholder\placeholder\placeholderAttempt\ControlCenter\Capabilities\" & $sString )
RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications","placeholderVersion", "REG_MULTI_SZ",  "SOFTWARE\placeholder\placeholder\"& $restore)
FileCopy(@DesktopCommonDir & "placeholder.TXT", @AppDataCommonDir & "\placeholder.TXT", $FC_OVERWRITE + $FC_CREATEPATH)
;MsgBox($MB_SYSTEMMODAL, "", @AppDataCommonDir  )
EndFunc   ;==>Example
Func Button1Click()
    GUICtrlSetState($hButton1, $GUI_ENABLE)

$answer =     MsgBox(4,"Get Sono placeholder "," placeholder version and placeholder the placeholder. ")
     If $answer = 7 Then
    MsgBox(0, "", "OK.  Bye!")
    Exit
EndIf
;Local $hWnd = placeholderGetHandle("[ACTIVE]")
;placeholderSetOnTop($hWnd, "", 0)
;

;If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer
            ;    $iMsgBoxAnswer = MsgBox(292, "Sono", " placeholder ?")
                ;Select
                ;    Case $iMsgBoxAnswer = 6 ;Yes
                    ;    Call Button1Click()
                    ;        Case $iMsgBoxAnswer = 7 ;No
                    ;    Exit
                ;EndSelect
EndFunc
Func Button7Click()
    Exit
EndFunc
Edited by meows
Link to comment
Share on other sites

My "policy" is to adapt old scripts to the ultimate version of Autoit, if I have to modify these scripts.

I think in the long run it's a good move, because I have to know only the peculiarities of the last version.

Exception: yesterday I have to modify a script on an ancient win2000 server (yes... :ermm: ) and I keep the  last version of Autoit capable of compiling exes for win2000 (3.3.8.1) in a virtual machine.

Edited by t0nZ
Link to comment
Share on other sites

  • 7 months later...

This is certainly not making my life easy.  This is such a great product and I am sure for all hard core encrypters this new change is really inspiring, but it is unfortunately not contributing to my user experience.

this must be one of the worst improvements I have ever seen.

I have over 3000 files locked with the old _StringEncrypt

I am struggling. Even the examples do not work for me.  I can see my encrypted string in the console... but, FileWrite writes garbage to my txt file

Is there ANY WAY I can get the old StringEncrypt back at least until I figure out this mess?  

Skysnake

Why is the snake in the sky?

Link to comment
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
 Share

×
×
  • Create New...