Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lot of issues #10

Closed
berdt opened this issue May 22, 2017 · 3 comments
Closed

A lot of issues #10

berdt opened this issue May 22, 2017 · 3 comments

Comments

@berdt
Copy link

berdt commented May 22, 2017

So with what python version is this supposed to work? Python3 it doesn't work. Python 2.7.13 on W10 64 bit latest updates there are errors in just the few methods I tried. Mem_replace and umem_replace gives errors:

from memorpy import *
mw=MemWorker(name='notepad++.exe')
mw.mem_replace("lets replace this","pwned")

Traceback (most recent call last):
  File "C:/Users/user/PycharmProjects/memorri/main.py", line 3, in <module>
    mw.mem_replace("lets replace this","pwned")
  File "C:\Users\user\PycharmProjects\memorri\memorpy\MemWorker.py", line 62, in mem_replace
    if self.process.write_bytes(start_offset, replace) == 1:
  File "C:\Users\user\PycharmProjects\memorri\memorpy\WinProcess.py", line 210, in write_bytes
    address = int(address)
TypeError: int() argument must be a string or a number, not 'tuple'

Furthermore somehow it cant find the pid from notepad.exe. Getting a handle works if passing the pid but then the rest of the example with replacing a string does not even work...

from memorpy import *
mw=MemWorker(name='notepad.exe')

Traceback (most recent call last):
  File "C:/Users/user/PycharmProjects/memorri/main.py", line 2, in <module>
    mw=MemWorker(name='notepad.exe')
  File "C:\Users\user\PycharmProjects\memorri\memorpy\MemWorker.py", line 34, in __init__
    self.process = Process.Process(name=name, pid=pid, debug=debug)
  File "C:\Users\user\PycharmProjects\memorri\memorpy\WinProcess.py", line 44, in __init__
    self._open_from_name(name, debug=debug)
  File "C:\Users\user\PycharmProjects\memorri\memorpy\WinProcess.py", line 149, in _open_from_name
    raise ProcessException("can't get pid from name %s" % processName)
memorpy.BaseProcess.ProcessException: can't get pid from name notepad.exe

After this I quit with the module, seemed like an awesome thing to use though.

n1nj4sec added a commit that referenced this issue May 23, 2017
@n1nj4sec
Copy link
Owner

The first issue is fixed.
The second issue is because you used a python 32bit to open a 64bit notepad.exe. I won't fix this because even if I fix the process list, you would encounter other issues later by trying to access 64 bit address space from a 32 bit process. The best thing to do is to use a python 64 bit and you will be able to read/write memory of both 32 and 64 bit processes

@berdt
Copy link
Author

berdt commented May 24, 2017

Thanks for the info I will give it another try!

@Zayoe4
Copy link

Zayoe4 commented May 7, 2020

@berdt did you ever solve the problem?

n1nj4sec added a commit that referenced this issue Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants