V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
tyonly
V2EX  ›  Linux

在 Linux 上如何监控 PHP curl 对外请求的 HTTP 或者 HTTPS 域

  •  
  •   tyonly · Apr 26, 2020 · 5068 views
    This topic created in 2199 days ago, the information mentioned may be changed or developed.

    目前没有找到合适的工具,因此看看大家有没有合适的方案? 场景:某个 PHP 文件里 CURL 请求特定网址偷偷下载东西 目的:监控请求的是什么网址

    11 replies    2020-05-07 14:54:15 +08:00
    lhx2008
        1
    lhx2008  
       Apr 26, 2020 via Android
    用 phptrace 来抓
    tyonly
        2
    tyonly  
    OP
       Apr 27, 2020
    @lhx2008 我想监控所有的 PHP 文件对外请求状态 ,PHPTRACE 是个脚本?
    tyonly
        3
    tyonly  
    OP
       Apr 27, 2020
    找到一个 tcpdump,研究中
    laojiaqing
        4
    laojiaqing  
       Apr 27, 2020
    curl 前写日志,用 guzzle
    iminto
        5
    iminto  
       Apr 27, 2020
    strace php 的进程就可以了。
    ···
    strace -p 24507
    ···
    tyonly
        6
    tyonly  
    OP
       Apr 27, 2020
    我的目标是监控所有的 CMS 文件对外请求的。不是单个文件,所以想找到基于服务器的解决方案。
    yushuda
        7
    yushuda  
       Apr 28, 2020
    定时下马?
    tyonly
        8
    tyonly  
    OP
       Apr 28, 2020
    不是下马,是监控 CMS 有没有被人下马,链接到不该链接的网站上去下载东西了
    tanghongkai
        9
    tanghongkai  
       Apr 30, 2020
    基于服务器的话可以走自己的 dns 服务器然后看日志吧
    tyonly
        10
    tyonly  
    OP
       May 7, 2020
    @tanghongkai 服务器用的是阿里云,目前考虑方案是自己装包存储起来,然后在筛选
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   999 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 23:49 · PVG 07:49 · LAX 16:49 · JFK 19:49
    ♥ Do have faith in what you're doing.