[ale] Binary Matching
Fletch
fletch at phydeaux.org
Tue Jun 7 12:14:43 EDT 2005
>>>>> "Geoffrey" == Geoffrey <esoteric at 3times25.net> writes:
Geoffrey> Michael Hirsch wrote:
>> dd if=filename bs=1 count=200 skip=25 will output the 200 bytes
>> starting at byte 26, I believe. Capture that output and feed
>> it to grep.
Geoffrey> I don't know, the problem with this is there could be
Geoffrey> some unusual characters in that data, newlines, quotes
Geoffrey> and such that would likely confuse grep.
Yeah, you'd want fgrep so that it doesn't interpret anything as a
meta character, but that's also going to encounter problems if there's
any NULs in your search string.
But yeah this is something that'd be fairly easy in perl. I think I
even had a golf'd obfuscated one lying around somewhere, but I can't
find it at the moment. You can find something that might be helpful
at perlmonks here:
http://perlmonks.org/index.pl?node_id=319874
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org| Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U
More information about the Ale
mailing list