{"id":241,"date":"2024-07-27T13:58:14","date_gmt":"2024-07-27T05:58:14","guid":{"rendered":"http:\/\/www.94i.top\/?p=241"},"modified":"2024-09-29T04:23:50","modified_gmt":"2024-09-28T20:23:50","slug":"%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e9%80%86%e5%90%91","status":"publish","type":"post","link":"https:\/\/www.94i.top\/index.php\/2024\/07\/27\/%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e9%80%86%e5%90%91\/","title":{"rendered":"\u8bb0\u5f55\u4e00\u6b21\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u9006\u5411\uff08\u5df2\u5b8c\u7ed3\uff09"},"content":{"rendered":"<h1>\u73af\u5883<\/h1>\n<p><strong>\u5c0f\u7a0b\u5e8f\u540d\u79f0<\/strong>\uff1a\u6b63\u5f18+<br \/>\n<strong>\u5fae\u4fe1\u7248\u672c<\/strong>\uff1a3.9.10.19<br \/>\n<strong>\u9006\u5411\u5de5\u5177<\/strong>\uff1a<a href=\"https:\/\/github.com\/JaveleyQAQ\" title=\"WeChatOpenDevTools\">WeChatOpenDevTools<\/a><\/p>\n<h1>\u9006\u5411\u5206\u6790<\/h1>\n<p>\u5148\u901a\u8fc7\u5c0f\u7a0b\u5e8f\u89e3\u5305\u5e76\u67e5\u627e\u5173\u952e\u5b57<code>sha<\/code>\u627e\u5230\u4e86sha256\u52a0\u5bc6\u51fd\u6570\uff0c\u518d\u901a\u8fc7\u9006\u5411\u5de5\u5177<code>wxdevtools<\/code>\uff0c\u627e\u5230\u4e86\u52a0\u5bc6\u4f4d\u7f6e\u3002<\/p>\n<p>\u5176\u4e2d\u4e3b\u8981\u4ee3\u7801\u4e3a<\/p>\n<pre><code class=\"language-javascript\">l = c.default.SHA256(l),\no.sign = l,<\/code><\/pre>\n<p>\u53c2\u6570l\u4e3a\u591a\u4e2a\u5c0f\u53c2\u6570\u62fc\u63a5\u800c\u6210\uff0c\u5982<br \/>\n<code>accessToken=***********&amp;appKey=*****&amp;appUid=****************&amp;appVersion=3.2.40&amp;clientAppName=memberClient&amp;clientType=mini_weixin&amp;currentPageType=user&amp;customVersion=9&amp;deviceId=*************************&amp;extendCode=none&amp;mallId=201&amp;model=microsoft&amp;osVersion=Windows 10 x64&amp;programVersion=3.9.10&amp;rnd=C4Ndc4QAeGsoHqiGJxRHp9mWZWC29a&amp;sceneValue=1256&amp;sdkVersion=3.3.5&amp;sid=****************&amp;source=mini_weixin&amp;timestamp=17220515630RU2DV7E67T7ZMPQXWAVD99MY<\/code><\/p>\n<p>\u5176\u4e2d\u9700\u8981\u6ce8\u610f\u7684\u5b57\u6bb5\u6709<code>accessToken<\/code>,<code>appKey<\/code>,<code>appUid<\/code>,<code>deviceId<\/code>,<code>rnd<\/code>,<code>sid<\/code>,<code>timestamp<\/code><br \/>\n\u5148\u5047\u8bbe<code>accessToken<\/code>,<code>appKey<\/code>,<code>appUid<\/code>,<code>deviceId<\/code>\u4e3a\u56fa\u5b9a\u503c\u3002<\/p>\n<p><strong>rnd<\/strong>\uff1a<br \/>\nrnd\u7684\u751f\u6210\u51fd\u6570\u4e3a<\/p>\n<pre><code class=\"language-javascript\">function rndGenerate(e) {\n    for (var t = [&quot;0&quot;, &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;, &quot;9&quot;, &quot;A&quot;, &quot;B&quot;, &quot;C&quot;, &quot;D&quot;, &quot;E&quot;, &quot;F&quot;, &quot;G&quot;, &quot;H&quot;, &quot;I&quot;, &quot;J&quot;, &quot;K&quot;, &quot;L&quot;, &quot;M&quot;, &quot;N&quot;, &quot;O&quot;, &quot;P&quot;, &quot;Q&quot;, &quot;R&quot;, &quot;S&quot;, &quot;T&quot;, &quot;U&quot;, &quot;V&quot;, &quot;W&quot;, &quot;X&quot;, &quot;Y&quot;, &quot;Z&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;, &quot;f&quot;, &quot;g&quot;, &quot;h&quot;, &quot;i&quot;, &quot;j&quot;, &quot;k&quot;, &quot;l&quot;, &quot;m&quot;, &quot;n&quot;, &quot;o&quot;, &quot;p&quot;, &quot;q&quot;, &quot;r&quot;, &quot;s&quot;, &quot;t&quot;, &quot;u&quot;, &quot;v&quot;, &quot;w&quot;, &quot;x&quot;, &quot;y&quot;, &quot;z&quot;], r = &quot;&quot;, i = 0; i &lt; e; i++) {\n        r += t[Math.ceil(Math.random() * (t.length - 1))]\n    }\n    return r\n}<\/code><\/pre>\n<p>\u5176\u4e2de\u4f20\u5165\u7684\u503c\u4e3a\u56fa\u5b9a\u503c30<\/p>\n<p><strong>sid<\/strong>:\u548c<code>appUid<\/code>\u7684\u503c\u76f8\u540c<\/p>\n<p><strong>timestamp<\/strong>:\u65f6\u95f4\u6233+\u4e00\u4e32\u5b57\u7b26\u4e32<br \/>\n\u65f6\u95f4\u6233\u751f\u6210\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-javascript\">Math.trunc((new Date).getTime() \/ 1e3)<\/code><\/pre>\n<p>\u6ce8\u610f\u5230u.default.config.apiSign.wap_KEYS\u4e3a\u4e00\u4e2a\u6570\u7ec4\uff0c\u5185\u5bb9\u4e3a<\/p>\n<pre><code class=\"language-javascript\">[&#039;N94QKAZD289GQARELPOJQGZM8&#039;, &#039;GFNCV79W9U1CYFEXQ904OI6BB&#039;, &#039;C1BOEMXCP1A5KUBVQIXKGBH51&#039;, &#039;0RU2DV7E67T7ZMPQXWAVD99MY&#039;, &#039;EPOJKLVKIQQMGG9XWT9C28F5C&#039;, &#039;8GTBBWEADC6RG237EUEC7KZFU&#039;, &#039;1XP3TLH0BZMZS7TT3TF7JD500&#039;, &#039;TNFVOH7WHTC4NCD6SI9QZ3W5N&#039;, &#039;ZZNEL2ULF9TPAC9NU3493GL7I&#039;, &#039;8SABWT2MB1JOHOM02QVN36TGI&#039;]<\/code><\/pre>\n<p>\u53d1\u73b0<code>timestamp<\/code>\u4e3a<\/p>\n<pre><code class=\"language-javascript\">var a = Math.trunc((new Date).getTime() \/ 1e3);\ntimestamp = a + u.default.config.apiSign.wap_KEYS[a % 10];<\/code><\/pre>\n<p>\u81f3\u6b64\uff0c\u9664\u5047\u8bbe\u4e3a\u56fa\u5b9a\u503c\u5b57\u6bb5\u5916\uff0c\u5176\u4ed6\u53c2\u6570\u90fd\u5df2\u7ecf\u5206\u6790\u5b8c\u6bd5\uff0c\u4e0b\u9762\u5c06\u5b9e\u73b0\u5982\u4f55\u751f\u6210\u52a0\u5bc6\u53c2\u6570<strong>l<\/strong>\uff0c\u4ee3\u7801\u5982\u4e0b<\/p>\n<pre><code class=\"language-javascript\">var l = `accessToken=${accessToken}&amp;appKey=${appKey}&amp;appUid=${appUid}&amp;appVersion=3.2.40&amp;clientAppName=memberClient&amp;clientType=mini_weixin&amp;currentPageType=user&amp;customVersion=9&amp;deviceId=${deviceId}&amp;mallId=201&amp;model=microsoft&amp;osVersion=Windows 10 x64&amp;programVersion=3.9.10&amp;rnd=${rnd}&amp;sceneValue=1256&amp;sdkVersion=3.3.5&amp;sid=${appUid}&amp;timestamp=${timestamp[0]}`;\nvar m = `accessToken=${accessToken}&amp;appKey=${appKey}&amp;appUid=${appUid}&amp;appVersion=3.2.40&amp;clientAppName=memberClient&amp;clientType=mini_weixin&amp;currentPageType=user&amp;customVersion=9&amp;deviceId=${deviceId}&amp;mallId=201&amp;model=microsoft&amp;osVersion=Windows%2010%20x64&amp;programVersion=3.9.10&amp;rnd=${rnd}&amp;sceneValue=1256&amp;sdkVersion=3.3.5&amp;sid=${appUid}&amp;timestamp=${timestamp[1]}`;\nconsole.log(m+&#039;&amp;sign=&#039;+SHA256(l)+&#039;&amp;signType=sha&#039;);<\/code><\/pre>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u91cc<code>l<\/code>\u548c<code>m<\/code>\u7684\u533a\u522b\u5728\u4e8e<code>osVersion<\/code>\u4e00\u4e2a\u662f<code>Windows 10 x64<\/code>\uff0c\u53e6\u4e00\u4e2a\u662f<code>Windows%2010%20x64<\/code>\uff0c<code>l<\/code>\u8d1f\u8d23\u7528\u4e8eSHA256\u52a0\u5bc6\u751f\u6210\u53c2\u6570\u4f7f\u7528\uff0c<code>m<\/code>\u7528\u4e8e\u4f20\u5165python\u4e2d\u4f5c\u4e3aurl\u4f7f\u7528\uff0c\u4e8c\u8005\u4e0d\u80fd\u76f8\u540c\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u8bf7\u6c42\u5931\u8d25\u7684\u60c5\u51b5\u3002<\/p>\n<h2>\u96be\u70b9\u5206\u6790<\/h2>\n<p>\u5728\u8fdb\u884c<code>requests<\/code>\u7684<code>POST<\/code>\u8bf7\u6c42\u65f6\uff0c\u660e\u660e\u5df2\u7ecf\u8ba1\u7b97\u51fa\u4e86\u6b63\u786e\u7684<code>sign<\/code>\u503c\u5e76\u62fc\u63a5\u9664\u4e86\u6700\u7ec8\u7684<code>url<\/code>\uff0c\u8fd4\u56de\u7684\u7ed3\u679c\u4ecd\u7136\u662f<strong>\u8bbf\u95ee\u68c0\u67e5\u5931\u8d25<\/strong>\u3002<\/p>\n<p>\u7ecf\u8fc7\u5f88\u4e45\u7684\u5206\u6790\u4ecd\u7136\u6ca1\u6709\u7ed3\u679c\uff0c\u4e8e\u662f\u4e0b\u8f7d\u4e86<strong>ApiFox<\/strong>\uff0c\u4f7f\u7528<strong>Fiddler<\/strong>\u5bf9\u521a\u8bf7\u6c42\u7684<code>POST<\/code>\u8fdb\u884c\u6293\u53d6\uff0c\u5e76\u5c06\u7ed3\u679c\u653e\u5165<strong>ApiFox<\/strong>\u4e2d\u8fdb\u884c\u63a5\u53e3\u8bf7\u6c42\uff0c\u53d1\u73b0\u53ef\u4ee5\u8bf7\u6c42\u6210\u529f\u3002<br \/>\n<div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.94i.top\/wp-content\/uploads\/2024\/07\/86088c7c930653b3c2d9dc95af47f00-1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"http:\/\/www.94i.top\/wp-content\/uploads\/2024\/07\/86088c7c930653b3c2d9dc95af47f00-1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<p>\u518d\u770b<strong>ApiFox<\/strong>\u4e2d\u7684\u5b9e\u9645\u8bf7\u6c42\u4e2d\u7684<code>Python<\/code>\u8bf7\u6c42\u4ee3\u7801\uff0c\u53d1\u73b0\u4ed6\u7684<code>POST<\/code>\u8bf7\u6c42\u662f\u8fd9\u6837\u5199\u7684<\/p>\n<pre><code class=\"language-python\">payload = &quot;{\\&quot;isPayMemberLevelCalc\\&quot;:1,\\&quot;mallId\\&quot;:\\&quot;201\\&quot;,\\&quot;memberId\\&quot;:\\&quot;****************\\&quot;,\\&quot;skuInfos\\&quot;:[{\\&quot;shopId\\&quot;:\\&quot;AOjIn8s8gjrCG5Hm\\&quot;,\\&quot;skuId\\&quot;:\\&quot;3605975038132\\&quot;,\\&quot;count\\&quot;:\\&quot;1\\&quot;,\\&quot;unitPrice\\&quot;:35500}],\\&quot;source\\&quot;:\\&quot;onlineMarket\\&quot;,\\&quot;tradeChannel\\&quot;:\\&quot;1\\&quot;,\\&quot;tradeTime\\&quot;:1722162830}&quot;\nresponse = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)<\/code><\/pre>\n<p>\u4e5f\u53ef\u4ee5\u5199\u6210<\/p>\n<pre><code class=\"language-python\">response = requests.post(url, headers=headers, data=payload)<\/code><\/pre>\n<p>\u6211\u4e4b\u524d\u7684\u4ee3\u7801\u4e2d\u7684<code>POST<\/code>\u8bf7\u6c42\u4e3a<\/p>\n<pre><code class=\"language-python\">response = requests.post(url, headers=headers, json=payload)<\/code><\/pre>\n<p>\u4e8e\u662f\uff0c\u628a\u6211\u7684\u4ee3\u7801\u4e2d\u7684<code>POST<\/code>\u8bf7\u6c42\u6362\u6210<strong>ApiFox<\/strong>\u7684\u8bf7\u6c42\u683c\u5f0f\uff0c\u53d1\u73b0\u53ef\u4ee5\u8bf7\u6c42\u6210\u529f\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u672c\u6b21\u9006\u5411\u7ed3\u675f\u3002<\/p>\n<h1>\u8bf7\u6c42\u8fd4\u56de\u4ee3\u7801\u8bb0\u5f55<\/h1>\n<h2>PUB-00000 \uff08\u6b64\u4e3a\u8bf7\u6c42\u6210\u529f\uff09<\/h2>\n<pre><code class=\"language-json\">{&quot;errorCode&quot;:&quot;PUB-00000&quot;,&quot;errorMessage&quot;:&quot;\u6210\u529f&quot;,&quot;errorCodeMsg&quot;:null,&quot;extra&quot;:null,&quot;display&quot;:true,&quot;exception&quot;:null,&quot;reqTime&quot;:1722060807,&quot;costTime&quot;:2,&quot;skipType&quot;:null,&quot;serviceTime&quot;:1722060807,&quot;skipParam&quot;:null,&quot;traceId&quot;:&quot;195-1722060807557&quot;,&quot;showTraceId&quot;:0,&quot;version&quot;:6,&quot;branch&quot;:&quot;mobcb&quot;,&quot;body&quot;:{\/\/\u6b64\u5904\u7701\u7565},&quot;encrypted&quot;:false,&quot;cache&quot;:true}<\/code><\/pre>\n<h2>PUB-00001<\/h2>\n<pre><code class=\"language-json\">{&quot;errorCode&quot;:&quot;PUB-00001&quot;,&quot;errorMessage&quot;:&quot;[118-1722060689574]\u7cfb\u7edf\u7e41\u5fd9&quot;,&quot;errorCodeMsg&quot;:null,&quot;extra&quot;:null,&quot;display&quot;:true,&quot;exception&quot;:null,&quot;reqTime&quot;:0,&quot;costTime&quot;:0,&quot;skipType&quot;:null,&quot;serviceTime&quot;:1722060689,&quot;skipParam&quot;:null,&quot;traceId&quot;:&quot;118-1722060689574&quot;,&quot;showTraceId&quot;:0,&quot;version&quot;:6,&quot;branch&quot;:&quot;mobcb&quot;,&quot;body&quot;:null,&quot;encrypted&quot;:false,&quot;cache&quot;:false}<\/code><\/pre>\n<h2>PUB-00006<\/h2>\n<pre><code class=\"language-json\">{&quot;errorCode&quot;:&quot;PUB-00006&quot;,&quot;errorMessage&quot;:&quot;[118-1722060712877]\u8bbf\u95ee\u68c0\u67e5\u5931\u8d25&quot;,&quot;errorCodeMsg&quot;:&quot;PUB-00006&quot;,&quot;extra&quot;:null,&quot;display&quot;:true,&quot;exception&quot;:null,&quot;reqTime&quot;:0,&quot;costTime&quot;:0,&quot;skipType&quot;:null,&quot;serviceTime&quot;:1722060712,&quot;skipParam&quot;:null,&quot;traceId&quot;:&quot;118-1722060712877&quot;,&quot;showTraceId&quot;:0,&quot;version&quot;:6,&quot;branch&quot;:&quot;mobcb&quot;,&quot;body&quot;:null,&quot;encrypted&quot;:false,&quot;cache&quot;:false}<\/code><\/pre>\n<h2>PUB-00012<\/h2>\n<pre><code class=\"language-json\">{&quot;errorCode&quot;:&quot;PUB-00012&quot;,&quot;errorMessage&quot;:&quot;APPKEY\u4e3a\u7a7a&quot;,&quot;errorCodeMsg&quot;:null,&quot;extra&quot;:null,&quot;display&quot;:true,&quot;exception&quot;:null,&quot;reqTime&quot;:0,&quot;costTime&quot;:0,&quot;skipType&quot;:null,&quot;serviceTime&quot;:1722060522,&quot;skipParam&quot;:null,&quot;traceId&quot;:&quot;118-1722060522758&quot;,&quot;showTraceId&quot;:0,&quot;version&quot;:6,&quot;branch&quot;:&quot;mobcb&quot;,&quot;body&quot;:null,&quot;encrypted&quot;:false,&quot;cache&quot;:false}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883 \u5c0f\u7a0b\u5e8f\u540d\u79f0\uff1a\u6b63\u5f18+ \u5fae\u4fe1\u7248\u672c\uff1a3.9.10.19 \u9006\u5411\u5de5\u5177\uff1aWeChatOpenDevTools \u9006\u5411\u5206 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,14,13],"tags":[15],"class_list":["post-241","post","type-post","status-publish","format-standard","hentry","category-javascript","category-js","category-14","category-13","tag-15"],"_links":{"self":[{"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/posts\/241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/comments?post=241"}],"version-history":[{"count":7,"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions"}],"predecessor-version":[{"id":460,"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions\/460"}],"wp:attachment":[{"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/media?parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/categories?post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.94i.top\/index.php\/wp-json\/wp\/v2\/tags?post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}