Help me with this!!!

TOXiC GatlingGun at gmail.com
Thu Feb 1 08:46:36 EST 2007


Peter Otten ha scritto:

> TOXiC wrote:
>
> > Hi all, I've this code:
>
> No you don't.
>

!????????

> >     regex = re.compile(r"(?si)(\x8B\xF0\x85\xF6)(?P<contents>.*)
> > (\xC6\x44\x24)",re.IGNORECASE)
> >     file = open(fileName, "rb")
> >     for line in file:
> >           if (match):
> >               print line
> >     file.close()
> >
> > It search a text inside that hex value.
> > It works perfecly on a txt file but if I open a binary file (.exe,.bin
> > ecc...) with the same value it wont work, why?
> > Please help!
>
> Because the pattern isn't in the file, perhaps.
>

This pattern IS in the file (I made it and I double check with an hex
editor).
It display the file correcltly (print line) but...




More information about the Python-list mailing list