Jump to content

Recommended Posts

Hi @RTFC,

I used your tools to encrypt my .au3 and (almost) all was good.

My program (a GIS system) must be in 3 languages, ENG,RUS,GER

I use a loc.au3 file where I have all phrases in the 3 languages.

To use cyricllic I had to switch to File->Encoding->UTF8 BOM

When I use Codecrypter it correctly wraps and .au3 works but ONLY in english. When I switch to RUS I can see only ?????????? ?????????? ?????

How to solve this?

Thanks,

Marco

Link to post
Share on other sites
  • Replies 396
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

CodeCrypter enables you to encrypt scripts without placing the key inside the script. This is because this key is extracted from the user environment at runtime by, for example: password us

Codecrypter version 3.1 is released; a major upgrade, made possible by the incorporation of TheXman's CryptoNG suite (with permission, of course). Many thanks to TheXman for allowing me to incorporate

Found the issue, which was indeed a bug. Please stand by for an updated bundle... CodeScannerCrypter bundle version 2.4 is now released, with many thanks to @Roman for flagging the bug.

Posted Images

As I stated before, if people want me to have a look at a particular (potential) issue, then please provide the smallest-possible script that reproduces the error/problem.

Link to post
Share on other sites

hmm is there a log I can provide you? There are no errors in .au3.
This is the "trick" I use to switch language:
 

$idOptionsmenu = GUICtrlCreateMenu("&Options")
$idLocalization = GUICtrlCreateMenu("Language", $idOptionsmenu)
$idLocENG = GUICtrlCreateMenuItem("English", $idLocalization)
$idLocRUS = GUICtrlCreateMenuItem("Russian", $idLocalization)
$idLocGER = GUICtrlCreateMenuItem("German", $idLocalization)

then

Case $idLocENG
            GUICtrlSetState($idLocENG, $GUI_CHECKED)
            GUICtrlSetState($idLocRUS, $GUI_UNCHECKED)
            GUICtrlSetState($idLocGER, $GUI_UNCHECKED)
            RegWrite($RegisterKey, "Language", "REG_SZ", "ENG")
            _send($dictionary[44])
        Case $idLocRUS
            GUICtrlSetState($idLocENG, $GUI_UNCHECKED)
            GUICtrlSetState($idLocRUS, $GUI_CHECKED)
            GUICtrlSetState($idLocGER, $GUI_UNCHECKED)
            RegWrite($RegisterKey, "Language", "REG_SZ", "RUS")
            _send($dictionary[44])
        Case $idLocGER
            GUICtrlSetState($idLocENG, $GUI_UNCHECKED)
            GUICtrlSetState($idLocRUS, $GUI_UNCHECKED)
            GUICtrlSetState($idLocGER, $GUI_CHECKED)
            RegWrite($RegisterKey, "Language", "REG_SZ", "GER")
            _send($dictionary[44])

with

#include <Localization.au3>

.
.
.
Global $dictionary[120]
.
.

Local $s_language = RegRead($RegisterKey, "Language")
.
.

    For $i = 0 To UBound($dictionary) - 1
        $dictionary[$i] = Eval($s_language & $i)
    Next

and my localization.au3, just to understand,

.
.
.

$ENG115= "Info"
$ENG116= "About"
$ENG117= "Terms of Use"
$ENG118= "Help"
.
.
.

$RUS115= "Информация"
$RUS116= "О продукте"
$RUS117= "Условия использования"
$RUS118= "Справка"

 

 

Edited by marko001
Link to post
Share on other sites

Yeah, I'm not about to spend ages trying to reverse-engineer something that might possibly produce an error that might be similar to the one you're experiencing, or not, without any way of checking.:ermm: In your case, since this seems to concern localisation-specific strings, maybe adapt the provided HelloWorld example, and avoid GUIs if you can. Please note that the smaller and simpler the reproducer, the easier it is for me to narrow down what might be going wrong, so defintely nothing over a hundred lines in total. Thanks.

Link to post
Share on other sites

Strike 1. So which part of

17 hours ago, RTFC said:

provide the smallest-possible script

and

15 hours ago, RTFC said:

avoid GUIs if you can

did you not understand? Especially since the issue can be reproduced in one line:

MsgBox(0,"test","Русский текст")

Moreover, your GUI reproducer would mess with my registry without my consent (if I had let it), which I consider rather rude.

Strike 2. How did you figure that this is a CodeCrypter problem? Did you even read the CodeCrypter FAQ? Especially the part where it describes how to methodically identify where a problem might originate? Just inspecting the CodeScanner output (either in its GUI or the "stringsUsed.txt" files in the output subdirectory would have shown you that this has got nothing to do with encryption. You didn't even have to run a backtranslate (but I suppose you didn't try that first either).

Strike 3. How about you try clicking this link, and maybe adopt that strategy as a general first approach before you post. That would have shown you that this is a generic AutoIt limitation that dozens of users have run up against in various contexts (with various solutions as well), for example here, here, and here. So the obvious solution is to not #include your language translations in the script, but keep them in separate files that you load/process at runtime. Nothing prevents you from also encrypting/decrpyting these (at runtime) with regular crypt functions (which will be encrypted by CodeCrypter). Or else maybe store them in binary form, and convert them at runtime.

Three strikes, and you're out. I won't be helping you again. [click]

Link to post
Share on other sites

You're making your life difficult and Eval isn't needed.

Change your localized data file to something like this:

Global Enum $LANG_EN, $LANG_RU, $LANG_DE, $LANG_FR

Global $Dictionary = [ _
    [ _                         ; EN
        "Close", _
        "Standard Checkbox", _
        "Quit", _
        "The checkbox is checked.", _
        "The checkbox is not checked." _
    ], _
    [ _                         ; RU
        "близко", _
        "Стандартный флажок", _
        "Уволиться", _
        "Флажок отмечен.", _
        "Флажок не отмечен." _
    ], _
    [ _                         ; DE
        "Schließen", _
        "Standard Checkbox", _
        "Verlassen", _
        "Das Kontrollkästchen ist aktiviert.", _
        "Das Kontrollkästchen ist nicht aktiviert." _
    ], _
    [ _                         ; FR
        "Fermer", _
        "Case à cocher standard", _
        "Quitter", _
        "La case est cochée.", _
        "La case n'est pas cochée." _
    ] _
]

; language in force
Global $Lang

;===========================================================================
; example use
;---------------------------------------------------------------------------
; randomly select a language and display some strings
For $i = 1 To 3
    $Lang = Random($LANG_EN, $LANG_FR, 1)
    Use_Example()
Next

Func Use_Example()
    For $i = 1 To 3
        MsgBox(0, "", $Dictionary[$Lang][Random(0, UBound($Dictionary, 2) - 1, 1)])
    Next
EndFunc

 

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to post
Share on other sites

@jchd thanks for your great support, dude, I appreciated.

Do you think, due the fact dictionary is over 200 phrases, it's better to keep it in  a separate au3 or keep it in the main script?

Thanks again,

Marco

[Edit]: Obviously I had to change to UTF-8 to show correctly cyrillic.
Could this led to troubles when encoding?

SS_2174.jpg

Edited by marko001
Link to post
Share on other sites

Having 600+ lines of string data on top of the main source is uneasy to deal with.  Keep the data in it's own file and #include it just as you currently do.

When modifying the main code you don't have to page down at hell to find code, and if you need to change/add localized strings, it's easy enough to open the separate file.

You may also want to give strings a verbose ID instead of just a numeric index.  It would make your code easier to read and less error-prone:

Global Enum $LANG_EN, $LANG_RU, $LANG_DE, $LANG_FR

Global Enum $MSG_Close, $MSG_StdChkBox, $MSG_Quit, $MSG_ChkedBox, MSG_UnChkedBox

Global $Dictionary = [ _
    [ _                         ; EN
        "Close", _
        "Standard Checkbox", _
        "Quit", _
        "The checkbox is checked.", _
        "The checkbox is not checked." _
    ], _
...

Of course, giving a short yet meaningful name (enum) matching the actual string index is up to you, but I find MsgBox(0, "", $Dict[$Lang][$MSG_FileReadErr]) more readable than MsgBox(0, "", $Dict[$Lang][98]).

Obviously you still have to take care that the number and order of strings are the same for every language.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to post
Share on other sites

But the problem still remains.

After encoding with Codecrypter I get this.

With your hint my code is surely better now but I still can't figure out how to get rid of these ????? on a crypted .au3 when on the contrary cyrillic is correctly shown on unencoded au3s

SS_2179.jpg

Link to post
Share on other sites

I don't know how the things work in CodeCrypter, but I suspect some part isn't handling UTF8 correctly.  That sould be relatively easy to fix.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to post
Share on other sites
1 minute ago, jchd said:

I don't know how the things work in CodeCrypter, but I suspect some part isn't handling UTF8 correctly.  That sould be relatively easy to fix.

"relatively easy" :D

You are the man: 8.820 posts and 1.416++ 

:D

 

Link to post
Share on other sites
  • 1 month later...

This was an oversight in my patching of the CryptoNG lib; fixed in v3.3c, available for download now.

Link to post
Share on other sites
  • 3 months later...

@RTFC

I see a few differences between your modified version of CryptoNG and the original version that could be problematic.  When comparing the version of CryptotNG.au3 that you distribute, which appears to be my v1.6.1, I think the following differences may need to be corrected.  The last correction listed below, is definitely the reason why the hashing result is not being returned in the post above. 
 

In __CryptoNG_BCryptCreateHash, the following line should be changed from

DllStructSetData($tHMACSecretBuffer,"data",$vHMACSecret)

to

DllStructSetData($tHMACSecretBuffer,"data",$xHMACSecret)

 

In __CryptoNG_BCryptEncrypt_CBC, the following line should be changed from

DllStructSetData($tIVBuffer,"data",$vIV)

to

DllStructSetData($tIVBuffer,"data",Binary($vIV))

 

In __CryptoNG_BCryptFinishHash, the following line should be changed from

;All is good
DllStructGetData($tDataBuffer,"data")

to

$xHash = DllStructGetData($tDataBuffer,"data")

 

For the record, as of this evening, CryptoNG is up to v1.7.0.  There's not a major difference in functionality between v1.6.1 and v1.7.0.  However, it does have several function header corrections and the getting/setting of structure fields was changed back to the object-based way of doing it.  There are a few more small additions, modifications, and optimizations, but not really enough to warrant switching to the newest version, unless you wanted to of course.   ;)

Edited by TheXman
Link to post
Share on other sites

@TheXman:Thanks a bunch for scrutinising my patched version!:) I will implement the fixes soon.:> I did have a look at your CNG version 1.7, but as you already noted, the improvements you made were not going to impact CodeCrypter performance to any great extent, and I'm still not a fan of object-based notation, but I do appreciate your continuing efforts to make CNG the best it can possibly be. Sorry for the oversights on my part in adapting your work (bit distracted at the moment).

@quimao: fix uploaded. Thanks for notifying me.

Edited by RTFC
Link to post
Share on other sites

I have a problem with CodeScannerCrypter. When I run Codescanner it usually opens directly in the current folder. That way I know its working. With the latest Windows updates it opens in This PC and when i navigate and find my file it doesnt work properly. It still do some calsulations but its way faster and it incomplete and it doesnt work. Now It doesnt even show the files in the folder. I downloaded v3.3.d from here (although it says its submitted 27 of February, this is the official link. Old versions doesnt work as well.



 I believe that have something to do with Windows Permissions. They started to make things difficult to run scripts since v1709 and up. And when new version comes out they implement it in lower versions Windows Updates. I have a tweaked WIndows but I try to remove the restrictions so I dont think its from that since on default Windows its the same.

Anyone else with similar problem?

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By TheXman
      Encryption / Decryption / Hashing
      Purpose
      Cryptography API: Next Generation (CNG) is Microsoft's long-term replacement for their CryptoAPI.  CNG is designed to be extensible at many levels and cryptography agnostic in behavior.  Although the Crypt.au3 UDF that is installed with AutoIt3 still works perfectly, the advapi32.dll functions that it uses have been deprecated.  This UDF was created to offer a replacement for the deprecated functions.  According to Microsoft, deprecated functions may be removed in future release.  Therefore, this UDF will be available when/if that happens.
      Description
      This UDF implements some of Microsoft's Cryptography API: Next Generation (CNG) Win32 API functions.  In its initial release, it implements functions to encrypt text & files, decrypt text and files, generate hashes, and the Password-Based Key Derivation Function 2 (PBKDF2) function.  The UDF can implement any of the encryption/decryption algorithms or hashing algorithms that are installed on the PC in which it is running.  Most, if not all, of the values that you would commonly use to specify that desired algorithms, key bit lengths, and other magic number type values, are already defined as constants or enums in the UDF file.
      To flatten the learning curve, there is an example file that shows examples of all of the major functionality.  This example file is not created to be an exhaustive set of how to implement each feature and parameter.  It is designed to give you a template or guide to help you hit the ground running in terms of using the functions.  I have tried to fully document the headers of all of the functions as well as the code within the functions themselves.    As of v1.4.0, there is also a Help file that includes all of the functions, with examples.
      Current UDF Functions
      Algorithm-Specific Symmetric Encryption/Decryption Functions _CryptoNG_3DES_CBC_DecryptData _CryptoNG_3DES_CBC_DecryptFile _CryptoNG_3DES_CBC_EncryptData _CryptoNG_3DES_CBC_EncryptFile _CryptoNG_AES_CBC_DecryptData _CryptoNG_AES_CBC_DecryptFile _CryptoNG_AES_CBC_EncryptData _CryptoNG_AES_CBC_EncryptFile _CryptoNG_AES_ECB_DecryptData _CryptoNG_AES_ECB_EncryptData
        Generic Symmetric Encryption/Decryption Functions _CryptoNG_DecryptData _CryptoNG_DecryptFile _CryptoNG_EncryptData _CryptoNG_EncryptFile
        Hashing Functions _CryptoNG_HashData _CryptoNG_HashFile _CryptoNG_PBKDF2
        Asymmetric (Public/Private Key) Encryption/Decryption Functions _CryptoNG_RSA_CreateKeyPair _CryptoNG_RSA_EncryptData _CryptoNG_RSA_DecryptData
        Misc / Helper Functions _CryptoNG_CryptBinaryToString _CryptoNG_CryptStringToBinary _CryptoNG_GenerateRandom _CryptoNG_EnumAlgorithms _CryptoNG_EnumRegisteredProviders _CryptoNG_EnumKeyStorageProviders _CryptoNG_LastErrorMessage _CryptoNG_Version  
      Related Links
      Cryptography API: Next Generation - Main Page
      Cryptography API: Next Generation - Reference
      Cryptography API: Next Generation - Primitives
      Cryptography API: Next Generation - Cryptographic Algorithm Providers
    • By RTFC
      The CodeScannerCrypterBundle (ca. 2.5 MB unzipped) contains the following UDFs and utilities:
      CodeScanner: analyse AutoIt script structure and content, identify potential issues, generate MCF data files CodeCrypter: front-end GUI for the MCF library, for script encryption (without storing the decryption key(s) in the script!) MetaCodeFile UDF (MCF library): for analysis and user-defined alterations of AutoIt script structure and content MCFinclude.au3: #include this UDF in any AutoIt script that you wish CodeCrypter to process AES.au3, by Ward; machine code UDF for AES encryption (32-bit, patched version) CryptoNG, by TheXman; encryption UDF using Bcrypt dll calls (32/64-bit; various algorithms) StoreCCprofile.au3/readCSdatadump.au3/helloworld.au3: auxiliary utilities and example script HowToCodeCrypt.pdf: a simple guide in five steps CodeCrypterFAQ.pdf: questions and answers, partly based upon exchanges in the CodeCrypter thread. Please follow the links for additional information.
    • By RTFC
      MetaCode offers a way to:
      separate a script's structure from its content remove all redundant definitions (globals and UDFs) change any content (and some structure) combine (new) structure and (new) content into a new script The most useful applications implemented so far are:
      Fast language translation (not just text strings, also variable names and UDF names) Obfuscation (vars and/or UDFs) Script Encryption (conditionals, calls, and macros) Encryption is powerful because the key is not stored anywhere; you can define it to be a user password, macro, environment spec/variable, server response, something you define yourself, or a combination thereof; anything goes, as long as it's not a fixed string or fixed value. More info in the CodeCrypter thread: ?do=embed' frameborder='0' data-embedContent>'?do=embed' frameborder='0' data-embedContent>>
      ?do=embed' frameborder='0' data-embedContent>
      But MetaCode has more potential than that; it allows you to tinker with any type of content separately, then rebuild a new version. So for example, you can have a single script structure and numerous different language modules you just plug in to create a new version in a different language.
      A brief Tutorial is here: MetaCode Tutorial.pdf
      The MCF library itself can be found in the CodeScannerCrypter bundle.
      And a little example how to use it for translating your GUI into a different language:
       UI_Translator.7z (new version that should work with the new version of Google Translate, see post #13 below)
       
       
      MCF.au3 is just the library plus the MCFinclude.au3 file you need to include in any script you wish to encrypt.
      There is no GUI here. However, I did write a separate front-end for it called CodeCrypter, which you can find here:
      ?do=embed' frameborder='0' data-embedContent>'?do=embed' frameborder='0' data-embedContent>>
      ?do=embed' frameborder='0' data-embedContent>
      MCF uses output generated by my CodeScanner version 2.8+, which you can find here:
      '?do=embed' frameborder='0' data-embedContent>>
      CodeScanner also depends on MCF.au3 now, as it can now call a few of its functions.
      I should also mention Ward's excellent AES.au3 UDFs used for the encryption and decryption calls,  which is now included in the CodeScannerCrypter bundle (thanks to Ward for allowing to include it). You can find the original (unpatched) version here:
      '?do=embed' frameborder='0' data-embedContent>>
      Note: you can replace the encryption/decryption calls with whatever algorithm you like (hint: the native <Crypt.au3> library is too slow for most purposes, better stick to machine code routines)
      So just to be clear:
      CodeScanner (v2.8+) needs MCF (earlier versions won't work!) CodeCrypter needs MCF (plus anything that MCF needs) MCF itself needs MCFinclude (part of MCF zip) MCF also needs readCSdatadump (part of the CodeScanner package, you need the latest version packaged with CodeScanner v2.8; earlier versions won't work!) both MCF and MCFinclude currently rely on AES.au3 by Ward So you basically need to download the whole bundle for any of it to work.
       
      If you have any questions, please start by reading the MCF Tutorial and the CodeCrypter FAQ (you can download the latter separately from the CodeCrypter thread).
      Next, read the extensive Remarks sections in MCF.au3, MCFinclude.au3, and CodeCrypter.au3
      If still no joy, then please post. However, I'm not online that often, and logged in to the forum even less, so response may take a while).
      RT
    • By Radix
      Hi.

      I would like to know if it is possible to implement an autoit script with GOST algorithm. I noticed that there are seven different algorithms in the standard UDF, but I urgently need a command line crypter with GOST algorithm. I just lack the algorithm part. Is it possible to adapt GPLib in the autoit script?

      http://www.delphipages.com/comp/gplib-14771.html

      Thx.
    • By RestrictedUser
      I had created login form and this form first goes to de-crypting file that encrypted then read the saved credentials by de-cryptied file, but doesn't work properly!
      I want just read encrypted data without saving de-crypted file, just read! 
      #NoTrayIcon #include <Crypt.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;==================================Variables=================================== ;Encryption settings _Crypt_Startup() $PEK = _Crypt_DeriveKey("BS#Password", $CALG_AES_256, $CALG_SHA_512) $DefaultCredFile = "[Credentials]" & @CRLF & "BUsername=NoAdmin" & @CRLF & "BPassword=NoAdmin" & @CRLF & "[Process]" & @CRLF & "ProcessKillingTimeout=3600" $EncryptDefaultCred = _Crypt_EncryptData($DefaultCredFile, $PEK, $CALG_AES_256) $IniReadCredPassword = IniRead(@WindowsDir & "\Config\GUIDecCred.dat", "Credentials", "BPassword", "") $IniReadCredUsername = IniRead(@WindowsDir & "\Config\GUIDecCred.dat", "Credentials", "BUsername", "") ;==================================Variables=================================== AuthForm() Func AuthForm() Global $LoginForm = GUICreate("Login", 201, 161, -1, -1) Global $CloseBTN = GUICtrlCreateButton("Close", 23, 126, 75, 25) Global $SignInBTN = GUICtrlCreateButton("Sign-in", 103, 126, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") Global $PasswordInput = GUICtrlCreateInput("admin", 8, 88, 185, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_PASSWORD)) Global $UsernameInput = GUICtrlCreateInput("admin", 8, 40, 185, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) Global $UsernameLBL = GUICtrlCreateLabel("Username:", 8, 21, 55, 17) Global $PasswordLBL = GUICtrlCreateLabel("Password:", 8, 68, 53, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $SignInBTN AuthProcess() EndSwitch WEnd EndFunc AuthProcess() Func AuthProcess() $ReadEnteredUsername = GUICtrlRead($UsernameInput) $ReadEnteredPassword = GUICtrlRead($PasswordInput) If Not FileExists(@WindowsDir & "\Config\GUIEncCred.dat") Then FileDelete(@WindowsDir & "\Config\GUIDecCred.dat") ;Delete previous de-crypted credentials FileWrite(@WindowsDir & "\Config\GUIEncCred.dat", $EncryptDefaultCred) ;Write en-crypted credentials as "*.dat" file FileClose(@WindowsDir & "\Config\GUIEncCred.dat") ;Close en-crypted credentials file _Crypt_DecryptFile(@WindowsDir & "\Config\GUIEncCred.dat", @WindowsDir & "\Config\GUIDecCred.dat", $PEK, $CALG_AES_256) ;Write de-crypted file from an en-crypted file as "*.dat" file Else _Crypt_DecryptFile(@WindowsDir & "\Config\GUIEncCred.dat", @WindowsDir & "\Config\GUIDecCred.dat", $PEK, $CALG_AES_256) ;Write de-crypted file from an en-crypted file as "*.dat" file EndIf Sleep(25) If $ReadEnteredUsername == $IniReadCredUsername And $ReadEnteredPassword == $IniReadCredPassword Then ;Username and Password verify stage MsgBox(64, "", "Welcome!") FileDelete(@WindowsDir & "\Config\GUIDecCred.dat") Exit Else MsgBox(14, "", "Incorrect!") FileDelete(@WindowsDir & "\Config\GUIDecCred.dat") Sleep(25) EndIf EndFunc How Can i? 
×
×
  • Create New...