srounet / Pymem

A python library for windows, providing the needed functions to start working on your own with memory editing.
MIT License
303 stars 45 forks source link

Added the ability to scan an open process' raw hexidecimal #95

Closed ThomasJRyan closed 4 months ago

ThomasJRyan commented 1 year ago

When using the pattern_scan_all method I found it was searching through the actual ASCII values rather than the raw hexidecimal which wasn't super useful to me. I added it in for my own purposes and figured it could be useful to others.

StarrFox commented 1 year ago

doesn't this just remove the need to prefix hex data with \x? i.e. b"FFFFFFFF" vs b"\xFF\xFF\xFF\xFF"

ThomasJRyan commented 1 year ago

Probably. Didn't even consider that that was an option. Makes it a bit of a pain if you're copying a long hexadecimal string from somewhere though. My own project has me copying a minimum of 32 bytes to search for and adding \x in front of each doesn't sound fun.

Up to you to decide if this is useful or not. It's enough for my own purposes

StarrFox commented 4 months ago

I don't think this is needed since you can just do bytes.fromhex