0
my_address = re.search(rb'\x80\xC9.{4}\x94\x12\x8A\x41\x08', bytes).start() + 5

Read the doc but I'm a bit confused.

My guess is

\x80\xC9\BYTE\BYTE\BYTE\BYTE\BYTE\x94\x12\x8A\x41\x08\BYTE\BYTE\BYTE\BYTE\BYTE\my_address\

Thanks

  • Where did you conjure up the end of that? It simpdy matches `\x80\xC9\BYTE\BYTE\BYTE\BYTE\x94\x12\x8A\x41\x08` if by `\BYTE` you mean one arbitrary byte (other than newline). – tripleee Jan 12 '21 at 17:26
  • 1
    Looks for `\x80\xC9` followed by any 4 unspecified bytes followed by `\x94\x12\x8A\x41\x08` and returns the offset of the last of the 4 unspecified bytes. It may then (who knows?) use the value of that byte as an offset to find string data elsewhere. – BoarGules Jan 12 '21 at 17:39
  • yeah arbitrary bytes. thanks, the end is the .start() + 5, what is it doing? – joshgallantt Jan 12 '21 at 17:39
  • oh okay, I think its giving me `\x80\xC9\BYTE\BYTE\my_address\x94\x12\x8A\x41\x08` – joshgallantt Jan 12 '21 at 17:44
  • What do you mean by including ``my_adress`` in your guess? – MisterMiyagi Jan 12 '21 at 17:47

0 Answers0