判断网站请求类型

  • 采用

    1
    curl -I https://example.com

    该命令会返回目标网站的请求头部分,为--headers命令的缩写

  • 返回如下信息:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    [root@dedsec06 Templates]# curl --head http://127.0.0.1:10565/original.wav
    HTTP/1.1 200 OK
    X-Powered-By: Express
    Accept-Ranges: bytes
    Cache-Control: public, max-age=0
    Last-Modified: Thu, 24 Apr 2025 13:33:34 GMT
    ETag: W/"2f2b90-1966800efb0"
    Content-Type: audio/wav
    Content-Length: 3091344
    Date: Thu, 29 May 2025 09:28:54 GMT
    Connection: keep-alive
    Keep-Alive: timeout=5
  • 这里关键在HTTP/1.1 200 OK这一段:

    method 对应信息
    GET HTTP/1.1 200 OK
    POST HTTP/2 405
    Allow: POST