资源简介
IDAPro权威指南全实例代码.zip

代码片段和文件信息
/*
Source for ida_patcher
Copyright (c) 2006 Chris Eagle cseagle at gmail.com
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License or (at your option)
any later version.
This program is distributed in the hope that it will be useful but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not write to the Free Software Foundation Inc. 59 Temple
Place Suite 330 Boston MA 02111-1307 USA
*/
/*
* This program reads an Ida Pro generated .dif file and applies
* the differences to the original binary to create a patched binary
* The program will infer the name of the binary from the content of
* the dif file or take the name as a command line option.
* CAUTION: The program transforms the input binary so if you wish
* to preserve the original binary make sure you make a copy and
* transform the copy.
*/
#include
int main(int argc char **argv) {
char line[256];
FILE *patch = stdin;
FILE *input = NULL;
unsigned int offset;
int orig;
int newval;
int i;
for (i = 1; i < argc; i += 2) {
if (!strcmp(argv[i] “-p“)) {
if ((i + 1) < argc) {
FILE *f = fopen(argv[i+1] “r“);
if (f) {
patch = f;
}
else {
fprintf(stderr “Failed to open patch file %s\n“ argv[i+1]);
exit(0);
}
}
}
else if (!strcmp(argv[i] “-i“)) {
if ((i + 1) < argc) {
fprintf(stderr “Opening %s\n“ argv[i+1]);
input = fopen(argv[i+1] “rb+“);
if (input == NULL) {
fprintf(stderr “Failed to open input file %s\n“ argv[i+1]);
exit(0);
}
}
}
else {
fprintf(stderr “usage:\n\t%s [-i ] [-p ]\n“ argv[0]);
fprintf(stderr “\t%s [-p ]\n“ argv[0]);
fprintf(stderr “\t%s [-i ] < \n“ argv[0]);
fprintf(stderr “\t%s < \n“ argv[0]);
exit(0);
}
}
if (patch == stdin) {
fprintf(stderr “Reading patch data from stdin.\n“);
}
fgets(line sizeof(line) patch); /* eat dif file intro line */
fgets(line sizeof(line) patch); /* eat blank line */
if (input == NULL) {
fprintf(stderr “Inferring input file name from patch file data.\n“);
fscanf(patch “%256s“ line);
input = fopen(line “rb+“);
if (input == NULL) {
fprintf(stderr “Failed to open input file %s\n“ line);
exit(0);
}
}
else { /* don‘t need input file name but
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-06-27 05:06 the_idapro_book_code-master\
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch1\
文件 47616 2017-06-27 05:06 the_idapro_book_code-master\code\ch1\listing_1-1_and_1-2.exe
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch14\
文件 3436 2017-06-27 05:06 the_idapro_book_code-master\code\ch14\ida_patcher.c
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\
文件 1532 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_1.idc.txt
文件 1310 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_2.idc.txt
文件 1483 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_3.idc.txt
文件 1413 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_4.idc.txt
文件 1558 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_5.idc.txt
文件 1811 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_6.idc.txt
文件 4479 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_6_extended.idc.txt
文件 1038 2017-06-27 05:06 the_idapro_book_code-master\code\ch15\listing_15_7.idc.txt
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch17\
文件 2537 2017-06-27 05:06 the_idapro_book_code-master\code\ch17\Listing_17_1.txt
文件 2418 2017-06-27 05:06 the_idapro_book_code-master\code\ch17\Listing_17_2.txt
文件 3321 2017-06-27 05:06 the_idapro_book_code-master\code\ch17\Listing_17_3.txt
文件 5630 2017-06-27 05:06 the_idapro_book_code-master\code\ch17\ask_using_form.cpp
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\pcap\
文件 1173 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\pcap\Makefile
文件 7775 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\pcap\pcap_loader.cpp
文件 2125 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\pcap\pcap_loader.h
目录 0 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\simpleton\
文件 1163 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\simpleton\Makefile
文件 626 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\simpleton\simpleton.asm
文件 109 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\simpleton\simpleton.bin
文件 4998 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\simpleton\simpleton.cpp
文件 790 2017-06-27 05:06 the_idapro_book_code-master\code\ch18\simpleton\simpleton.idc
............此处省略86个文件信息
- 上一篇:在线考试系统三层架构
- 下一篇:bom表结构,(有五金厂,文具厂,电子厂)
相关资源
- PID_AutoTune_v0.rar
- vspd7.2.308.zip
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
评论
共有 条评论