[ale] Binary Matching

Mister Anonymous atlantalinuxenthusiast at gmail.com
Mon Jun 6 13:53:51 EDT 2005


The problem about cmp is that it just does a strait compare.  I need
to find out whether a particular binary section has been embedded
anywhere in another particular binary.  I will have the offset from
the first binary to get the (binary) string that I am going to be
searching for, but I will not know where in the second binary that
(binary) string will be.

On 6/6/05, Geoffrey <esoteric at 3times25.net> wrote:
> Mister Anonymous wrote:
> > I need to do some binary matching across many files and was wanting to
> > get some recommendations on how to do it.  I would like to be able to
> > grab a section of binary data from one file (approximately 500
> > continuous bytes) and check and see if that is included in other
> > binary files.  Any recommendations on an easy way to extract the
> > initial 500 bytes (assume I would like to do it from some particular
> > offset in the file) and then search for that data in the other file?
> >
> > I am afraid that perl might be the best way to do this, but I am not
> > that much of a perl hacker.  If there is an easy way to do it using
> > python or a shell script, that would be preferable.
> 
> I'm pretty sure cmp handles binary files.  Are you simply looking for a
> match, or do you want to do something once you find the match?
> 
> --
> Until later, Geoffrey
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>



More information about the Ale mailing list