Facebook
From dfq, 2 Weeks ago, written in Plain Text.
This paste is a reply to Re: d from fdsf - view diff
Embed
Download Paste or View Raw
Hits: 131
  1. # Lire le contenu du fichier converti en hexadécimal
  2. $hexData = Get-Content -Path "Convert_FichierExe.txt" -TotalCount 1
  3.  
  4. # Convertir la première ligne en décimal
  5. $decimalData = [System.Convert]::ToInt64($hexData, 16)
  6.  
  7. # Convertir le décimal en binaire
  8. $binaryData = [System.Convert]::ToString($decimalData, 2)
  9.  
  10. # Regrouper les valeurs binaires en blocs de 64 bits
  11. $blocLength = 64
  12. for ($i = 0; $i -lt $binaryData.Length; $i += $blocLength) {
  13.     $bloc = $binaryData.Substring($i, [Math]::Min($blocLength, $binaryData.Length - $i))
  14.     Write-Host "Bloc $([Math]::Ceiling(($i + 1) / $blocLength)): $bloc"
  15. }
  16.  

Replies to Re: Re: d rss

Title Name Language When
Re: Re: Re: d fd text 2 Weeks ago.