在 WinDbg 脚本中使用参数
来源:互联网 发布:如何绘制网络计划图 编辑:程序博客网 时间:2024/06/04 13:13
WinDbg 6.7.5.0 版本运行脚本时多了一个新的命令 $$>a< ,可以给脚本传递参数。下面是一个简单的例子,演示了参数的用法。
$$
$$ calc v0.0.1
$$ by 2007.06.08
$$
.if(@@c++(${/d:$arg1} && ${/d:$arg2}))
{
.printf "/n%d + %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} + ${$arg2}
.printf "%d - %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} - ${$arg2}
.printf "%d * %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} * ${$arg2}
.printf "%d / %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} / ${$arg2}
}
.else
{
.printf "/nusage: $$>a< <path>/calc.txt arg1 arg2/n/n"
}
运行一下:
0:000>$$>a< d:/windbg/scripts/calc.txt @eax 4
1580724 + 4 = 1580728
1580724 - 4 = 1580720
1580724 * 4 = 6322896
1580724 / 4 = 395181
几个脚本
http://blogs.msdn.com/debuggingtoolbox/default.aspx
rootkit 的 blog
http://www.rootkit.com/blog.php?user=buri
$$
$$ calc v0.0.1
$$ by 2007.06.08
$$
.if(@@c++(${/d:$arg1} && ${/d:$arg2}))
{
.printf "/n%d + %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} + ${$arg2}
.printf "%d - %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} - ${$arg2}
.printf "%d * %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} * ${$arg2}
.printf "%d / %d = %d/n", ${$arg1}, ${$arg2}, ${$arg1} / ${$arg2}
}
.else
{
.printf "/nusage: $$>a< <path>/calc.txt arg1 arg2/n/n"
}
运行一下:
0:000>
1580724 + 4 = 1580728
1580724 - 4 = 1580720
1580724 * 4 = 6322896
1580724 / 4 = 395181
几个脚本
http://blogs.msdn.com/debuggingtoolbox/default.aspx
rootkit 的 blog
http://www.rootkit.com/blog.php?user=buri
- 在 WinDbg 脚本中使用参数
- 在 WinDbg 脚本中使用参数
- Windbg脚本的使用
- 在windbg中安装和使用mona
- 使用javascript在html中获取url参数的脚本
- 在shell脚本中使用getopts处理参数
- Windbg中查看函数参数
- 在WinDBG中, 使用.shell命令来搜索字符串
- 在WinDBG中, 使用.shell命令来搜索字符串
- 在Shell脚本中处理命令行参数
- 在脚本中使用sftp
- 在脚本中使用gdb
- windbg调试技巧 使用脚本文件
- 在参数中使用判断
- LR 脚本在init中参数化的问题
- LR 脚本在init中参数化的问题
- 在脚本中拼接带参数的方法
- 在JAVA代理中使用HTML脚本
- 利用COPY指令和rar把文件隐藏在图片里
- VC++的Unicode编程
- HubbleDotNet 和 Lucene.Net 匹配相关度的比较
- WINDBG 相关命令
- 用WinDBG远程调试程序
- 在 WinDbg 脚本中使用参数
- 城里城外看SSDT
- 备忘:fopen()和fclose()的用法
- source文件编写
- 【哈佛图书馆自习室墙上的训言(以此自勉)】Harvard Library study room wall VTC statement
- #pragma comment(linker,"/SECTION:shared,RWS")
- 在CDHTMLDialog中扩展浏览器脚本以及在HTML中增加MFC消息响应
- VC中句柄、指针、ID之间的转换
- 设置文本框某几行文字颜色(RichEdit控件的使用)