📄 hexwords.html
字号:
Content-type: text/html<HTML><HEAD><TITLE>Manpage of HEXWORDS</TITLE></HEAD><BODY><H1>HEXWORDS</H1>Section: mpatrol library (1)<BR>Updated: 8 January 2002<BR><A HREF="#index">Index</A><A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR><A NAME="lbAB"> </A><H2>NAME</H2>hexwords - extracts any words from a file that can be written as hex numbers<A NAME="lbAC"> </A><H2>SYNOPSIS</H2><B>hexwords</B> [<I>options</I>] [<I>dictfile</I>]<A NAME="lbAD"> </A><H2>DESCRIPTION</H2>The <B>hexwords</B> command is a little tool that can be used to generatehexadecimal constants from a dictionary of known words. Such numericalconstants can be used in source files for a variety of debugging problems, andproblems with uninitialised variables are especially relevant since thesespecial numbers will stand out if seen from within a debugger. For example,here are some common (and some not-so-common) 32-bit hexadecimal constants thatcan be used as debugging aids:<P><TABLE><TR VALIGN=top><TD ALIGN=right><I>word</I></TD><TD><I>hex constant</I><BR></TD></TR><TR VALIGN=top><TD ALIGN=right>addedbad</TD><TD>0xaddedbad<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>allocate</TD><TD>0xa110ca7e<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>badlabel</TD><TD>0xbad1abe1<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>baseball</TD><TD>0xba5eba11<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>codebabe</TD><TD>0xc0debabe<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>codedbad</TD><TD>0xc0dedbad<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>deadbeef</TD><TD>0xdeadbeef<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>deadcode</TD><TD>0xdeadc0de<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>failsafe</TD><TD>0xfa115afe<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>feedface</TD><TD>0xfeedface<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>freedata</TD><TD>0xf4eeda7a<BR></TD></TR><TR VALIGN=top><TD ALIGN=right>goodcode</TD><TD>0x600dc0de<BR></TD></TR></TABLE><P>As can be seen above, many decimal digits can be used to represent the lettersthat they most closely resemble, along with the hexadecimal digits <I>A</I>through F. This provides a much larger selection of words that can bematched, although the digits <I>3</I> and <I>8</I> cannot be used due to the lackof any similar-looking letters. The digits and their corresponding letters aregiven in the following table.<P><TABLE><TR VALIGN=top><TD><I>digit</I></TD><TD><I>letter</I><BR></TD></TR><TR VALIGN=top><TD>0</TD><TD>O, o or Q<BR></TD></TR><TR VALIGN=top><TD>1</TD><TD>I, i or l<BR></TD></TR><TR VALIGN=top><TD>2</TD><TD>Z or z<BR></TD></TR><TR VALIGN=top><TD>3</TD><TD>-<BR></TD></TR><TR VALIGN=top><TD>4</TD><TD>q or R<BR></TD></TR><TR VALIGN=top><TD>5</TD><TD>S or s<BR></TD></TR><TR VALIGN=top><TD>6</TD><TD>G<BR></TD></TR><TR VALIGN=top><TD>7</TD><TD>J or T<BR></TD></TR><TR VALIGN=top><TD>8</TD><TD>-<BR></TD></TR><TR VALIGN=top><TD>9</TD><TD>g<BR></TD></TR><TR VALIGN=top><TD>A-F</TD><TD>A-F<BR></TD></TR><TR VALIGN=top><TD>a-f</TD><TD>a-f<BR></TD></TR></TABLE><P>The <I>dictfile</I> argument must be a valid dictionary filename but if<I>dictfile</I> is omitted then <B>hexwords</B> will use <I>/usr/dict/words</I> asthe name of the dictionary file to use. If that cannot be found then<B>hexwords</B> will try <I>/usr/lib/dict/words</I> and<I>/usr/share/dict/words</I>. The dictionary file must be a plain text filethat contains one word per line, otherwise few to no words will be matched.<P>The <B>hexwords</B> command currently makes use of several UNIX text processingcommands in order to extract the words and their hexadecimal equivalents. As aresult, the <B>hexwords</B> command is only likely to work on UNIX platforms oron systems which have the necessary commands installed.<A NAME="lbAE"> </A><H2>OPTIONS</H2><DL COMPACT><DT><B>--help</B> [<B>-h</B>]<DD>Displays a quick-reference option summary.<DT><B>--match</B> <<I>exact</I>|<I>lower</I>|<I>upper</I>|<I>any</I>> [<B>-m</B>]<DD>Sets the type of case-sensitivity to use. A setting of <I>exact</I> performs acase-sensitive comparison of all of the words in the dictionary file and thehexadecimal digits, whereas a setting of <I>any</I> does not. The <I>lower</I>and <I>upper</I> settings convert the words in the dictionary file to lower andupper case respectively before performing a case-sensitive comparison. Thedefault case-sensitivity is <I>exact</I>.<DT><B>--maximum</B> <<I>count</I>> [<B>-u</B>]<DD>Sets the maximum number of letters to match. None of the hexadecimal numbersdisplayed will have any more digits than this. The default is <I>8</I>.<DT><B>--minimum</B> <<I>count</I>> [<B>-l</B>]<DD>Sets the minimum number of letters to match. None of the hexadecimal numbersdisplayed will have any less digits than this. The default is <I>4</I>.<DT><B>--version</B> [<B>-V</B>]<DD>Displays the version number of the <B>hexwords</B> command.</DL><A NAME="lbAF"> </A><H2>SEE ALSO</H2><B><A HREF="http://localhost/cgi-bin/man/man2html?1+mpatrol">mpatrol</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?1+mprof">mprof</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?1+mptrace">mptrace</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?1+mleak">mleak</A></B>(1),<B><A HREF="http://localhost/cgi-bin/man/man2html?1+mpsym">mpsym</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?1+mpedit">mpedit</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?3+libmpatrol">libmpatrol</A></B>(3), <B><A HREF="http://localhost/cgi-bin/man/man2html?3+libmpalloc">libmpalloc</A></B>(3).<P>The mpatrol manual and reference card.<P><A HREF="http://www.cbmamiga.demon.co.uk/mpatrol/">http://www.cbmamiga.demon.co.uk/mpatrol/</A><A NAME="lbAG"> </A><H2>AUTHOR</H2>Graeme S. Roy <<A HREF="mailto:graeme.roy@analog.com">graeme.roy@analog.com</A>><A NAME="lbAH"> </A><H2>COPYRIGHT</H2>Copyright (C) 1997-2002 Graeme S. Roy <<A HREF="mailto:graeme.roy@analog.com">graeme.roy@analog.com</A>><P>This library is free software; you can redistribute it and/or modify it underthe terms of the GNU Library General Public License as published by the FreeSoftware Foundation; either version 2 of the License, or (at your option) anylater version.<P>This library is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFOR A PARTICULAR PURPOSE. See the GNU Library General Public License for moredetails.<P>You should have received a copy of the GNU Library General Public Licensealong with this library; if not, write to the Free Software Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.<P><HR><A NAME="index"> </A><H2>Index</H2><DL><DT><A HREF="#lbAB">NAME</A><DD><DT><A HREF="#lbAC">SYNOPSIS</A><DD><DT><A HREF="#lbAD">DESCRIPTION</A><DD><DT><A HREF="#lbAE">OPTIONS</A><DD><DT><A HREF="#lbAF">SEE ALSO</A><DD><DT><A HREF="#lbAG">AUTHOR</A><DD><DT><A HREF="#lbAH">COPYRIGHT</A><DD></DL><HR>This document was created by<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,using the manual pages.<BR>Time: 23:42:08 GMT, January 08, 2002</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -