Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/27/2025 in all areas

  1. here is a native solution without ShowKeyPlus, from a VBS translation I couldn't manage the Binary array properly, so I introduced the "WScript.Shell" Object If someone manages to do it, I'd be happy to see it. ;~ #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Global $info = ShowKeyPlus() ConsoleWrite($info & @CRLF) Func ShowKeyPlus() Local $oShell, $sProductName, $sProductID, $sProductKey, $sProductData $oShell = ObjCreate("WScript.Shell") If @error Then MsgBox(16, "Error", "Could not create WScript.Shell object.") Exit EndIf $sProductName = $oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") $sProductID = $oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId") Local $aDigitalID = $oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId") If Not IsArray($aDigitalID) Or UBound($aDigitalID) < 164 Then MsgBox(16, "Error", "Could not read the DigitalProductId from the registry.") Exit EndIf $sProductKey = ConvertToKey($aDigitalID) $sProductData = "Product Name: " & $sProductName & @CRLF & _ "Product ID: " & $sProductID & @CRLF & _ "Installed Key: " & $sProductKey Return $sProductData EndFunc Func ConvertToKey($aKeyBytes) Local Const $iKeyOffset = 52 Local Const $sMaps = "BCDFGHJKMPQRTVWXY2346789" Local $isWin8, $i, $j, $iCurrent, $sKeyOutput = "", $iLast $isWin8 = BitAND(Int($aKeyBytes[66] / 6), 1) $aKeyBytes[66] = BitOR(BitAND($aKeyBytes[66], 0xF7), BitShift(BitAND($isWin8, 2), 2)) For $i = 24 To 0 Step -1 $iCurrent = 0 For $j = 14 To 0 Step -1 $iCurrent = $iCurrent * 256 $iCurrent = $iCurrent + $aKeyBytes[$j + $iKeyOffset] $aKeyBytes[$j + $iKeyOffset] = Floor($iCurrent / 24) $iCurrent = Mod($iCurrent, 24) Next If $i > 0 Then $sKeyOutput = StringMid($sMaps, $iCurrent + 1, 1) & $sKeyOutput $iLast = $iCurrent Next If $isWin8 = 1 Then Local $sKeyPart1 = StringMid($sKeyOutput, 1, $iLast) Local $sInsert = "N" $sKeyOutput = $sKeyPart1 & $sInsert & StringMid($sKeyOutput, $iLast + 1) EndIf Return StringMid($sKeyOutput, 1, 5) & "-" & _ StringMid($sKeyOutput, 6, 5) & "-" & _ StringMid($sKeyOutput, 11, 5) & "-" & _ StringMid($sKeyOutput, 16, 5) & "-" & _ StringMid($sKeyOutput, 21, 5) EndFunc
    1 point
  2. Jos

    website automation

    Rob, What exactly is the question, as your post is merely a description of what you want to do? PS: reCAPTCHA discussions aren't allowed here when your goal is to automate them, as that is a way around standard security. Please Check forum rules in case you haven't yet.
    1 point
  3. I slightly modified something I had ready, and here are the results #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> Opt("TrayAutoPause", 0) HotKeySet("{END}", "main") ; <- HotKeySet -<< While 1 Sleep(50) WEnd Exit ;--------------------------------------------------------------------------------------- Func main() Local $sDomain = GetDomain() MsgBox(4096, "Domain:", $sDomain) EndFunc ;==>main ;--------------------------------------------------------------------------------------- Func GetDomain($sFullUrl = "") Local $sDomain = "", $iError = 0 If $sFullUrl = "" Then $sFullUrl = _ExtractLink() If Not @error Then ; Regex pattern to match the domain. Local $aMatch = StringRegExp($sFullUrl, '(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)', 3) If Not @error Then $sDomain = $aMatch[0] Else $iError = @error $sDomain = "Could not extract domain." EndIf Else ; I can't recognize the Url $iError = @error $sDomain = "I can't recognize the Url" EndIf Return SetError($iError, 0, $sDomain) EndFunc ;==>GetDomain ;--------------------------------------------------------------------------------------- Func _ExtractLink() ; Extract Link Local $hWnd = WinGetHandle("[ACTIVE]") Local $sTitle = WinGetTitle($hWnd) Local $sResult If StringRegExp($sTitle, "(?i)(.* — Mozilla Firefox.*|.* - Google Chrome.*)") Then Local $ClipBak = ClipGet() ; backUp ClipData WinActivate($hWnd) Send("{F6}") ; go in adresse bar Sleep(10) Send("{CTRLDOWN}") ; copy the link Send("c") Send("{CTRLUP}") Send("{F6}") ; deselect the link Sleep(100) Local $sLnk = ClipGet() Sleep(100) $sResult = $sLnk ClipPut($ClipBak) ; Restore backUp ClipData Return $sResult EndIf Return SetError(1, 0, "") EndFunc ;==>_ExtractLink
    1 point
  4. I really wanted to make an Example script to showcase everything that this function can do, such as changing blend color, random color button, slider for color transparency percentage, etc. However, I just don't have enough time to do it right now and my GUI skills are still lacking. I did put together a functional slider example to change the color transparency percentage in real-time which is quit neat. You would have to change the color in the script though for different colors. Example with color transparency slider:
    1 point
  5. It seems silly to me that their HIPS modules does not abide by their own exclusions. That seems to me like something that they should fix. By the way, I am not familiar with ESET. However, they seem to have a bunch of different exclusion areas to set exclusions. For example, if it were me, I would typically just set exclusions by process or directory and be on my way. But it looks like ESET has a specific HIPS exclusions section where you can add objects. I would probably try full path to firefox.exe object and also directory of profile(s). If you have already done this, I apologize. It's possible that you may still need to reboot after adding those HIP exclusions to unlock those directories. I know that you said you cannot delete the entire directory. But can you delete some of the files within that directory? I am wondering if there is a certain file(s) that is being locked. Or if they are just locking the entire directory.
    1 point
  6. Thanks for testing @water. Glad to see that it works on your side too
    1 point
  7. I have to use passwords in a lot of my scripts. I have an SQL server where each script has it's own database where I store passwords as an encrypted string along with any other config/test/log data. I also only allow specific users access to that database via AD. The decryption keys are also unique to each script. This lets me keep passwords secure and lets me control who can access my apps as if the database connection fails then the app closes with a message to contact me for access.
    1 point
×
×
  • Create New...