Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/23/2022 in all areas

  1. 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
  2. Today, I will share my work with image search in inactive windows (windows that run in the background) with tolerances (variations). After a long time of searching and using image search UDF on the internet. I combined all of that with my experienced and created a UDF name HandleImgSearch. I have embedded the .dll file in this script so it doesn't need any external files, just include it and run. However, this UDF uses a pure AutoIT loop to make the multiple positions returned work so it may be slower if you set the $MaxImg to a high number. Some highlights: Very fast with imagesearchdll embedded, no external files required. Tolerances and Max Images are supported. Optimized. Use with a handle or full screen easily. Included global functions, so you can run multiple functions in one capture. Examples used for testing included. Notes: Only used to compile to 32-bit AutoIt version (It can completely run on Windows 64-bit) The image used for searching should be in a "24-bit Bitmap" format. I included the $IsUser32 variable in some places like _GlobalImgInit, _HandleCapture. This variable allowed you to use DllCall with the "PrintWindow" parameter instead of _WinAPI_BitBlt with $SRCCOPY. $IsUser32 = True is useful for the window explorer handle, $IsUser32 = False is useful for the emulator handle (NoxPlayer handle example included). If hwnd parameter equals "", it will use the whole screen instead. Functions: Global Functions: Run multiple functions with one capture. _GlobalImgInit: Initialization variables. _GlobalImgCapture: Capture the handle. _GlobalGetBitmap: Get captured bitmap handle. _GlobalImgSearch: This is the main function of this UDF. _GlobalGetPixel: Get pixel color in the captured image. _GlobalPixelCompare: Compare pixel color with captured image pixel color. Handle Functions: Capture every time. _HandleImgSearch: This is the main function of this UDF. Search for images in the handle of the window with the tolerance and maximum image options. _BmpImgSearch: Search the picture in the picture instead of the handle. _HandleGetPixel: Get pixel in the handle image. _HandlePixelCompare: Compare color with pixel color of handle image. _HandleCapture: Capture handle screen. Source code: v1.0.5 (First release): https://github.com/vnniz/HandleImgSearch/releases/tag/v1.0.5 v2.0.0 (14/04/2023): https://github.com/vnniz/HandleImgSearch/releases/tag/v2.0.0 Thanks to: ImageSearchDLL (Author: kangkeng 2008) MemoryCall (Author: Joachim Bauch) BinaryCall (Author: Ward) GAMERS - Asking for help with ANY kind of game automation is against the forum rules. DON'T DO IT.
    1 point
  3. I don't know if anyone has ventured to do something like this; vos synthesis (tts) I can say that it is a utility and more than that that allows you to transcribe written text to spoken voice, a clear example is the voices of microsoft sapi5 and third-party voice engines such as Loquendo, Vocalizer, Ibona etc. I, as a person with disabilities, use this resource a lot because an example is the screen reader, which makes the text that appears on the screen or the maus read it with a voice, since it is more than clear that these screen readers They use text to speech. A few months ago I began to investigate a bit of an idea to create a voice synthesis. I have been learning Autoit for two years now and it would be a language to fulfill everything I wanted, although this was difficult at first, but now what? Two months ago I was developing a mini text-to-speech engine in autoit. Although I know that for many this is incredible, but apart from the automation with autoit you can get the rest of its potential. Just visit this code and I would like you to comment on it. By the way, the voice synthesizer is in Spanish, but it can be adapted to another language such as English. https://github.com/rmcpantoja/SUCSpeech I share the help of the synthesizer: ## Introduction: SucSpeech is a free text-to-speech synthesizer and has two synthesis modes: Simple (letters) and advanced (syllables). These syntheses use the unit selection method, concatenating audio files that correspond to letters or syllables. It is made in [autoit](http://autoitscript.com/) which means it supports only Windows. In fact, the program [Blind Text](https://github.com/rmcpantoja/Blind-Text) has clear examples of how this synthesizer is used in the program. The Synthesizer-comaudio.au3 file is the main engine or base of the synthesizer. You can explore it and see how it is made. Don't worry, there are comments on the necessary lines. ## instructions for creating voices: 1. [Download](https://github.com/rmcpantoja/SUCSpeech) or clone the SucSpeech repository using Git clone or the URL in your browser. 2. Download [autoit](https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe) to run. 3. To create a voice, in simple synthesis mode, keep in mind that we must record the phonemes and letters as they sound (this can record words that contain a sound for a specific letter or vowel and cut with an editor audio). 4. In the case of the advanced synthesis mode (syllables) we must record longer sentences or phrases and cut each syllable of that sentence, but there must not be clips left and we must cut very carefully so that the voice can come out as correctly as possible possible. There are examples in the voicepacks_source folder, with 120 .wav files with the sounds and phonemes recorded in each voice. For each letter, vowel or sign, three audios are needed. For example, if we want to record the sound of the vowel a, then we have to record an a1.wav, a2.wav and a3.wav, the three vowels with different pitches or else the voice sounds monotonous when processing text. Apply the same to the Voicepacks_source_pro folder, but in this case it's syllables. Note: There should be no silence in the files. simple mode: To start making the voice, we simply create a new folder in voicepack_sources with the name of the language, an underscore, and the name of the voice. For example Es_Fulano. "Es" from Español (Spanish), "Fulano" the name of the voice. From that folder we can make our recordings. We can build on the structure of the voices that are already integrated in the repository. Basically there are three sounds from a to z, signs like dot, comma, percent, plus, minus, phonemes like ch, sh, etc. Advanced mode: To create a more advanced and high-quality voice, we also create a subfolder in Voicepacks_source_pro with the language name, an underscore, the voice name, underscore, and hq, for example: Es_carla_hq. It should be noted that this mode is still in beta, but it can be recorded following the structure of the es_default_hq voice, which is a few steps away from being completed. 5. If we already have the voice, we have to package it.The first thing is to enter the folder of your voice, select all 120 files and create a .zip without compression with your favorite program. 5.1. One last thing: Once the zip has been created, we must execute the encrypter.au3 that is located in the root folder of the source code. Once opened, an open dialog opens where you can select the .zip file that you just created and, once selected, another window will appear with the explorer that now allows you to save the encrypted zip file, which guarantees more security since unlike zip this encryptor offers encryption with a password. The encrypted files must be saved in voicepacks, and the extension must be .dat. Then we can make a script as an example to see how our voice turned out or to test an existing voice. You must include the include\synthesizer-comaudio.au3 file. ### example: hablarenletras("Es_default (wisper)", "Este es un ejemplo de síntesis de voz. Me llamo susurro y te voy a contar un secreto: El día de ayer fui a la tienda y me compré diez manzanas.", 1, 0.75) ### Explanation: The function is HablarEnLetras (SpeakInLetters), followed by the parameters. The first is the name of the voice (es_default (wisper)), the second is the string or text "Este es un ejemplo de síntesis de voz. Me llamo susurro y te voy a contar un secreto: El día de ayer fui a la tienda y me compré diez manzanas.", third volume (1) and fourth speed (0.75). In this way, executing the script, the test of our voice among all the available ones would come out. ## Collaboration If you have any suggestions that help improve this project, do not hesitate to make a pull request. Your help and suggestions are welcome!
    1 point
  4. WIN+w --> reserved by Windows for Whiteboard WIN+q --> reserved by Windows for Query WIN+s --> reserved by Windows for Search convince yourself with this script: _HotKey("{ESC}") _HotKey("#w") ; is reserved by Windows --> Whiteboard _HotKey("#q") ; is reserved by Windows --> Query _HotKey("#s") ; is reserved by Windows --> Search Func _HotKey($hotkey = "") ; ! ALT + SHIFT ^ CONTROL # WinKey Switch @HotKeyPressed Case "{ESC}" Exit 0*MsgBox(0, Default, "Exit", 3) Case "#w" Beep() ; will never beep Case "#q" Beep() ; will never beep Case "#s" Beep() ; will never beep Case Else If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed,15) If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.",15) EndSwitch EndFunc ;==>_HotKey While Sleep(100) MsgBox(262144, Default, "Press ESC to Exit." & @CRLF & @CRLF & "or WIN+w / WIN+q / WIN+s to verify the WIN Keys." ,3) WEnd
    1 point
  5. jguinch

    SRER challenge

    @TheXman : what about asking Powershell to to the whole job ? (replacement of " and without temp file) #include <Constants.au3> Local $PS_CMD = "(Get-Process|where{$_.MainWindowTitle}|select MainWindowHandle,Id,ProcessName,MainWindowTitle,Handles -first 4|ConvertTo-Csv -NoTypeInformation -Delimiter '|')-replace '""""', ''" $iPid = Run(StringFormat('powershell -command "%s"', $PS_CMD), "", @SW_HIDE, $STDOUT_CHILD ) ProcessWaitClose($iPid) $sOut = StdoutRead($iPid) ConsoleWrite($sOut)
    1 point
  6. TheXman

    SRER challenge

    If you are going to execute a PowerShell command anyway, why not let Powershell do the heavy lifting in terms of formatting your output? Example: #include <Constants.au3> example() Func example() ;Command to get first 10 processes that have a window title and export ;the result to a pipe-delimited file. Const $PS_CMD = "Get-Process" & _ "|Select-Object MainWindowHandle,Id,ProcessName,MainWindowTitle,Handles" & _ "|Where-Object {$_.MainWindowTitle -ne ''}" & _ "|Select -First 10" & _ "|Export-CSV -path .\~temp.csv -Delimiter '|' -NoTypeInformation" Local $iPid = 0, $iExitCode = 0 Local $sCmdOutput = "" ;Execute the command $iPid = Run(StringFormat('powershell -command "%s"', $PS_CMD), "", Default, $STDERR_MERGED) ProcessWaitClose($iPid) $iExitCode = @extended $sCmdOutput = StdoutRead($iPid) If $iExitCode Then Exit ConsoleWrite("ERROR: " & @CRLF & $sCmdOutput & @CRLF) ;Show output ConsoleWrite(StringReplace(FileRead("~temp.csv"), '"', '') & @CRLF) ;Delete temp file If FileExists("~temp.csv") Then FileDelete("~temp.csv") EndFunc Example Output: MainWindowHandle|Id|ProcessName|MainWindowTitle|Handles 7669050|3932|firefox|SRER challenge - AutoIt General Help and Support - AutoIt Forums ? Mozilla Firefox|1117 13632660|2176|KeePass|KeePass.kdbx [Locked] - KeePass|229 15337406|4448|SciTE|C:\Projects\Personal\AutoIt\Test\A3Temp\a3_temp.au3 - SciTE [1 of 2]|197 18942332|4408|StikyNot|Sticky Notes|142 If you are using PowerShell 7.0+, you can use "-UseQuotes Never" in the Export-CSV. Then, you won't need to do the StringReplace to removes the quotes. I did it without -UseQuotes, in this example, so it would work using any versions of PowerShell.
    1 point
  7. ISI360

    ISN AutoIt Studio

    Hi folks! It´s update time again! ISN AutoIt Studio version 1.14 is now online! Have fun with it, and as always: Feedback is welcome! 😎 Here the detailed changelog (translated by google):
    1 point
  8. Werty

    post # - how to locate?

    The person refering to a post could rightclick the "Posted" time of the post and copy and paste the link to it. like if I rightclick jquinch's "Posted 33 minutes ago" and copy the link... https://www.autoitscript.com/forum/topic/207407-post-how-to-locate/?do=findComment&comment=1495577 ..it jumps to his post when clicked.
    1 point
  9. Nas

    AutoIT ImageSearch

    Team, I am looking for the AutoIT imagesearch UDF, all I could find is threads from 2008 and 2009, also tried to download some, but did not work on windows 10, any idea where I can find it please? PS: I am just trying to find an area on my screen if it changes I need AutoIT to click on a button that's it pretty simple.
    1 point
  10. dead dl link
    1 point
  11. Jos

    Image Search Library

    Not seen the OP for 8 years so assume topic is dead other than the "link dead" posts. *click*
    0 points
×
×
  • Create New...