emptygif
語言: 繁體中文

所有語言和框架

PowerShell PowerShell

適用於 PowerShell 的 PowerShell 程式碼片段,以空 GIF 回應對 /pixel.gif 的請求,GIF 在啟動時只解碼一次。

PowerShell PowerShell

檔案
pixel.ps1
# Works in Windows PowerShell 5.1 and PowerShell 7+ (.NET needs an absolute path).
$bytes = [Convert]::FromBase64String('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==')
[IO.File]::WriteAllBytes((Join-Path $PWD 'pixel.gif'), $bytes)

我們執行了這段程式碼,並比對了它回傳的位元組。

官方網站: PowerShell

更多 PowerShell 範例