Pymem icon indicating copy to clipboard operation
Pymem copied to clipboard

Added the ability to scan an open process' raw hexidecimal

Open ThomasJRyan opened this issue 2 years ago • 2 comments

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.

ThomasJRyan avatar Nov 03 '22 03:11 ThomasJRyan

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

StarrFox avatar Nov 03 '22 03:11 StarrFox

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

ThomasJRyan avatar Nov 03 '22 13:11 ThomasJRyan

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

StarrFox avatar Feb 08 '24 20:02 StarrFox