<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>技术 on 想记录少女的心事…</title><link>https://blog.20033999.xyz/categories/%E6%8A%80%E6%9C%AF/</link><description>Recent content from 想记录少女的心事…</description><generator>Hugo</generator><language>zh-cn</language><managingEditor>yursamor@users.noreply.github.com (yursamor)</managingEditor><webMaster>yursamor@users.noreply.github.com (yursamor)</webMaster><copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright><lastBuildDate>Mon, 29 Jun 2026 17:30:23 +0800</lastBuildDate><atom:link href="https://blog.20033999.xyz/categories/%E6%8A%80%E6%9C%AF/index.xml" rel="self" type="application/rss+xml"/><item><title>把极验 v3 的 w 参数生成器搬到 Python — 一场没完全赢的逆向</title><link>https://blog.20033999.xyz/post/geetest-v3-w-reverse-engineer/</link><pubDate>Fri, 26 Jun 2026 16:45:00 +0800</pubDate><author>yursamor@users.noreply.github.com (yursamor)</author><guid>https://blog.20033999.xyz/post/geetest-v3-w-reverse-engineer/</guid><description>
<![CDATA[<h1>把极验 v3 的 w 参数生成器搬到 Python — 一场没完全赢的逆向</h1><p>作者：yursamor（yursamor@users.noreply.github.com）</p>
        
          <blockquote>
<p>这篇文章是我尝试用 Python 复刻住房和城乡建设部「全国建筑市场监管公共服务平台」(jzsc.mohurd.gov.cn) 上极验 v3 滑块 <code>w</code> 参数生成器的完整记录。结论一句话：<strong>算法还原了，但 server 不让纯 Python 跑</strong>。下面把过程都摆出来。</p>
</blockquote>
<h2 id="背景">
<a class="header-anchor" href="#%e8%83%8c%e6%99%af"></a>
背景
</h2><p>业务方要批量查 jzsc 上的一些企业资质信息。每次请求前都得过一次极验滑块，弹出来挡住你，验证完了才能查数据。</p>
<p>我手上有两份别人写好的 Python 脚本（<code>geetest_v3_params.py</code> 和 <code>geetest_params.py</code>），号称能算 <code>w</code> 参数。但跑起来发现：</p>
<ul>
<li>一个用 <strong>MD5 占位</strong> 当 modulus，明显是 demo</li>
<li>一个流程对，但调用 <code>get.php</code> 时拿不到 <code>key</code> 字段，server 返 <code>error_21: not proof</code></li>
</ul>
<p>也就是说：<strong>算法有了，但缺真 modulus</strong>。我得自己从头把它跑通。</p>
<h2 id="极验-v3-的-w-是什么">
<a class="header-anchor" href="#%e6%9e%81%e9%aa%8c-v3-%e7%9a%84-w-%e6%98%af%e4%bb%80%e4%b9%88"></a>
极验 v3 的 w 是什么
</h2><p><code>w</code> 是极验滑块最终提交给 <code>ajax.php</code> 的那个长字符串，本质上是<strong>三段拼接</strong>：</p>
<pre tabindex="0"><code>w = customB64( AES-128-CBC(JSON, seed) )  +  hex( RSA-1024(seed) )
</code></pre><ul>
<li><strong>JSON</strong>：包含 challenge、gt、客户端环境指纹（<code>ep</code>/<code>em</code>）、时间戳等</li>
<li><strong>seed</strong>：16 字节 ASCII 随机串，作为 AES 的 key</li>
<li><strong>AES-128-CBC</strong>：IV 全零，PKCS7 padding</li>
<li><strong>customB64</strong>：极验自家改的 Base64，字符表 <code>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()</code>，pad 是 <code>.</code>，掩码 <code>[7274496, 9483264, 19220, 235]</code></li>
<li><strong>RSA-1024</strong>：PKCS1-v1.5 加密 seed，e=65537，n 来自 <code>get.php</code> 响应里的 <code>key</code> 字段</li>
</ul>
<p>知道算法是一回事，能拿到 <code>key</code> 是另一回事。</p>
        
        <hr><p>本文2026-06-26首发于<a href='https://blog.20033999.xyz/'>想记录少女的心事…</a>，最后修改于2026-06-29</p>]]></description><category>技术</category></item><item><title>一整天都在搭管道：frp、aliyun、CF、博客全连起来了</title><link>https://blog.20033999.xyz/post/2026-06-29-frp-aliyun-cloudflare-deploy/</link><pubDate>Mon, 29 Jun 2026 17:24:00 +0800</pubDate><author>yursamor@users.noreply.github.com (yursamor)</author><guid>https://blog.20033999.xyz/post/2026-06-29-frp-aliyun-cloudflare-deploy/</guid><description>
<![CDATA[<h1>一整天都在搭管道：frp、aliyun、CF、博客全连起来了</h1><p>作者：yursamor（yursamor@users.noreply.github.com）</p>
        
          <blockquote>
<p>2026-06-29 一整天的运维流水账。从早上 9:41 改 frps.toml 一行配置开始，到下午 17:19 写完这篇博客结束。一共 8 小时，中间踩了 4-5 个值得记的坑，最后所有机器通过 frp + CF + aliyun 三家串成一张能跑的网。</p>
</blockquote>
<h2 id="tldr">
<a class="header-anchor" href="#tldr"></a>
TL;DR
</h2><ul>
<li>把 si 上 <code>frps</code> 升到强制 TLS 模式，userver 上 <code>frpc</code> 用域名连过来</li>
<li>顺手用 si 上跑的 <code>aliyun-console</code> (knife4j) 把 si 的 80/443/7000/10222 端口在阿里云安全组里放行</li>
<li>解析了 <code>frps.20033999.xyz</code> 走 nginx，把 si 上的 nginx 部署目录从 <code>conf.d/letsencrypt</code> 整成 <code>config/certs/html</code></li>
<li>本地装 <code>cloudflared</code>，试了 <code>cloudflared access ssh</code>，折腾完最后还是切回 frp 直连</li>
<li>userver 上用 docker compose 起了 MySQL 8.0.39 + Redis 7.4.1，共享 <code>yursamor</code> external network</li>
<li>从 si 上 <code>/opt/rds/</code> 把 <code>nacos_full_20260628-1712.sql.gz</code> 还原到 userver 的 mysql，新建 <code>nacos</code> 库（12 张表，31 条 config）</li>
</ul>
<h2 id="早上-0941改-frps-强制-tls">
<a class="header-anchor" href="#%e6%97%a9%e4%b8%8a-0941%e6%94%b9-frps-%e5%bc%ba%e5%88%b6-tls"></a>
早上 09:41：改 frps 强制 TLS
</h2><p>最早的想法很简单：把 <code>si.20033999.xyz</code> 上跑着的 <code>frps</code> 0.69.1 升级到强制 TLS 模式，配置就一行：</p>
        
        <hr><p>本文2026-06-29首发于<a href='https://blog.20033999.xyz/'>想记录少女的心事…</a>，最后修改于2026-06-29</p>]]></description><category>技术</category></item></channel></rss>