|
[注意]《加密与解密(第三版)》勘误(2009.9.9更新)
P223 (2011年2月第7次印刷的那本) 表9-2 MetaData Root 结构与说明 中偏移为12处的名称iVersionString应改为iVersionLength P512 添加了一个块头后,就要修正PE头6Ch偏移处NumberOfSections的值 中的6Ch应改为C6h |
|
怎样修改linux程序里的代码的跳转?
一旦使用 GDB 挂上被调试程序,当程序运行起来后,你可以根据自己的调试思路来动态地在 GDB 中更改当前被调试程序的运行线路或是其变量的值,这个强大的功能能够让你更好的调试你的程序,比如,你可以在程序的一次运行中走遍程序的所有分支。 一、修改变量值 修改被调试程序运行时的变量值,在 GDB 中很容易实现,使用 GDB 的 print 命令即可完成。如: (gdb) print x=4 x=4 这个表达式是 C/C++ 的语法,意为把变量 x 的值修改为 4 ,如果你当前调试的语言是 Pascal ,那么你可以使用 Pascal 的语法: x:=4 。 在某些时候,很有可能你的变量和 GDB 中的参数冲突,如: (gdb) whatis width type = double (gdb) p width $4 = 13 (gdb) set width=47 Invalid syntax in expression. 因为, set width 是 GDB 的命令,所以,出现了 “ Invalid syntax in expression ” 的设置错误,此时,你可以使用 set var 命令来告诉 GDB , width 不是你 GDB 的参数,而是程序的变量名,如: (gdb) set var width=47 另外,还可能有些情况, GDB 并不报告这种错误,所以保险起见,在你改变程序变量取值时,最好都使用 set var 格式的 GDB 命令。 二、跳转执行 一般来说,被调试程序会按照程序代码的运行顺序依次执行。 GDB 提供了乱序执行的功能,也就是说, GDB 可以修改程序的执行顺序,可以让程序执行随意跳跃。这个功能可以由 GDB 的 jump 命令来完: jump <linespec> 指定下一条语句的运行点。 <linespce> 可以是文件的行号,可以是 file:line 格式,可以是 +num 这种偏移量格式。表式着下一条运行语句从哪里开始。 jump <address> 这里的 <address> 是代码行的内存地址。 注意, jump 命令不会改变当前的程序栈中的内容,所以,当你从一个函数跳到另一个函数时,当函数运行完返回时进行弹栈操作时必然会发生错误,可能结果还是非常奇怪的,甚至于产生程序 Core Dump 。所以最好是同一个函数中进行跳转。 熟悉汇编的人都知道,程序运行时,有一个寄存器用于保存当前代码所在的内存地址。所以, jump 命令也就是改变了这个寄存器中的值。于是,你可以使用 “ set $pc ” 来更改跳转执行的地址。如: set $pc = 0x485 http://blog.csdn.net/lipengbo10054444/article/details/5835748 |
|
|
|
请推荐本反汇编代码分析的书!
总感觉黑码 解包器 打包器之类的看着不爽 呵呵 |
|
|
|
|
|
[原创]C++虚函数ppt
支持lz 期待后续作品 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值