emptygif
Lingua: Italiano

Tutti i linguaggi e framework

PowerShell PowerShell

Uno snippet PowerShell per PowerShell che risponde alle richieste a /pixel.gif con la GIF vuota, decodificata una sola volta all'avvio.

PowerShell PowerShell

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

Abbiamo eseguito questo snippet e confrontato i byte che ha restituito.

Sito ufficiale: PowerShell

Altro in PowerShell