问题描述
我做了同样的事情,我有1个应用程序A,每7秒打印一个衬垫,另一个代码具有另一个打印,injection.o的功能。当我到达打开我的目标文件injection.o的步骤并尝试将其映射到内存中时,我得到了几个错误。
当我第一次打开时(injection.o,2)它总是返回-1。然后我做了调用open(injection.o,O_RDWR)。然后它返回一个fd = 3.
然后当我做mmap(1,2504,1 | 2 | 4,1,3,0)时,2504是我的对象文件大小,它再次只返回-1。
我不知道该怎么做。任何人都可以帮助我吗?
Br
Hung
I have done the same thing I have 1 application A that just prints a one liner each 7 seconds and another code that has a function with another print, injection.o. When I get to the step to open my object file injection.o and trying to map it in the memory I get several errors.
When I first do "call open("injection.o", 2)" it always return -1. I then did "call open("injection.o", "O_RDWR")". Then it returned a fd = 3.
When I then do mmap(1, 2504, 1|2|4, 1, 3, 0), 2504 is my objects file size, it again only returned -1.
I have no clue on what to do. Can anyone help me?
Br
Hung
推荐答案
这篇关于我按照“代码注入运行Linux应用程序”中的步骤进行操作。但它失败了,我无法解决它!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!