博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux在二进制文件中查找pattern的offset
阅读量:7030 次
发布时间:2019-06-28

本文共 1185 字,大约阅读时间需要 3 分钟。

参考:

strings -a -t x filename | grep foobar

 

daniel@daniel-mint ~/latex/linux/itext/daniel $ hexdump -C asm_daniel_obj_2.bin 00000000  32 20 30 20 6f 62 6a 0a  3c 3c 2f 4c 65 6e 67 74  |2 0 obj.<>stream.|00000030  78 9c 2b e4 72 0a e1 32  36 53 30 33 34 52 08 49  |x.+.r..26S034R.I|00000040  e1 32 50 d0 35 b4 00 31  f4 dd 0c 15 40 42 69 5c  |.2P.5..1....@Bi\|00000050  1a 1e a9 39 39 f9 0a e1  f9 45 39 29 8a 0a 10 4e  |...99....E9)...N|00000060  40 6a 7e 41 4e 2a 8c 17  9c 5d 09 67 96 e6 c1 98  |@j~AN*...].g....|00000070  be f9 f9 30 b6 66 48 16  d0 64 03 14 0b 34 82 4b  |...0.fH..d...4.K|00000080  12 8b 8a 15 91 a4 5c 43  b8 02 b9 00 fc 98 26 ef  |......\C......&.|00000090  0a 65 6e 64 73 74 72 65  61 6d 0a 65 6e 64 6f 62  |.endstream.endob|000000a0  6a 0a                                             |j.|000000a2

  

  

 

daniel@daniel-mint ~/latex/linux/itext/daniel $ grep -Ubo --binary-file=text stream asm_daniel_obj_2.bin 41:stream148:stream

  

查找单个字符

daniel@daniel-mint ~/latex/linux/itext/daniel $ hexdump -v -e "1/1 \" %02x\n\"" asm_daniel_obj_2.bin | grep -n '0a'8: 0a48: 0a54: 0a87: 0a94: 0a145: 0a155: 0a162: 0a

  

转载于:https://www.cnblogs.com/long123king/p/3927712.html

你可能感兴趣的文章
http状态码的分类
查看>>
react native redux saga增加日志功能
查看>>
hibernate缓存机制(二级缓存)
查看>>
iOS 小方法
查看>>
php 快速fork出指定个子进程
查看>>
1、算法简介
查看>>
HDU 4278 卡特兰,区间DP
查看>>
04分类整理:会搜索还不够,整理、分类、归纳
查看>>
线索二叉树【C语言】
查看>>
hdu Can you solve this equation?
查看>>
【CLRS】《算法导论》读书笔记(四):栈(Stack)、队列(Queue)和链表(Linked List)...
查看>>
hibernate 和 mybatis区别
查看>>
互联网广告综述之点击率特征工程
查看>>
HDU3421 Max Sum II【序列处理】
查看>>
POJ NOI MATH-7653 地球人口承载力估计
查看>>
iOS UI高级之网络编程(HTTP协议)
查看>>
使用cocoaPods import导入时没有提示的解决办法
查看>>
iOS数据持久化存储之归档NSKeyedArchiver
查看>>
JavaScript面向对象
查看>>
Intellij修改模板代码
查看>>