42.193.134.62
的数据包。参数 | 描述 |
Signature | Signature 结合了“添加规则”中填写的 Token 参数和请求中的 Timestamp 参数、Nonce 参数 |
Timestamp | 时间戳 |
Nonce | 随机数 |
private function checkSignature(){$signature = $_GET["signature"];$timestamp = $_GET["timestamp"];$nonce = $_GET["nonce"];$token = TOKEN;$tmpArr = array($token, $timestamp, $nonce);sort($tmpArr, SORT_STRING);$tmpStr = implode( $tmpArr );$tmpStr = sha1( $tmpStr );if( $tmpStr == $signature ){return true;}else{return false;}}
Nonce: IkOaKMDalrAzUTxCSignature: c259ed29ec13ba7c649fe0893007401a36e70453Timestamp: 1604458421
1604458421IkOaKMDalrAzUTxCaaa
,最终计算 sha1 结果为 c259ed29ec13ba7c649fe0893007401a36e70453
。参数 | 描述 |
Signature | Signature 结合了“添加规则”中填写的 Token 参数和请求中的 Timestamp 参数、Nonce 参数 |
Timestamp | 时间戳 |
Nonce | 随机数 |
Echostr | 随机字符串 |
GET / HTTP/1.1Host: **.**.**.**:4443User-Agent: Go-http-client/1.1Content-Type: application/jsonEchostr: UPWIAFASvDUFcTEENonce: testranceSignature: abb6c316a8134596d825c5a1295bfa6f7657664dTimestamp: 1623149590Accept-Encoding: gzip
HTTP/1.1 200 OKDate: Tue, 08 Jun 2021 10:53:10 GMTContent-Length: 16Content-Type: text/plain; charset=utf-8UPWIAFASvDUFcTEE
本页内容是否解决了您的问题?