Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/08/2021 in all areas

  1. TheDcoder

    Exit 1 reserved

    I agree with you, the commonly used exit codes should not be used by the interpreter itself when the script is executing. I'd propose something like reserving a range of exit codes after a large value like 1024... I will have to think about this too when I finally get around to working on executing code in ECI
    2 points
  2. Encryption / Decryption / Hashing / Signing Purpose Cryptography API: Next Generation (CNG) is Microsoft's long-term replacement for their CryptoAPI. Microsoft's CNG is designed to be extensible at many levels and cryptography agnostic in behavior. Although the Crypt.au3 UDF lib that is installed with AutoIt3 still works well, the advapi32.dll functions that it uses have been deprecated. In addition the Crypt.au3 UDF lib, as it is currently written, has a very limited ability to decrypt AES data that was not encrypted using Crypt.au3 functions. That is because Crypt.au3 functions do not allow you to specify an actual key or initialization vector (IV). It only lets you specify data to be used to derive a key and uses a static IV. This UDF was created to offer a replacement for the deprecated functions used by Crypt.au3. According to Microsoft, deprecated functions may be removed in future release. It was also created to allow more flexibility and functionality in encryption/decryption/hashing/signing and to expand the ability for users to implement cryptography in their scripts. Description This UDF implements some of Microsoft's Cryptography API: Next Generation (CNG) Win32 API functions. It implements functions to encrypt/decrypt text and files, generate hashes, derive keys using Password-Based Key Derivation Function 2 (PBKDF2), create and verify signatures, and has several cryptography-related helper functions. The UDF can implement any encryption/decryption algorithms and hashing algorithms that are supported by the installed cryptography providers on the PC in which it is running. Most, if not all, of the "magic number" 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_AES_CBC_EncryptData _CryptoNG_AES_CBC_DecryptData _CryptoNG_AES_CBC_EncryptFile _CryptoNG_AES_CBC_DecryptFile _CryptoNG_AES_ECB_EncryptData _CryptoNG_AES_ECB_DecryptData _CryptoNG_AES_GCM_EncryptData _CryptoNG_AES_GCM_DecryptData _CryptoNG_3DES_CBC_EncryptData _CryptoNG_3DES_CBC_DecryptData _CryptoNG_3DES_CBC_EncryptFile _CryptoNG_3DES_CBC_DecryptFile Generic Symmetric Encryption/Decryption Functions _CryptoNG_EncryptData _CryptoNG_DecryptData _CryptoNG_EncryptFile _CryptoNG_DecryptFile Hashing Functions _CryptoNG_HashData _CryptoNG_HashFile _CryptoNG_PBKDF2 Asymmetric (Public/Private Key) Cryptography Functions _CryptoNG_ECDSA_CreateKeyPair _CryptoNG_ECDSA_SignHash _CryptoNG_ECDSA_VerifySignature _CryptoNG_RSA_CreateKeyPair _CryptoNG_RSA_EncryptData _CryptoNG_RSA_DecryptData _CryptoNG_RSA_SignHash _CryptoNG_RSA_VerifySignature 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 Get CryptoNG from the AutoIt Downloads Area
    1 point
  3. Melba23

    Noob question

    Lion, Welcome to the AutoIt forums. When you post code in future please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Thanks in advance for your cooperation. This thread was reported as "game-related" - as far as I can see it deals with selecting teams and not playing the game itself, so i am prepared to let it run for the present. But I suggest that the OP read the Forum rules to make sure he understands the limits we set in the forum. M23
    1 point
  4. In the U.S. it’s 2 days
    1 point
  5. Here’s the thing, for ImageSearch.au3 that exact line 44 array subscript error has been encountered literally a dozen times, including in the thread you linked. But I have used the same functions, e.g. _ImageSearchArea(), without problem. But I am using _ImageSearch.au3 (with a leading underscore), which can be found here: I think maybe it’s a newer version?? Anyway, the functions always return an array and if nothing is found then $result[0]=0, just like the error is expecting.
    1 point
  6. argumentum

    Exit 1 reserved

    I was looking at an example and it would Exit 1 on error. So what's wrong with that. Well, we can get an error from different aspects of the script, been the stub errored, or the wrapper errored, or finally, the script. What I propose is to start script errors on 3 onwards. Been 1 the error of AutoIt3, 2 of the wrapper, and finally the script. If you agree vote for me: "argumentum 2021" Really, if the concept is sound then say it and if not ... well, say it too PS: this is in regard to Exit codes of a script and not that of Return in a Function.
    1 point
  7. raymm3852, Alas, this seems to be happening more and more often lately. You appear to have been infected by some form of malware which is trying to open this non-existent file. I suggest a full anti-virus/malware scan as soon as possible, plus a good inspection of those programs running automatically at startup as it is one of those that is probably the root of the problem. M23
    1 point
  8. There aren't many details in your request. How are you currently reading the file? Have you looked into using FileReadToArray or _FileReadToArray?
    1 point
×
×
  • Create New...