strings 命令
用途
在对象文件或二进制文件中查找可打印的字符串。
语法
strings [ -a ] [ - ] [ -o ] [ -t Format ] [ -n Number ] [ -Number ] [ File ... ]
描述
strings 命令在
对象文件或二进制文件
中查找可打印的字符串。字符串是 4 个或更多可打印字符的任意序列,以换行符或空字符结束。 strings 命令对识别随机对象文件很有用。
标志
-a 或 - 搜索整个文件,而不仅仅是数据段,以寻找可打印的字符串。如果省略这个标志,则 strings 命令只在对象文件的初始化数据空间内寻找。
-n Number 指定最小的字符串长度(除了缺省的 4 个字符以外)。字符串长度的最大值是 4096。这个标志与 -Number 标志相同。
-o 列出文件中每个跟随在其八进制偏移量之后的字符串。这个标志与 -t o 标志相同。
-t Format 列出从文件最开始起,每个跟随在其偏移量之后的字符串。该格式取决于用作 Format 变量的字符。
d
以十进制写下偏移量。
o
以八进制写下偏移量。
x
以十六进制写下偏移量。
注:当 -o 和 -t Format 标志在一个命令行上多次定义,则最后指定的标志控制 strings 命令的行为。
-Number 指定最小的字符串长度(除了缺省的 4 个字符以外)。字符串长度的最大值是 4096。这个标志与 -n Number 标志相同。
File 要搜索的二进制文件或对象文件。
退出状态
该命令返回以下退出值:
0 表示命令成功运行。
>0 表示出错。
strings 命令显示:
以十六进制写下偏移量,打印文本文件中最小字符串长度大于40的
[czmmiao@czmmiao ~]$ strings -t x -40 /etc/profile
10 # System wide environment and startup programs, for login setup
50 # Functions and aliases go in /etc/bashrc
7b # It's NOT good idea to change this file unless you know what you
bd # are doing. Much better way is to create custom.sh shell script in
101 # /etc/profile.d/ to make custom changes to environment. This will
144 # prevent need for merging in future updates.
1c6
if [ "$2" = "after" ] ;
then
436 if [ "$HISTCONTROL" = "ignorespace" ] ;
4b0 then export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
以八进制写下偏移量,打印二进制文件2010_12_02.JPG中不少于10个的字符串
[czmmiao@czmmiao ~]$ strings -t o -n 10 2010_12_02.JPG
26324 pd2N`G09d3
43705 KSQEy<)Iu4'
47750 @(SX9!lF7z
53461 @(SX9!lF7z
参考至:http://blog.csdn.net/lvhongya/archive/2010/10/27/5970364.aspx
本文原创,转载请注明出处、作者
如有错误,欢迎指正
邮箱:czmcj@163.com
分享到:
相关推荐
分配字符串模块3 =字符串和函数在本练习中,学生将在示例的帮助下学习C编程中的字符串并学习声明它们,对其进行初始化并将其用于各种I / O操作,并且将向学生介绍函数(用户定义函数和标准库函数) )在C编程中。...
The book is a general, rigorous text on deterministic algorithms that operate on strings, and sequences. It covers the full spectrum of string algorithms from clasical computer science to modern ...
介绍了基于树和序列的一些算法,比较详细和权威,讲得很好,全英文版的
The book is a general, rigorous text on deterministic algorithms that operate on strings, and sequences. It covers the full spectrum of string algorithms from clasical computer science to modern ...
The book is a general, rigorous text on deterministic algorithms that operate on strings, and sequences. It covers the full spectrum of string algorithms from clasical computer science to modern ...
正在安装酿造去做brew install xcode-dead-strings从来源克隆此项目并运行swift build -c release技术支持 Swift "Regular Strings" """Multiline Strings""" #"Raw Strings"# Objective-C(++) 信息列表键例子按...
贝岭的matlab的代码Exo-79-Les-Strings-2 对于这些 exos,您将始终使用相同的变量! 创建一个包含文本的变量:It is beautiful my apple! 外 1 Récupérez le paragraphe #index-pomme et donnez lui comme valeur,...
Java Methods-Strings.ppt
本篇文章主要介绍了linux中的strings命令简介,在linux下搞软件开发的朋友, 几乎没有不知道strings命令的。非常具有实用价值,需要的朋友可以参考下。
使用方法,解压到本地目录,配置path,即可在dos下使用linux命令。 windows下能直接执行的linux命令,基本包括日常所有,如:[.exe grolbp.exe regtool.exe a2p.exe grolj4.exe rm.exe a2p5.10.0.exe grops.exe ...
中文Linux Man 文档 ac--输出用户连接时间 access--确定文件是否可以存取访问 ali--list mail aliases apm--查询高级电源管理(APM)BIOS apropos--search the whatis database for strings at-- ...
Windows Forms - Use Format Codes to Format Data in Strings
北大POJ3096-Surprising Strings 解题报告+AC代码
linux libc-2.12.so 最高支持GLIBC_2.12 # strings libc-2.12.so |grep GLIBC_ GLIBC_2.0 GLIBC_2.1 GLIBC_2.1.1 GLIBC_2.1.2 GLIBC_2.1.3 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.3 GLIBC_2.2.4 GLIBC_2.2.6 ...
题目:https://adworld.xctf.org.cn/task/task_list?type=reverse&number=4&grade=0&page=1 我的解题记录:https://www.yuque.com/jianouzuihuai/study/qffkcv
Connection Strings - SAP Help Portal.pdf
分配字符串模块3 =字符串和函数在本练习中,学生将学习C编程中的字符串,并学习如何声明它们,对其进行初始化,并在示例的帮助下将其用于各种I / O操作,并将向学生介绍函数(用户定义函数和标准库函数) )在C编程...
字符串和ASCII码(低六位)相互转化程序
npm i gulp-es6-template-strings --save 用法 有关更多用例,请参见 var gulp = require ( 'gulp' ) var template = require ( 'gulp-es6-template-strings' ) gulp . src ( './src/*.{html,txt}' ) . pipe ( ...