Skip to content

Instantly share code, notes, and snippets.

@0187773933
Last active May 23, 2023 15:12
Show Gist options
  • Save 0187773933/eee3abd9fb8932b8a9478639fef5ca40 to your computer and use it in GitHub Desktop.
Save 0187773933/eee3abd9fb8932b8a9478639fef5ca40 to your computer and use it in GitHub Desktop.
Windows Command to Print the File Signature Bytes
powershell -Command "& {$file = Get-Content -Path $args[0] -Encoding Byte -TotalCount 16; $hex = ($file | % { $_.ToString('X2') }) -join ' '; $ascii = [System.Text.Encoding]::ASCII.GetString($file); Write-Host 'Hex: ' $hex; Write-Host 'ASCII: ' $ascii}" Other_2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment