Oprócz wbudowanych szablonów, edytor dysku obsługuje niestandardowe szablony, aby przeglądać i edytować różne struktury dysku. Warunki, przejścia, proste arytmetyce można stosować do analizy złożonych struktur disku, takich jak rekordy MFT.
Standardowo szablony są ładowane z pliku template.txt. Aby korzystać z innych plików, ini-parametr mogą być stosowane editortemplates=, symbole wieloznaczne są dozwolone (na przykład, editortemplates=template*).
Zobacz pliki template.txt i template.tx_ dla próbek szablonów.
Każdy szablon zaczyna się od nazwy w nawiasach kwadratowych [Template Name], i dalsze parametry szablonu i polecenia (jeden na linię).
flow:0 - wyświetlić jeden rekord na raz. flow:1 - wyświetlić rekordy jeden po drugim.
h:Header - statyczny nagłówek Header.
$RECSIZE - rozmiar rekordu.
$OFFSET - względne przesunięcia stosowany jest na blokach danych.
$1 ... $64 - zmienne użytkownika (64-bitowa liczb całkowitych).
Stałe są określone jako dziesiętnych i szesnastkowym (z prefiksu 0x).
Data block is usually a single byte/word/dword at a fixed position but it also may be any range(s) of record bytes/bits which are processed as a single variable. Data block is specified in braces {...}.
{X+Z} defines range of Z bytes starting at offset X,
{X:Y+Z} defines range of Z bits starting at offset X byte and Y bits,
where X, Y, and Z may be any variables or constants,
several ranges may be separated by commas, e.g. {0x00+4,$1:$2+4}.
Format defines how data block is represented and edited (e.g. as integer / char / string, etc.).
The following formats are supported:
%u - unsigned integer (up to 32bit)
%D - signed integer (32bit)
%I - signed integer (64bit)
%X - hexadecimal (up to 32bit)
%IX - hexadecimal (up to 64bit)
%c - ANSI character (8bit)
C - array of ANSI characters
U - array of Unicode characters (UTF-16)
UNIXDATE - Unix date (seconds since epox)
FILETIME - Windows file time (nanoseconds since 1601)
F:ABCD.. - Flags (where A is displayed if bit 0 set, and B if bit 0 clear, etc.)
Output command defines the position on the screen and format for data block or variable or outputs text.
{...},x:X,w:W,c:C,f:Format outputs data block {...} at column X with the maximum width W.
x:X,w:W,c:C,f:Text outputs Text at column X with the maximum width W
in color C.
Kolor c:C, jest opcjonalny
(0 - domyślne, 1 - tytuł,
8 - czerwony, 10 - szary).
= (equal sign) specifies end of line (line feed).
Conditions are used in the following way:
Line LABEL:N defines a label, and command GOTO:N is a jump to line LABEL:N, where N is any constant. Inaccurate use of GOTO may cause infinite loop.
Assignment operator := may be used to assign variables with a constant values, data block values, other variable values and the result of their addition or subtraction, e.g. $1:=$2+{X:Y}, $OFFSET:=$OFFSET+8.
Switches may be used e.g. to hide/show some lines by clicking or pressing Spacebar. E.g., command $1:=TOGGLE:N,x:X outputs button [+] ([-]) at column X, where N is a unique switch number (variables and constants are allowed, the best way is to use the next data offset); variable $1 gets value 0 or 1 depending on the switch state. Only one switch may be in state 1.
Record size calculation: commands between lines CALCSIZESTART and CALCSIZEEND. It is used when record size may be greater than the sector size and may depend on disk data. Variable $RECSIZE may be assigned in this section only.
Data preprocessing: commands between lines LOADSTART and LOADEND. It is used e.g. for MFT USN processing (restoration of last two bytes of each sector). Data blocks may be assigned in this section: e.g., use {U+Y}:={X+Y} to copy Y bytes at offset X to offset U.
Data postprocessing: commands between lines FLUSHSTART and FLUSHEND. It is used for reverse operation when writing modified data to disk (data blocks may be assigned).