Closed matslindh closed 2 years ago
@AlessandroZ If you have a patch I can apply I can make it part of the PR (.. or if you have commit access you can push it directly to my branch).
def char(byte):
if python_version == 2:
return byte
else:
return chr(byte)
Should be ok like that.
@AlessandroZ It'd be great if you could submit a patch with your discoveries; I don't have the time right now to hunt down each line based on your descriptions. If you're already modifying the code, clone the PR and include the patch here and I'll add it to the PR (if you don't have maintainer access - in that case you can push directly to my branch).
I did the change @AlessandroZ suggested from matslindh/memorpy, then I have the following error :
File "D:/test.py", line 64, in <module>
mw=MemWorker(pid=8808)
File "D:\Users\Miniconda3\lib\site-packages\memorpy-1.7-py3.6.egg\memorpy\MemWorker.py", line 35, in __init__
self.process = Process.Process(name=name, pid=pid, debug=debug)
AttributeError: type object 'WinProcess' has no attribute 'Process'
Can someone point me out to a fully functional Python 3 repo ?
Process.Process
isn't valid. It should be multiprocessing.Process
Ok I actually got it running. Thanks btw. But then I have another issue. When I write this code :
mw=MemWorker(pid=6008)
lo=Locator(mw)
lo.feed(4) #line where error is detected
The following error is returned :
File "D:\Users\Miniconda3\lib\site-packages\memorpy-1.7-py3.6.egg\memorpy\MemWorker.py", line 128, in parse_any_function
index = b.find(value)
TypeError: must be str, not bytes
any updates/fixes?
I'm guessing you're gonna have to get it further yourself; I currently have no interest in pursuing it further as our use case is currently inactive.
bummer, this would have been a great tool for analyzing malware
My comment was in relation to this specific PR - the library itself might be moving forward (although it seems rather abandoned based on when it was last updated).
This set of patches makes the basic functionality of memorpy work under python 3 on Windows. I've not tested it with python 2 - so there probably needs to be a few extra try/catch-es or a dependency on six.
As the platform I had this need on is Windows, I haven't tested the Linux (or other OS-es) compatibility either.
Consider this a starting PR that can be updated with other patches to make memorpy both 2 and 3 compliant.