Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/27/2024 in all areas

  1. Thank you TheXman and pixelsearch, outstanding work! I marked that as the solution.
    1 point
  2. What's New in Version v2.2.0 Released September 27, 2024 Fixed a bug in the internal function __CryptoNG_IsKeyBitLengthValid() where it was possible for some valid key lengths to be reported as invalid. This would only occur for the few encryption algorithms that can only have 1 key length, like 3DES. Thanks @konya for reporting the bug. Removed the trailing CRLF from _CryptoNG_CryptBinaryToString() results. By default, the Win32 API (CryptBinaryToStringW) appends a CRLF to all results. Replaced all references to GCM "Authorization" tag to the correct name, "Authentication" tag. This was purely a documentation issue in the help file and function headers.
    1 point
  3. @konya Thanks for posting the example. I was wrong, there is one condition where the increment field should be 0. That's when the key can only be one length, like for DES and 3DES. For 3DES, the key length can only be 192 bits (24 bytes). So you were right about the Mod function being the issue. It should not have tried to execute the Mod() function with a divisor of zero (the increment field). Very nice catch! I will make the appropriate modification and post the updated later today. Thank you for bring the issue to my attention.
    1 point
  4. Hello jemboy, will you automate the login process or registration process? for the Login, i think you can take the following URL: https://login.tecalliance.net Greetings, Marcel
    1 point
  5. My recommendation is to run the script with $_WD_DEBUG_Full, and then share the output from a failed run of the script.
    1 point
  6. The Func __CryptoNG_IsKeyBitLengthValid($hAlgorithmProvider, $vEncryptionKey) have some issue, When I execute example it is fail and I'm found the issue is $tKeyLengthsStruct.dwIncrement = 0, Suggestion modify to ElseIf Mod($iEncryptKeyBitLength, $tKeyLengthsStruct.dwIncrement) <> 0 and $tKeyLengthsStruct.dwIncrement <> 0 Then. ,
    1 point
  7. Hello everybody When using HotKeys, I like to deactivate them immediately as 1st instruction at the beginning of the function, then reactivate them at the very end of the function. If you don't do that, then be prepared to watch the Hotkey triggered several times if you keep the keys pressed just a bit too long. So I made some changes to @TheXman good script, to add this functionality. You can try it for example like this : * Open NotePäd and type anything in it * Run the script below (the hotkey is Ctrl+a (not the best hotkey but good for the test) then select the NotePad window. * OP's behavior seems to be respected by the script (the mimic of the "double click" on Ctrl+a) * If the 1st line of the function is... HotKeySet("^a") ... then a "long" press on Ctrl+a will select what you typed in NotePad. Is it a good behavior to have it selected ? I'm not sure as you could still select all by using NotePad menu. * If the 1st line of the function is... HotKeySet("^a", _DoNothing) ...then a long press on Ctrl+a will not select what you typed in NotePad. Also please note that while the informative MsgBox is displayed during the HotKey function, then a couple of press on Ctrl+a would indeed buffer the keys (as MsgBox is a blocking function) but they won't be processed with this rewrited script, no matter the 1st line of the function is HotKeySet("^a") or HotKeySet("^a", _DoNothing) Of course the question could be : "why should the user press for a long time Ctrl+a when a MsgBox is displayed ?" The answer could be : "just to test !" * The following added part of code should prevent Ctrl+a to be processed when we're inside the HotKey function, in case the user keeps Ctrl+a pressed a "long" time : While _IsPressed("11", $ghUserDll) And _IsPressed("41", $ghUserDll) ; Ctrl = 11, A = 41 Sleep(10) WEnd * I added a Sleep(10) in main loop to refresh the CPU * The counter $iCounter is just here to indicate how many times the HotKey function was accessed, so we can see in real time its increment in the Console while pressing this or that. #include <Misc.au3> Opt("MustDeclareVars", 1) ;0=no, 1=require pre-declaration ;Declare constants Const $DOUBLE_CLICK_TIME = 500 ;Declare global vars Global $ghUserDll = DllOpen("user32.dll"), $ghCtrl_ATimer = TimerInit() ;Set hotkey HotKeySet("^a", do_ctrl_a) ;Loop until ESC pressed While 1 If _IsPressed("1B", $ghUserDll) then ExitLoop Sleep(10) WEnd ;========================================================================== ; This hotkey function only do something if called twice ; within a specified time ($DOUBLE_CLICK_TIME) ;========================================================================== Func do_ctrl_a() ; HotKeySet("^a") HotKeySet("^a", _DoNothing) While _IsPressed("11", $ghUserDll) And _IsPressed("41", $ghUserDll) ; Ctrl = 11, A = 41 Sleep(10) WEnd Local Static $iCounter = 0 $iCounter += 1 ConsoleWrite($iCounter & " ") ;Declare vars Local Static $iPrevTime = 0 Local $iCurrTime = TimerDiff($ghCtrl_ATimer) ;If function called twice within specified time If $iCurrTime < ($iPrevTime + $DOUBLE_CLICK_TIME) Then ;Do something MsgBox(BitOR($MB_ICONINFORMATION, $MB_TOPMOST), "INFO", "CTRL+A double click occurred.") ;Reset timer $ghCtrl_ATimer = TimerInit() EndIf ;Reset previous Time to current time $iPrevTime = TimerDiff($ghCtrl_ATimer) HotKeySet("^a", do_ctrl_a) EndFunc ;============================================== Func _DoNothing() EndFunc ;==>_DoNothing
    1 point
  8. Here is a very simple example using the method described earlier by argumentum. Note the use of static variables. Doing it that way prevents the need to define those variables as Global. The example script sets up Ctrl+w and Ctrl+j as hotkeys to show how the method can be used for multiple hotkeys. The payload in each hotkey function will only execute if the hotkey is fired twice within the specified time, which in this case is 500 milliseconds (.5 seconds). Press ESC to exit the example. #include <Constants.au3> #include <Misc.au3> ;Declare constants Const $DOUBLE_CLICK_TIME = 500 ;Declare global vars Global $ghUserDll = DllOpen("user32.dll"), _ $ghCtrlWTimer = TimerInit(), _ $ghCtrlJTimer = TimerInit() ;Set hotkey(s) HotKeySet("^w", do_ctrl_w) HotKeySet("^j", do_ctrl_j) ;Loop until ESC pressed While 1 If _IsPressed("1B", $ghUserDll) then ExitLoop WEnd ;========================================================================== ; These hotkey functions only do something if called twice within a ; specified time ($DOUBLE_CLICK_TIME) ;========================================================================== Func do_ctrl_w() ;Declare vars Static $iPrevTime = 0 Local $iCurrTime = TimerDiff($ghCtrlWTimer) ;If function called twice within specified time If $iCurrTime < ($iPrevTime + $DOUBLE_CLICK_TIME) Then ;Do something MsgBox($MB_ICONINFORMATION, "INFO", "CTRL+W double click occurred.") ;Reset timer $ghCtrlWTimer = TimerInit() EndIf ;Reset previous Time to current time $iPrevTime = TimerDiff($ghCtrlWTimer) EndFunc Func do_ctrl_j() ;Declare vars Static $iPrevTime = 0 Local $iCurrTime = TimerDiff($ghCtrlJTimer) ;If function called twice within specified time If $iCurrTime < ($iPrevTime + $DOUBLE_CLICK_TIME) Then ;Do something MsgBox($MB_ICONINFORMATION, "INFO", "CTRL+J double click occurred.") ;Reset timer $ghCtrlJTimer = TimerInit() EndIf ;Reset previous Time to current time $iPrevTime = TimerDiff($ghCtrlJTimer) EndFunc
    1 point
×
×
  • Create New...