|
[讨论]请大家帮我分析一下这段C code,菜鸟不是很清楚,谢谢!
int main() { char *p1="name"; char *p2; p2=(char *)malloc(20); memset(p2,0,20); int i=0; while(*p2++=*p1++) { //printf("%s\n",p2); 这句你看不到输出,是因为在while里指针已经执行了++操作,指针位移到下一个位置了,下一个位置值是0x00 printf("%s\n",p2-1); //这样就OK了,让指针重新指回被赋值的位置 } return 0; } 运行结果: root@angel-kali:~/test# g++ test.cpp -o test.exe test.cpp: In function ‘int main()’: test.cpp:16:12: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] char *p1="name"; ^ root@angel-kali:~/test# ./test.exe n a m e |
|
|
|
[招聘]重庆地区 Windows开发 逆向工程师
可惜我已转行~╮(╯▽╰)╭ |
|
|
|
|
|
这 么嚣张的电脑锁机敲诈软件,大神来分析下呗
OD载入 分析过程就不用发了吧~???? 简略修复如下: 禁用键盘: 0012FC90 00CA3FA0 ?? |Subkey = "SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}" 修复方式就很简单了: winpe进入,加载系统注册表配置单元,找到该项,删除UpperFilters,在重新建立多字节字符串项修改值为kbdclass 删除启动项 基本这个玩意基本给废了~~ 另外还映像劫持taskmgr.exe任务管理器,其他乱七八糟的东西 挺逗比的一个程序,里面修改注册表时还有个bug,呵呵~!!! |
|
在C++中cout使用了DEC没效果
在输出上一句cout.unsetf(ios::hex); 也行 |
|
在C++中cout使用了DEC没效果
cout<<setbase(10)<<b<<endl; |
|
|
|
|
|
|
|
[原创]河蟹2
坐等。。。。 |
|
[原创]VS以Debug模式编译程序,printf会抛出异常
try...catch只能接住SEH的异常 |
|
[求助]visual assist x导致Visual Studio 2010不能多开的问题。
新的是有问题·~~~我上次用新的VX 敲代码·~VS的CPU直接飙到90几 换了个旧的版本·~解决·!╮(╯▽╰)╭ |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值