Package: memorpy3
memorpy3Python 3 port of memorypy library using ctypes to search/edit windows programs memory.installpip install memorpy3usage examples :In this example open a notepad.exe and type in some text we will edit from memory !>>>frommemorpy3.MemWorkerimportMemWorker>>>mw=MemWorker(pid=3856)#you can also select a process by its name with the kwarg name=>>>l=[xforxinmw.umem_search("hello")]>>>l[('',<Addr:0x003287B0>)]>>>a=l[0][1]>>>a<Addr:0x003287B0>>>>a+4<Addr:0x003287B4>>>>printa<Addr:0x003287B0:"h\x00e\x00l\x00l\x00o\x00\x00t\x00h\x00i\x00s\x00\x00i\x00s\x00\x00a\x00\x00m\x00e\x00s\x00s\x00a\x00g\x00e\x00\x00I\x00"(bytes)>>>>a.dump()00328790:4600720061006E006300650029000000F.r.a.n.c.e.)...003287A0:0000000000000000F38F570C7F6A0010..........W..j..003287B0:63006F00750063006F00750020007400c.o.u.c.o.u..t.003287C0:68006900730020006900730020006100h.i.s..i.s..a.003287D0:20006D00650073007300610067006500.m.e.s.s.a.g.e.003287E0:20004900200074007900700065006400.I..t.y.p.e.d.003287F0:200069006E0020006E006F0074006500.i.n..n.o.t.e.00328800:7000610064002E006500780065002000p.a.d...e.x.e..00328810:21000000000000000000000000000000!...............00328820:00000000000000000000000000000000................00328830:0000000004002700F78F742B6A6A0000......'...t+jj..00328840:307A3200C08B320000000000000000000z2...2.........00328850:01000100010100000000000000000000................00328860:00000000000000000000000000000000................00328870:00000000000000000000000000000000................00328880:00000000000000000000000000000000................00328890:00000000000000000000000000000000................003288A0:01000001000001000000000100000000................003288B0:07000007596A0000B8793200E8353200....Yj...y2..52.003288C0:50549DEDE6EB55428289F8A31E687228PT....UB.....hr(003288D0:030000037F6A0000C08B3200E8353200.....j....2..52.003288E0:AABA439F5C808F67E28F753F6E6A000C..C.\..g..u?nj..003288F0:F0FE300070FE3000F0FD30001D17ED00..0.p.0...0.....00328900:B68F756B7B6A00080000000000000000..uk{j..........00328910:11100A610000000000000000A0000000...a............00328920:0D000000000000000000000000000000................00328930:00008041000080410000803D0000803D...A...A...=...=00328940:0000D000000030001EFF201F00000000......0........00328950:71800E00300030003000300030003000q...0.0.0.0.0.0.00328960:300030003000300030003000300030000.0.0.0.0.0.0.0.00328970:300030003000300030003000300030000.0.0.0.0.0.0.0.00328980:300030003000300030003000300030000.0.0.0.0.0.0.0.>>>a.read(100).decode("utf-16-le")u'hello this is a message I typed in notepad.exe !\x00\x00'>>>a.write("pwned".encode("utf-16-le"))1>>>a.read(100).decode("utf-16-le")u'pwned this is a message I typed in notepad.exe !\x00\x00'Look back at your notepad and the text should be changed ! :)
A quicker way to do this could be :>>>mw.umem_replace("hello","pwned")Some other interesting features like searching for different values types in memory and monitor their changes are also implemented through the Locator class. For example if you are looking to cheat in a game and you start with 200 ammo, you could do something like :>>>lo=Locator(mw)>>>lo.feed(200)...<Addr:0x0018FDE2>,<Addr:0x0018FDE4>,<Addr:0x0018FDE6>,...]}Use some ammo and "refeed" the locator (do this a couple of times until there is one result left)>>>lo.feed(199){'double':[],'float':[],'int':[<Addr:0x0019FAF0>],'long':[],'short':[],'uint':[],'ulong':[],'ushort':[]}>>>a=_["int"][0]>>>a.read()199>>>a.write(999999)1Cutting a release$pipinstall-rrequirements-dev.txt
$bumpversionmajor|minor|patch
$pythonsetup.pysdist
$twineuploaddist/*