Initial source release
This commit is contained in:
commit
11301fae04
55 files changed
+2652
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# Дамп встроенного меню grldr в текстовый файл для анализа.
|
||||
$f = 'F:\efi\Paravis\Boot\g4d\grldr'
|
||||
$b = [IO.File]::ReadAllBytes($f)
|
||||
|
||||
# ищем BOM в конце файла
|
||||
$bom = -1
|
||||
for ($i = $b.Length - 8192; $i -lt $b.Length - 2; $i++) {
|
||||
if ($b[$i] -eq 0xEF -and $b[$i+1] -eq 0xBB -and $b[$i+2] -eq 0xBF) { $bom = $i; break }
|
||||
}
|
||||
"BOM offset: 0x{0:X} ({0}), size={1}, menu bytes={2}" -f $bom, $b.Length, ($b.Length - $bom - 3)
|
||||
|
||||
$text = [Text.Encoding]::UTF8.GetString($b[($bom+3)..($b.Length-1)])
|
||||
$text = $text.TrimEnd([char]0)
|
||||
|
||||
$out = 'C:\PF\Ventoy\backup\g4d-grldr-menu.txt'
|
||||
[IO.File]::WriteAllText($out, $text, (New-Object System.Text.UTF8Encoding($false)))
|
||||
" сохранено: $out"
|
||||
" строк: " + ($text -split "`n").Count
|
||||
Reference in new issue
Block a user