gpt4 book ai didi

linux - 如何查找 C 二进制文件请求的 URL

转载 作者:太空宇宙 更新时间:2023-11-04 12:31:27 25 4
gpt4 key购买 nike

我有一个二进制文件,它请求一些外部 URL(它在代码中的某个地方被硬编码)以获取数据。由于我对代码不太了解,所以看不到 URL。

有没有办法,我可以通过在 Centos Linux 上运行程序来找出 URL 或 IP。

最佳答案

我使用以下命令来跟踪进/出我的应用程序的连接。

strace -f -e trace=network -s 10000 ./a.out

这里,

-f => Trace child processes as they are created by currently traced processes as a result of the fork(2) system call.

-e trace=network => trace only network related things

-s 10000 => the maximum string size to print (the default is 32).

关于linux - 如何查找 C 二进制文件请求的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43187448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com