In message <[EMAIL PROTECTED]>, Luigi Rizzo writes:
>On Sat, Jul 13, 2002 at 09:16:28PM +0100, David Malone wrote:
>> On Sat, Jul 13, 2002 at 12:53:21PM -0700, Luigi Rizzo wrote:
>> > So, does anyone know how to use the basic unix tools to find
>> > the offset of a string in a binary file ?
>> > Specifically, I would like to locate the offset of the string
>> > 
>> >    "MFS Filesystem goes here"
>> 
>> Would grep -b do what you want?
>
>no, as i said in my email, it returns the offset of the "line",
>so after it finds the string it goes back to the first newline
>and returns the offset of the character after that. :(

Luigi, get in touch with W Gerald Hicks <[EMAIL PROTECTED]>,
he has patches which does this by objcopy'ing the binary file to
an elf-object and then linking that with the kernel.

This is far superior to "overwrite the binary kernel" approach.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to