emptygif
Idioma: Português

Todas as linguagens e frameworks

PowerShell PowerShell

Um snippet em PowerShell para PowerShell que responde às requisições para /pixel.gif com o GIF vazio, decodificado uma única vez na inicialização.

PowerShell PowerShell

Arquivo
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)

Executamos este snippet e comparamos os bytes que ele retornou.

Site oficial: PowerShell

Mais em PowerShell