Initial source release
This commit is contained in:
commit
11301fae04
55 files changed
+2652
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# Анализ структуры меню grldr: где кончается текст и что идёт дальше.
|
||||
$f = 'F:\efi\Paravis\Boot\g4d\grldr'
|
||||
$b = [IO.File]::ReadAllBytes($f)
|
||||
|
||||
$s = [Text.Encoding]::ASCII.GetString($b)
|
||||
$i = $s.IndexOf('title Kaspersky Rescue Disk 18')
|
||||
"KRD-блок начинается: 0x{0:X}" -f $i
|
||||
|
||||
$endMarker = "initrd`t%path%/initrd.xz`n"
|
||||
$j = $s.IndexOf($endMarker, $i)
|
||||
"initrd-строка: 0x{0:X}, длина маркера {1}" -f $j, $endMarker.Length
|
||||
$blockEnd = $j + $endMarker.Length
|
||||
"конец блока: 0x{0:X}, длина блока: {1} байт" -f $blockEnd, ($blockEnd - $i)
|
||||
"--- байты после блока (32):"
|
||||
(($b[$blockEnd..($blockEnd+31)] | ForEach-Object { '{0:X2}' -f $_ }) -join ' ')
|
||||
"--- позиция первого 0x00 после блока:"
|
||||
$z = -1
|
||||
for ($k = $blockEnd; $k -lt $blockEnd + 4096; $k++) { if ($b[$k] -eq 0) { $z = $k; break } }
|
||||
" 0x{0:X} (смещение от конца блока: {1})" -f $z, ($z - $blockEnd)
|
||||
Reference in new issue
Block a user