Created
February 8, 2024 00:02
-
-
Save trackd/1ea84d176bc580f3ccad3d74d2f71230 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-PowershellDLEHint { | |
$iwr = (Invoke-WebRequest 'https://powershelldle.com/').Content | |
$strings = ($iwr | Select-String -Pattern '<div id="answer-char" class="(relative bottom-1)?">\s*[_-]\s*</div>' -AllMatches).Matches.Value | |
$verb, $noun = ($strings -replace '<[^>]+>').Trim() -join '' -split '-' | |
Get-Command | Where-Object { $_.Verb.Length -eq $verb.length -And $_.Noun.Length -eq $noun.length } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment