Skip to content

Instantly share code, notes, and snippets.

@CN-CODEGOD
Created October 10, 2025 19:06
Show Gist options
  • Save CN-CODEGOD/bc12f040d8bd83f3cf5ac64e55c78004 to your computer and use it in GitHub Desktop.
Save CN-CODEGOD/bc12f040d8bd83f3cf5ac64e55c78004 to your computer and use it in GitHub Desktop.
powershell key read
for ($i = 0; $i -eq 0) {
#鎸塃nter 鑾峰彇浣犵殑鍏綉IP...
Write-Host "鎸塃nter 鑾峰彇浣犵殑鍏綉IP..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Write-Host "姝e湪鑾峰彇鍏綉IP..."
$ip = (Invoke-WebRequest -Uri "http://ipinfo.io/ip").Content
Write-Host "浣犵殑鍏綉IP鏄? $ip"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment