|
c++语法问题咯
以前的写法是 unsigned char 接受包 [ ] = { 0xFD , 0xFF , 0xB0 , 0x37 , 0xF5 , 0x00 , 0x00 , 0x09 , 0x10 , 0x03 , 0x4E , 0x9D }; unsigned char 发送包 [ ] = { 0xFD , 0xFF , 0xD3 , 0x96 , 0x29 , 0x00 , 0x05 , 0x06 , 0x19 , 0xF6 , 0x01 , 0xAC , 0xAC }; struct { int 凑数; int 凑数2; int 凑数3; int 凑数4 [ 0x5A1 ]; int 凑数5; int 凑数61; int 凑数62; int 凑数6; int 凑数63; int 凑数64; int 凑数7; }student1 = {省略}; student1.凑数5 = ( int ) &发送包; student1.凑数6 = ( int ) &接受包; int a = &student1.凑数1; // 这里,[a+8] 寻址到的变量就是 student1.凑数3 //作为参数传进如下函数 sub_68CBE0 ( int(a), ( int ) &_7D0000 [ 0x1B9C ] , ( int ) &_7D0000 [ 0x201C ] ); //但是函数里面需要读[a+5778],发现5778不是4的倍数,student1里面都是int类型 ------------------------------------------------------------------------------------------------------- 第二种 //如下就OK了, 把a定义成了数组. unsigned char a[ ] = { 0x94 , 0x9E , 0x18 , 0x00, 0x9E , 0x18 , 0x00, 0x9E , 0x18 , 0x00,......(太长,省略,有6000个数据)}; int *z = (int *)&接受包; memcpy ( &a[ 8 ] , &z , 4 );//覆盖[a+8] int *z2 = ( int * ) &发送包; memcpy ( &a[ 5778 ] , &z2 , 4 );//覆盖[a+5778],其实不止8和5778,还有好几个 //作为参数传进如下函数 sub_68CBE0 ( int(a), ( int ) &_7D0000 [ 0x1B9C ] , ( int ) &_7D0000 [ 0x201C ] ); 第二种,我定义成数组解决了,函数调用也正常, 感觉第一种其实也OK,定义结构体,得凑多少数啊,头晕了, 我的Q 11689421 |
|
c++语法问题咯
[QUOTE=character;1458666]这种内存相关的你需要反汇编看编译器怎么分配内存的,在函数中的局部变量可能被编译器打乱了,所以你这里的[eax+8] 是一个不确定的位置,下面是我的一个思路。 假设申请变量的时候,编译器按照内存地址从低到高的顺序分配变量(具体顺序我忘记了)。 int x, y, z; // 假设这里 x 的地址是...[/QUOTE] 接下来又遇到问题了,用了你的定义,然后a作为参数传给函数,一切看上去都没问题,结果,函数里面会出现一个代码, 读取地址 a+0x12的值,然后秀逗了, 因为 a的内存段都是存的都是变量的地址,都是4字节4字节,a+0x12, 0x12不是4的倍数,然后第二点,要是我定义了一个新数据,又会往a的内存段写入一个新值,又会和函数代码冲突了! 不知道我说明白问题没有.. |
|
怎么修改WSASend的封包长度,而不让程序卡死?
扯远了,不是游戏,没有心跳包,并且还是明文包, 我测试了下,改第一个包的长度没问题,改第二个包WSASend的长度,也没问题, 服务器也会返回,只是可能返回的数据不是程序想要的数据,或者WSARecv接受的长度不对,反正问题应该在WSARecv上,会调用WSAGetLastError,然后返回997错误,查了百度百科, 997 - WSA_IO_PENDING 重叠操作将在以后完成。用Winsock函数发出一次重叠I/O操作时,若出现这样的Win32错误,便表明操作尚未完成,而且会在以后的某个时间完成。 如果是不修改长度的版本,就不会调用WSAGetLastError了, 哎,还是看不懂这个错误啥意思 |
|
怎么修改WSASend的封包长度,而不让程序卡死?
我修改了他的长度和内容,然后在WPE里面看了服务器返回的包,返回的包正常了,但是程序却卡死了. 直接修改他的长度和内容,与自己组装的包有区别吗?其他的参数需要动? |
|
c++语法问题咯
[QUOTE=character;1458666]这种内存相关的你需要反汇编看编译器怎么分配内存的,在函数中的局部变量可能被编译器打乱了,所以你这里的[eax+8] 是一个不确定的位置,下面是我的一个思路。 假设申请变量的时候,编译器按照内存地址从低到高的顺序分配变量(具体顺序我忘记了)。 int x, y, z; // 假设这里 x 的地址是...[/QUOTE] 谢谢,完美解决 |
|
怎么让ida的F5代码和汇编代码显示在一起
是的 谢谢了! |
|
|
|
怎么让ida的F5代码和汇编代码显示在一起
不是切换,是显示在一起, 我偶尔快捷键弄出来了,就是一行汇编,一行伪代码.现在怎么也弄不出,不好截图看啊, 就是一行汇编,一行伪代码,弄出来的人应该知道 |
|
可以把其他exe程序代码片段加载到我的程序内存中吗?
这个也行,反正无论a加载b,还是b加载a,最后总会融在一起 |
|
可以把其他exe程序代码片段加载到我的程序内存中吗?
跑起来就不是脱机挂了啊,他会运行很多七七八八的东西. |
|
可以把其他exe程序代码片段加载到我的程序内存中吗?
错误的问题先不管,意思是可以加载进来咯!可以略微说下怎么加载不?用LoadLibrary是不行的 |
|
可以把其他exe程序代码片段加载到我的程序内存中吗?
错误的问题先不管,意思是可以加载进来咯!可以略微说下怎么加载不?用LoadLibrary是不行的 |
|
为什么od 堆栈里面的地址前面有个小点,看图
换一种问法吧,什么样的C++语句,编译后能在OD反汇编的时候看到这些点点? 求例子 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值