|
[原创]破解UPolyX 0.51壳
呃。。果然很菜!!! |
|
对信息安全等问题的强烈意见
太火星了。。。 |
|
[求助]关于用 _try _except( ) 捕捉异常
结构化异常处理(Structured Exception Handling,简称SEH)是微软针对Windows程序异常处理进行的扩展,在Visual C++中,它同时支持C和C++语言。SEH不宜与标准C++异常处理和MFC异常处理混用,对于C++程序,微软建议使用标准C++的异常处理。 为了支持SEH,Visual C++中定义了四个关键字(由于这些关键字是非标准关键字,其它编译器不一定支持),用以扩展C 和C++语言: (1)__except (2)__finally (3)__leave (4)__try 其基本语法为: __try { ...//可能导致异常的被监控代码块 } __except(filter-expression) { ...//异常处理函数 } 或: __try { ... } __finally { ...//终止 } 其执行的步骤如下: (1)__try块被执行; (2)如果__try块没有出现异常,则执行到__except块之后;否则,执行到__except块,根据filter-expression的值决定异常处理方法: a. filter-expression的值为EXCEPTION_CONTINUE_EXECUTION (-1) 恢复异常,从发生异常处下面开始执行,异常处理函数本身不被执行; b. filter-expression的值为EXCEPTION_CONTINUE_SEARCH (0) 异常不被识别,拒绝捕获异常,继续搜索下一个异常处理函数; c. filter-expression的值为EXCEPTION_EXECUTE_HANDLER (1) 异常被识别,终止异常,从异常发生处开始退栈,一路上遇到的终止函数都被执行。 看看这个例子: //例4-1 #include "stdio.h" void main() { int* p = NULL; // 定义一个空指针 puts("SEH begin"); __try { puts("in try"); __try { puts("in try"); *p = 0; // 引发一个内存访问异常 } __finally { puts("in finally"); } } __except(puts("in filter"), 1) { puts("in except"); } puts("SEH end"); } 程序的输出为: SEH begin in try //执行__try块 in try //执行嵌入的__try块 in filter //执行filter-expression,返回EXCEPTION_EXECUTE_HANDLER in finally //展开嵌入的__finally in except //执行对应的__except块 SEH end //处理完毕 如果我们把__except(puts("in filter"), 1)改为__except(puts("in filter"), 0),程序的输出将变为: SEH begin in try //执行__try块 in try //执行嵌入的__try块 in filter //执行filter-expression,返回EXCEPTION_CONTINUE_SEARCH in finally //展开嵌入的__finally 程序的执行也告崩溃,弹出如图3所示的对话框。 图3 不能被正确执行的SEH 要想这个程序能正确地执行,我们可以在第一个__try块的外面再套一个__try块和一个接收filter-expression返回值为EXCEPTION_EXECUTE_HANDLER的__except块,程序改为: //例4-2 #include "stdio.h" void main() { int* p = NULL; // 定义一个空指针 puts("SEH begin"); __try { __try { puts("in try"); __try { puts("in try"); *p = 0; // 引发一个内存访问异常 } __finally { puts("in finally"); } } __except(puts("in filter"), 0) { puts("in except"); } } __except(puts("in filter"), 1) { puts("in except"); } puts("SEH end"); } 程序输出: SEH begin in try //执行__try块 in try //执行嵌入的__try块 in filter1 //执行filter-expression,返回EXCEPTION_CONTINUE_SEARCH in filter2 //执行filter-expression,返回EXCEPTION_EXECUTE_HANDLER in finally //展开嵌入的__finally in except2 //执行对应的__except块 SEH end //处理完毕 由此可以看出,因为第一个__except的filter-expression返回EXCEPTION_CONTINUE_SEARCH 的原因,"in except1"没有被输出。程序之所以没有崩溃,是因为最终碰到了接收EXCEPTION_EXECUTE_HANDLER的第2个__except。 SEH使用复杂的地方在于较难控制异常处理的流动方向,弄不好程序就"挂"了。如果把例4-1中的__except(puts("in filter"), 1)改为__except(puts("in filter"), -1),程序会进入一个死循环,输出: SEH begin in try //执行__try块 in try //执行嵌入的__try块 in filter //执行filter-expression,返回EXCEPTION_CONTINUE_EXECUTION in filter in filter in filter in filter …//疯狂输出"in filter" 最后疯狂地输出"in filter",我们把断点设置在__except(puts("in filter"), -1)语句之前,按F5会不断进入此断点。 摘自:http://dev.yesky.com/115/2158115_4.shtml |
|
[求助]关于软件自身加密
看算法撒。。。。 |
|
[求助]本人求师傅一名
纯粹无聊贴。。。 |
|
|
|
[求助]我想用程序定位一个Call的首地址不知道怎么做 请教了
我也没有看明白。。。 |
|
[求助]请问ida是否支持多用户?
没明白啥意思。。。 |
|
[求助]源代码
只有书,没有看到光盘。。。 |
|
[求助]请问Windows XP下面能用softice调试吗?
xp下可以用SOFTICE 不过如果你电脑是双核的话需要改成单核的才能用SOFTICE 还有但是 如果你CUP是AMD双核的。。那你还是放弃用SOFTICE好了。。 我把自己修改的BOOT.INI发出来, [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /execute /fastdetect /numproc=1 /noguiboo /noguiboo /noguiboo /noguiboo /noguiboo 照着上面的把BOOT.INI改成上面的形式,就可以用SOFTICE咯。。。 |
|
|
|
|
|
|
|
[讨论]看雪09精华集去哪了
上班这一天其实很短暂,电脑一开一关,一天过去了,电脑一关不开,合同到期了 |
|
|
|
[讨论]跟踪一个程序还真是累啊!
同感。。。呃。。 |
|
|
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值