?? ht.texi
字號:
- segments @*- names @*- entrypoints @*- image with code/data analyser (x86) @*- auto-relocation layer (pretty complete)@end itemize@item portable executables (PE32, PE64)@itemize @w@item- header @*- import section @*- delay-import section @*- export section @*- resources @*- image with code/data analyser (x86, AMD64, PowerPC, IA-64, Alpha, ARM) @*- preliminary support for .net executables@end itemize@item java class files (CLASS)@itemize @w@item- header @*- image with code/data analyser (java bytecode disassembler)@end itemize@item Mach exe/link format (MachO)@itemize @w@item- header @*- image with code/data analyser (x86, AMD64, PowerPC, ARM) @*@end itemize@item X-Box executable (XBE)@itemize @w@item- header @*- imports @*- image with code/data analyser (x86) @*@end itemize@item Flat (FLT)@itemize @w@item- header @*- image with data analyser (no disassembler yet) @*@end itemize@item PowerPC executable format (PEF)@itemize @w@item- header @*- imports- image with code/data analyser (PowerPC) @*@end itemize@itemStill some to be implemented (M$-OBJ, ARCH, LX)@end itemize@itemCode & Data Analyser@itemize @w- finds branch sources and destinations recursively @*- finds procedure entries @*- creates labels based on this information @*- creates xref information @*- allows to interactively analyse unexplored code (press 'c') @*- allows to create/rename/delete labels (press 'n') @*- allows to create/edit comments (press '#')@end itemize@itemTarget systems@itemize @w- DJGPP @*- GNU/Linux @*- FreeBSD @*- Win32@end itemize@end enumerate@node Configuration files, , Features, Features@unnumberedsec Configuration files@unnumberedsubsec Global configurationHT automatically creates a file to store its configuration.It is called @file{~/.htcfg2} on Unices and @file{ht.cfg2} (where ht.exe resides) on Windows. More specifically it contains HT's registry and the @xref{Global history}.@unnumberedsubsec Per file configurationThe analyser (for analysable files) will be stored in an extra file called @file{FILENAME.htcfg}, where FILENAME is the analysed file. This file containsall information to restore the complete state of the analyser.@node Clipboard, , Features, Features@unnumberedsec ClipboardAll open files and dialogs use the common clipboard, where allcopied and cut text or binary data is stored. Clipboard operations are normally binary safe, that means you can copy some binary data out of afile and paste it into an input line. Exceptions are only the \0 character(binary null), it will be converted to a space in places where it would notmake sense (e.g. file open). Although the clipboard won't be saved between different HT sessions(ie. you will loose it when exiting HT), you can either save and load itor part of it manually (via Edit->paste into/copy from file) or rely onthe input lines' @xref{Global history, history}, which is stored andretrieved from the config file automatically.@node Global history, , Features, Features@unnumberedsec Global historyHTs history system is global, which means that you can use it for all openfiles. Histories are also grouped by their context. I.e. file-related and regex-search-related dialogs have their own history (who would want to open "[0-9][0-9a-z]+" anyway?).History entries are stored within the @xref{Configuration files}, so theycan be reused when you relaunch.You can delete a history entry by pressing DEL inside the history popup.@node Expression evaluation, , Features, Features@unnumberedsec Expression evaluationHT contains a very powerful expression evaluator which is used in all dialogswhere expressions are expected. These are mainly blockoperation, goto,search and of course evaluate itself (Edit->Evaluate).You can use all standard math operators (+ - / * % **), logical operators(! && || ^^), relational operators (== != < > <= >=),bit operators (~ & | ^), string operators (. for concatenation),parenthesis, the ternary operator (a?b:c), functions and symbols (both depending on context).The evaluator uses integer, string and float types depending on context. Youcan always convert a result via the @code{int()}, @code{string()} and @code{float()} functionsto appropriate type. Try Edit->Evaluate to see how it works@dots{}@unnumberedsubsec Functions and symbolsYou can always use the standard built-in math (@code{round}, @code{sin}, @code{random}, etc.) andstring (@code{strcmp}, @code{strchr}, @code{sprintf}, etc.) functions, they work more or less like the correspondingC functions (actually they ARE more or less wrappers for them); see @file{eval/eval.y} for details (sorry but a detailed help would get outdated rather soon).The symbol _ always refers to the last result.When using @xref{Block operations}, or searching you have some context depending functions and symbols; see these sections for explanation.@node Block operations, , Features, Features@unnumberedsec Block operationsBlock operation (Blockop) is a very powerful tool to perform modificationson binary files. It is available in hex viewer only.Blockop takes four parameters: @var{start}, @var{end}, @var{mode} and@var{expression}. Blockop works as follows:@itemize @bullet@itemSTART: Start at the offset specified by @var{start}@itemREPEAT: Evaluate @var{expression} and store n bytes (1 - byte, 2 - word,4 - dword, variable - string) at the current offset. Increment current offsetby n. Stop if @var{end} has been reached.@end itemize@noindentSpecial variables/functions that can be used in @var{expression}:@table @code@item readbyte(ofs)read a byte from offset @var{ofs}, returns a number@item readstring(ofs, size)read @var{size} bytes from offset @var{ofs}, returns a string@item icontains the iteration count/index starting with 0@item ocontains the current offset@end table@node Search and its different modes, , Features, Features@unnumberedsec Search and its different modesThe search function is one of the most advanced functions of HT.It is invoked through F7, Shift-F7 continues a search from cursor.Depending on context (ie. file type and mode) the following modes are enabled:@unnumberedsubsec bin: ASCII / HexEnter an exact search string either via ascii characters or via hexadecimalinterpretation. This is the fastest search mode. You may specify a case-insensitive search.@unnumberedsubsec bin: eval strEnter an expression, it will be evaluated ONCE (difference to the 4th mode),and HT will then search for the result-string. This is pretty useful whensearching for intermixed text and control-chars/binary, e.g. @code{"hello world\n\0"}@unnumberedsubsec display: regexAs the prefix indicates, this search doesn't search in the binary file butin the display on screen. HT searches for a regular expression so this canbe very powerful, e.g. in PE/Image you can search for @code{(add|sub).+?,\ [78]$}.This will find all add or sub instructions with second parameter 7 or 8.@unnumberedsubsec expr nonzeroThis is the slowest but also most advanced search mode. Enter an expressionand the search stops if this expression evaluates to non-zero (it will be evaluated on every byte). In this mode there are two predefined symbolsand some functions: @var{i} is always the number of current iteration and@var{o} stands for the current offset in file. With the functions @code{readbyte(ofs)}and @code{readstring(ofs, size)} you access the file's content.It's easier to understand this with examples:@enumerate 1@itemSearching for patterns: @enumerate a@itemEnter @code{readbyte(o) == readbyte(o+1)}@*This will search for two equal bytes ("AA", "55", "!!", etc.).@itemEnter @code{(readbyte(o) == readbyte(o+1)+1) && ((readbyte(o)==readbyte(o+2)+2)}@*This will search for three ascending bytes ("ABC", "123", etc).@end enumerate@itemSearch with special functions:With HT you can easily detect the RSA key in the @file{ADVAPI32.DLL}:Search for @code{entropy(readstring(o, 64)) > 82} in expr!=0 mode, and you willfind it very quickly. How does it work? @code{readstring(o, 64)} reads a 64 byte stringfrom current offset and entropy calculates the entropy ("randomness") of a string (result is 0..100).So the search stops if a entropy greater than 82% (guessed value)is encountered, which normally indicates packed or encryted data.Note: the @code{entropy()} function is not the best of its kind, if you know of a betterone please let us know!@end enumerate@node Command line options, , Features, Features@unnumberedsec Command line options@multitable @columnfractions .10 .20 .70@item @code{--}@tab@tabtreat all additional parameters as file names@item @code{-v}@tab@code{--version}@tabshow version and copyright on console@item@code{-h}@tab@code{--help}@tabshow help@item@code{-t}@tab@code{--text}@tabload file(s) in text editor mode@item@code{-b}@tab@code{--bin}@tabload file(s) in hex editor mode@item@code{-a}@tab@code{--auto}@tabtry to guess file type@end multitable@node Where to download?, , Top, Top@unnumberedsec Where to download?@noindentThe HT homepage is at @hturl{}@noindentDownloads are available from the 'download' section. Please also take a look at@htsfurl{}@ifinfo@contents@end ifinfo@bye
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -