cpplumber
0.1.0 - Initial release

Cpplumber是一种静态分析工具,可帮助检测和跟踪C ++源代码信息,这些信息泄漏到编译后的可执行文件中。
该项目用锈蚀书写,取决于libclang,因此它是跨平台,可用于使用最新的C和C ++标准的项目。
想象一下,您有一个源文件file1.c ,您已将其编译到a.out中,并且您想知道某些字符串字符的字体是否在a.out中结束,您可以简单地做:
$ cpplumber --bin a.out file1.c
[2022-09-24T19:57:14Z INFO cpplumber] Gathering source files...
[2022-09-24T19:57:14Z INFO cpplumber] Filtering suppressed files...
[2022-09-24T19:57:14Z INFO cpplumber] Extracting artifacts from source files...
[2022-09-24T19:57:15Z INFO cpplumber] Filtering suppressed artifacts...
[2022-09-24T19:57:15Z INFO cpplumber] Looking for leaks in 'a.out'...
"My_Super_Secret_API_Key" (string literal) leaked at offset 0x14f20 in "/full/path/to/a.out" [declared at /full/path/to/file1.c:5]
Error: Leaks detected!
完整的用户文档可在此处提供(也可以作为Markdown)。
构建项目需要Rust版本1.63.0或更高。
git clone https://github.com/ergrelet/cpplumber.git
cd cpplumber
cargo build --release
如果您安装了生锈,则可以轻松安装带有cargo的CPPLUMBER:
cargo install --git https://github.com/ergrelet/cpplumber --tag 0.1.0
之后,您可以通过命令行从任何地方调用cpplumber 。
请记住,您需要安装所需的依赖项,以使cpplumber正确运行。查看用户文档以获取更多详细信息。