![查找包含弹出窗口代码的应用程序文件](https://linux22.com/image/1139704/%E6%9F%A5%E6%89%BE%E5%8C%85%E5%90%AB%E5%BC%B9%E5%87%BA%E7%AA%97%E5%8F%A3%E4%BB%A3%E7%A0%81%E7%9A%84%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%96%87%E4%BB%B6.png)
Ubuntu 14.04 启动已安装的第三方应用程序时,它会显示一个带有通知消息的弹出窗口。我想找到一个包含显示此弹出窗口的代码的应用程序文件。是否有工具可以帮助确定此文件?至少,如何通过扫描“/”根目录中的特定文本字符串来找到此弹出窗口中包含的文件?
答案1
要在已编译的二进制应用程序中查找字符串,可以使用strings
命令 -fromman strings
NAME
strings - print the strings of printable characters in files.
DESCRIPTION
For each file given, GNU strings prints the printable character
sequences that are at least 4 characters long (or the number given with
the options below) and are followed by an unprintable character.
例如,
$ strings -d /usr/bin/gnome-calculator | grep 'Mode$'
ButtonMode
Basic Mode
Advanced Mode
Financial Mode
Programming Mode
Keyboard Mode
或者
$ strings -df /usr/bin/gnome-* | grep 'Restart$'
/usr/bin/gnome-software: Restart