Tous les langages et frameworks
PowerShell PowerShell
Un extrait PowerShell pour PowerShell qui répond aux requêtes sur /pixel.gif avec le GIF vide, décodé une seule fois au démarrage.
PowerShell PowerShell
# 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)
Nous avons exécuté cet extrait et comparé les octets qu’il a renvoyés.