编辑此处数据
od在调试的时候,需要输入BIN码,但是我只能一次输入100个,请问怎么解除这个限制!感谢大神https://img.alicdn.com/imgextra/i4/3469388708/O1CN01ZUu4t32ECJgercZKs_!!3469388708.jpg 自己写一个程序,打开目标进程,然后写你想写的数据
像下面这样
main.c
#include <stdio.h>
#include <unistd.h>
int main(void) {
int buff = {1, 2, 3, 4, 5};
printf("%d\n", getpid());
printf("%p\n", buff);
getchar();
for(size_t i = 0; i < 5; ++i) {
printf("%d ", buff);
}
puts("");
return 0;
}
set.c
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/limits.h>
int main(void) {
printf("请输入目标进程的pid: ");
pid_t pid; scanf("%d", &pid);
printf("请输入目标地址: ");
void *addr; scanf("%p", &addr);
char path;
snprintf(path, PATH_MAX, "/proc/%d/mem", pid);
int fd = open(path, O_RDWR);
{
int buff = {10, 11, 12, 13, 14};
lseek(fd, (off_t)addr, SEEK_SET);
write(fd, buff, sizeof(buff));
}
close(fd);
return 0;
}
windows 也一样
https://www.baidu.com/baidu?tn=monline_4_dg&ie=utf-8&wd=openprocess
https://docs.microsoft.com/zh-cn/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess?redirectedfrom=MSDN
https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory
https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory
别忘了这个
https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-closehandle
看不懂 不知道是什么意思哦!可以私信我留个联系方法,有偿
页:
[1]