bpe

Hurricane Electric Internet Services: Accounts starting at $9.95/month
Hurricane Electric Internet Services

NAME

       bpe - examine and patch binary files


SYNOPSIS

       bpe  allows  a  file to be searched and modified in either
       ASCII or hexadecimal. Each buffer  is  displayed  in  both
       modes.


DESCRIPTION

       bpe binary.file

   Commands
       D - Dump one page from current file position
       S - Set current file pointer
       F - Find string in file (beginning from curr. position)
       / - Same as F
       H - locate hex bytes in file (beginning from curr. position)
       N - Display next sector
       P - Display previous sector
       + - Scroll forward 2 lines
       - - Scroll back 2 lines
       e - Edit ASCII portion of file
       E - Edit binary portion of file
       W - Write modified sector back to disk
       Q - Quit Program
       ? - help

   Editing a file
       Enter  an  editing  mode by typing 'e' (for ASCII edit) or
       'E' for hex edit. The cursor may be moved  either  by  the
       arrow  keys or the vi-style ^H, ^J, ^K, ^L keys, depending
       on compilation options. Place the cursor on  the  byte  to
       change  and  type either a printing ASCII character or two
       digit hex value. Exit either edit mode by typing ^E.  When
       you  are  satisfied with your editing, enter the W command
       to write the modified portion of the file back to disk.

   Searching for data
       You may search for hex data by giving the  h  command  and
       entering  a string of hex digits. The search procedes for-
       ward from the current location until a matching string  is
       found.  The  display  is adjusted to put the first byte at
       the top of the screen (but see configuration options).  If
       no pattern is specified the previous pattern is used.

       To search for a string, enter the F (for find) command, or
       the vi style / command. At the prompt type in a string and
       press  return.  The  search  procedes  as  with a hex byte
       search. If you wish to repeat a string search, enter the F
       command  again  and  press  return.  This  will repeat the
       search for the previous string. If the  starting  position
       has  not been adjusted the search will start one character
       past the location of the last occurence found.

   Configuration options
       The makefile contains configuration  option,  identifiable
       by comments.  These are all at the top of the makefile. If
       your curses supports KEYPAD definition for your  terminal,
       you may use the cursor keys on the keypad.  This is gener-
       ally only found in SysV systems with termlib  versions  of
       curses. If you don't have that feature the NOKEYPAD option
       will allow use of vi style cursor keys.

       When searching, if you prefer to see the pattern  in  con-
       text you may set the CLINES to the number of lines of con-
       text displayed before the pattern found.  This  may  cause
       problems  doing hex searches. In addition, if you want the
       display to start on a 16 byte boundary, to match od or  hd
       output, you may enable the ALLIGN option.


WARNINGS

       Illegal commands are flagged as such.


SEE ALSO

       od, hd, possibly adb.


DIAGNOSTICS


LIMITATIONS

       If  the l or L commands are used with no pattern specified
       before a pattern has been specified the value zero will be
       used.


AUTHOR

       Original author:
            Andreas Pleschutznig
            Teichhofweg 2
            8044 Graz
            Austria
       Contributions by:
               maart@cs.vu.nl
       v1.2 features added by:
            Bill Davidsen, Box 8 KW-C206, Schenectady NY 12345

       Comments and bug reports to:
            andy@mssx (mcvax!tuvie!mssx!andy)
       Bugs in features documented as being added in v1.2 to
            davidsen@crdos1.uucp     (uunet!crd.ge.com!davidsen)
Hurricane Electric Internet Services: Accounts starting at $9.95/month
Hurricane Electric Internet Services
Copyright (C) 1998 Hurricane Electric. All Rights Reserved.