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 示例