Help me with this!!!
Peter Otten
__peter__ at web.de
Thu Feb 1 07:52:15 EST 2007
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.
Peter
More information about the Python-list
mailing list