V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
test1199
V2EX  ›  问与答

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

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

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