资源简介
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表结构,(有五金厂,文具厂,电子厂)
相关资源
- WindowsLoader.exe.zip
- gcr1218_9916885.pdf
- 网络硬盘网站.7z
- IDM套装.zip
- WindowsFormsApplication1.rar
- 微擎首页模版,首页PC应用模块官网代
- RoutingTCPIPVolume12ndEdition(2005).chm
- GBT222392008.rar
- ProbabilisticRobotics.pdf
- foresightyj_7504901.zip
- 02、网络监听及防御技术.pdf
- 2hndve.rar
- PR2017破解补丁.zip
- 旧版知网语料库.rar
- qdraw.zip
- 3fga33.rar
- 渗透测试.pdf
- 《信息与文献参考文献著录规则》带
- 反保密检查.zip
- MSP430中文用户指南.pdf
- 图片相册.rar
- OFDM.rar
- DevOps的概念.pptx
- falseen_10599498.zip
- 微擎-万能表单6.5dayu_form(修复无法上
- iKuai-H1AP_For_AR9341.zip
- 《Abaqus经典例题集III》的inp文件.rar
- IDA_Pro权威指南第2版.epub
- MyEclipse2018.12.0破解文件.zip
- 图像定位软件.rar
评论
共有 条评论