无忧启动论坛

标题: [求助] 求一个可以替换"二进制文件"的内容的程序 [打印本页]

作者: cjzzz    时间: 2006-11-10 04:30
标题: [求助] 求一个可以替换"二进制文件"的内容的程序
比如, 我要替换某文件 0x07 处内容, 将1改为0 ?       有这样的程序?
作者: 6618    时间: 2006-11-10 09:58
winhex就何以办到。
作者: cjzzz    时间: 2006-11-10 14:38
我要命令行工具, 用于自动化操作.   

我找到个方法以,  使用不方便, 不支持长文件名

debug 1.lnk < 1.txt


  1. n 1.lnk
  2. e 115
  3. 10
  4. w
  5. q
复制代码

作者: tintinbt    时间: 2006-12-13 00:51
我也找了很久,实在找不到,正准备自己用turbo C写一个.
功能预计如下:
binrep.exe /?
BinRep.exe  Binary file string replace program
Usage:
           BinRep.exe  <filename> <Position>  <length>  <string>
                <filename>:   The binary file.
                <position>:    The offset of string need to be replaced.
                  <length>:     The length of the string.
                   <string>:     The new string use to replace the old string in binary file.
有什么建议吗?

[ 本帖最后由 tintinbt 于 2006-12-13 12:56 AM 编辑 ]
作者: SPKEEY    时间: 2006-12-13 21:25
tintinbt
BinRep.exe  不标明替换的位置? 是查找全部替换??
作者: tintinbt    时间: 2006-12-14 01:25
写好了一个,试试
<position>就是字符串开始位置

  Binrep.exe V1.00 by Figer (tintinbt@gmail.com)  Dec,2006
  This program replace a string in a binary file.

  Usage: Binrep.exe <filename> <startfrom> <length>  <string>  [/Y]
                      <filenae> - The name of the binary file.  文件名
                    <startfrom> - The offset of the old string in binary file.  字符串起始位置
                       <length> - The length of the old string.   字符串长度
                       <string> - The new string. (length must less or equal the old string)   新字符串
                           [/Y] - No prompt to confirm the string replacement      /y参数不需确认,直接替换

  Example: replace string from bios.bin, from the 120th byte, length 10 bytes
    BinRep bios.bin 120 10 CAC63602UA
    Replace string "CAC6360S1K" to "CAC63602UA" (Y/N)?y
    The string "CAC6360S1K" has been replaced to "CAC63602UA"

[ 本帖最后由 tintinbt 于 2006-12-14 01:31 AM 编辑 ]

BINREP.rar

9.64 KB, 下载次数: 86, 下载积分: 无忧币 -2


作者: HuAnGkUn    时间: 2006-12-14 14:04
呵呵,能不能搞个搜索并替换第(?)个的?
作者: turkey1213    时间: 2006-12-30 10:15
原帖由 tintinbt 于 2006-12-14 01:25 AM 发表
写好了一个,试试
<position>就是字符串开始位置

  Binrep.exe V1.00 by Figer (tintinbt@gmail.com)  Dec,2006
  This program replace a string in a binary file.

  Usage: Binrep.exe <filen ...


可以分享一下源码吗?谢谢!




欢迎光临 无忧启动论坛 (http://wuyou.net/) Powered by Discuz! X3.3