test1199
V2EX  ›  问与答

为什么用 postman 或者自己写的程序发 http 请求返回 403

  •  
  •   test1199 · Jun 25, 2024 · 1940 views
    This topic created in 875 days ago, the information mentioned may be changed or developed.

    所有 header, cookie 都加上了, 浏览器访问就没事, 啥情况呢? 服务器是 cloudflare 的, 返回 403

    13 replies  •  2024-06-25 17:41:22 +08:00
    Xinu
    Xinu
    Jun 25, 2024
    1
    要贴一下全部的请求头,要不这没法看
    ihainan
    ihainan
    Jun 25, 2024
    2
    生成 curl 命令检查一下。
    0o0O0o0O0o
    0o0O0o0O0o
    Jun 25, 2024 via iPhone
    3
    tls 和 http2 fingerprint
    MMM25O7lf09iR4ic
    MMM25O7lf09iR4ic
    Jun 25, 2024
    4
    你已经说出原因了, 服务器是 cloudflare 的。
    htxy1985
    htxy1985
    Jun 25, 2024
    5
    cloudflare 的服务器应该不会让你这样随便拿 postman 测吧,参考 3 楼的推测。
    test1199
    test1199
    OP
    Jun 25, 2024
    6
    @0o0O0o0O0o 这是啥? cloudflare 的话也是根据 cookie 判断是不是上次那个人吧? 我 cookie 都加上了为什么不行呢?有什么办法吗?
    levin007
    levin007
    Jun 25, 2024
    8
    用 jmeter 录制下脚本去请求看看
    nothingistrue
    nothingistrue
    Jun 25, 2024
    9
    cloudflare 有真人判断,怎么过,你得问 cloudflare 或者攻破过 cloudflare 的大牛。
    test1199
    test1199
    OP
    Jun 25, 2024
    10
    @0o0O0o0O0o 我搜了一下, 应该是指纹盾, 看来现在的技术比以前底层多了; 请问 java 有什么好库伪造浏览器的指纹吗?
    emartcn
    emartcn
    Jun 25, 2024
    11
    我碰到过,也有解决方式,在想,看看能不能产品化
    ntdll
    ntdll
    Jun 25, 2024
    12
    cloudflare 有前置的 TLS 指纹识别。

    Java 似乎没什么太好的第三方库,大多是通过无头浏览器。
    0o0O0o0O0o
    0o0O0o0O0o
    Jun 25, 2024 via iPhone
    13
    @test1199 #10 本质上就是能直接调用和修改 tls 和 HTTP/2 的实现。go 做这个方便,有很多这类库,python 和 rust 也有一些,java 的很少,图省事的话建议用 go 做个反代给 java 调用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2386 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 12:35 · PVG 20:35 · LAX 04:35 · JFK 07:35
    ♥ Do have faith in what you're doing.