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

ctypes.ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert #4

Open
9DemonFox opened this issue Mar 1, 2021 · 9 comments

Comments

@9DemonFox
Copy link

psutil.Process(pid=4908, name='WeChat.exe', status='running', started='09:22:49')
  File "D:/VUE/wechat-pc-hook-python/python_hook.py", line 42, in <module>
454
    c_remt = kernel32.CreateRemoteThread(h_process, None, 0, h_loadlib, arg_adress, 0, byref(thread_id))
590000
ctypes.ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert

h_loadlib太大了,我调试为140721839729584

@holdyeah
Copy link
Owner

holdyeah commented Mar 2, 2021

可能是我的参数没有初始化导致的

@longxiaokong
Copy link

请问现在该怎么做呢?我用c_int函数强制转换h_loadlib结果微信崩溃了

@holdyeah
Copy link
Owner

难道现在做呢?我用c_int函数强制转换h_loadlib结果微信崩溃了

会不会是python的问题,我用32位没有这个问题

@longxiaokong
Copy link

大大我的锅我的锅,path配错了导致python优先级挂了[捂脸]
真的很感谢您!

@holdyeah
Copy link
Owner

大大我的锅我的锅,path配错了导致python优先级挂了[捂脸]
真的很感谢您!

嗯嗯,找到问题了就好

@guoqianyou
Copy link

同样的问题. 获取到的h_loadlib 太大了

@holdyeah
Copy link
Owner

holdyeah commented Jul 3, 2021

同样的问题. 获取到的h_loadlib 太大了

会不会有什么地方配置出问题了

@chenlei9907
Copy link

我的问题同样,h_hoadlib 是 140709872403696。 如果类型强制转换 wx就直接崩溃 。 目前还没有找到解决方案。
不太理解Kernel32 调 LoadLibaryA 返回的地址为啥这么高? 难道我机器内存太大?我的64G memory。

@guoqianyou
Copy link

是python 的问题. 用32 位python 解决. 可能是 用64位的python 操作 32位的程序造成的

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

5 participants