emptygif
Idioma: Español

Todos los lenguajes y frameworks

PowerShell PowerShell

Un fragmento en PowerShell para PowerShell que responde a las peticiones a /pixel.gif con el GIF vacío, decodificado una sola vez al arrancar.

PowerShell PowerShell

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

Ejecutamos este fragmento y comparamos los bytes que devolvió.

Sitio oficial: PowerShell

Más en PowerShell