您当前的位置: 首页 >  linux

phymat.nico

暂无认证

  • 1浏览

    0关注

    1967博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

linux命令之查看动态库中字符串-strings

phymat.nico 发布时间:2017-11-22 16:54:08 ,浏览量:1

strings命令是在对象文件或者二进制文件中查找可打印的字符串,有很多的用途,例如一个用法就是在编译的so中定义字符串常量作为动态库的版本号,然后就可以使用strings+grep 组合命令查看当前编译的so的版本号了。

输入strings -h查看strings命令的用法:

用法:strings [选项] [文件]
 打印 [文件] (默认为标准输入) 中可打印的字符串
 选项为:
  -a - --all                Scan the entire file, not just the data section [default]
  -d --data                 Only scan the data sections in the file
  -f --print-file-name      Print the name of the file before each string
  -n --bytes=[number]       Locate & print any NUL-terminated sequence of at
  -                   least [number] characters (default 4).
  -t --radix={o,d,x}        Print the location of the string in base 8, 10 or 16
  -w --include-all-whitespace Include all whitespace as valid string characters
  -o                        An alias for --radix=o
  -T --target=     Specify the binary file format
  -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                            s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit
  -s --output-separator= String used to separate strings in output.
  @                   Read options from 
  -h --help                 Display this information
  -v -V --version           Print the program's version number
strings:支持的目标: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64 pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
将 bug 报告到 

关注
打赏
1659628745
查看更多评论
立即登录/注册

微信扫码登录

0.0492s