3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', 1); class TelecomLogin { private $client_type = "#10.4.5#channel50#iPhone 14 Pro#"; // 字符转换函数 private function transNumber($str, $encode = true) { $result = ''; $offset = $encode ? 2 : -2; for ($i = 0; $i < strlen($str); $i++) { $char = $str[$i]; $result .= chr((ord($char) + $offset) & 0xFF); } return $result; } // RSA加密 private function encrypt($str) { $public_key = "-----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBkLT15ThVgz6/NOl6s8GNPofd WzWbCkWnkaAm7O2LjkM1H7dMvzkiqdxU02jamGRHLX/ZNMCXHnPcW/sDhiFCBN18 qFvy8g6VYb9QtroI09e176s+ZCtiv7hbin2cCTj99iUpnEloZm19lwHyo69u5UMi PMpq0/XKBO8lYhN/gwIDAQAB -----END PUBLIC KEY-----"; if (!openssl_public_encrypt($str, $encrypted, $public_key, OPENSSL_PKCS1_PADDING)) { throw new Exception("加密失败: " . openssl_error_string()); } return base64_encode($encrypted); } // 执行登录请求 public function getToken($phonenum, $password) { try { // 生成随机参数 $uuid = str_pad(mt_rand(0, 9999999999999999), 16, '0', STR_PAD_LEFT); $ts = date('YmdHis'); // 构建加密字符串 $enc_str = "iPhone 14 13.2." . substr($uuid, 0, 12) . $phonenum . $ts . $password . "0$$$0."; // 生成请求体 $body = [ 'content' => [ 'fieldData' => [ 'accountType' => '', 'authentication' => $this->transNumber($password), 'deviceUid' => substr($uuid, 0, 16), 'isChinatelecom' => '0', 'loginAuthCipherAsymmertric' => $this->encrypt($enc_str), 'loginType' => '4', 'phoneNum' => $this->transNumber($phonenum), 'systemVersion' => '13.2.3', ], 'attach' => 'test' ], 'headerInfos' => [ 'code' => 'userLoginNormal', 'clientType' => $this->client_type, 'timestamp' => $ts, 'shopId' => '20002', 'source' => '110003', 'sourcePassword' => 'Sid98s', 'userLoginName' => $phonenum ] ]; // 发送请求 $url = 'https://appgologin.189.cn:9031/login/client/userLoginNormal'; $response = $this->curlPost($url, $body); // 解析响应 $result = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) { throw new Exception("JSON解析失败: " . json_last_error_msg() . "\n响应原始内容:\n" . $response); } if (isset($result['responseData']['data']['loginSuccessResult']['token'])) { return $result['responseData']['data']['loginSuccessResult']['token']; } else { // 获取错误信息的正确路径 $errorData = $result['responseData']['data']['loginFailResult'] ?? []; $msg = $errorData['resultDesc'] ?? ($result['responseData']['resultDesc'] ?? '未知错误'); $code = $errorData['resultCode'] ?? ($result['responseData']['resultCode'] ?? '未知状态码'); throw new Exception("登录失败 ($code): $msg"); } } catch (Exception $e) { return $e->getMessage(); // 返回异常信息而不是终止脚本 } } private function curlPost($url, $data) { $headers = [ "Accept: application/json", "Content-Type: application/json; charset=UTF-8", "user-agent: iPhone 14 Pro/9.7.0" ]; $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => $headers, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_TIMEOUT => 15, CURLOPT_VERBOSE => true // 开启详细输出 ]); $response = curl_exec($ch); if ($response === false) { throw new Exception("CURL错误: " . curl_error($ch)); } curl_close($ch); return $response; } } $showResult = false; $isSuccess = false; $resultContent = ''; $phonenum = ''; // 初始化变量 if ($_SERVER['REQUEST_METHOD'] === 'POST') { $phonenum = $_POST['phonenum'] ?? ''; $password = $_POST['password'] ?? ''; $login = new TelecomLogin(); $resultContent = $login->getToken($phonenum, $password); $isSuccess = true; // 假设成功,如果getToken返回异常信息,则在下面修改$isSuccess if (strpos($resultContent, '登录失败') !== false) { $isSuccess = false; } $showResult = true; } ?> <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>电信Token获取</title> <style> body, html { height: 100%; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .card { padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); background: white; width: 100%; max-width: 500px; margin: 2rem auto; } .form-group { margin-bottom: 1.2rem; } input { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 6px; } button { background: #007aff; color: white; width: 100%; padding: 1rem; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; } .result-box { margin-top: 1.5rem; padding: 1rem; border-radius: 6px; } .success, .error { padding: 1rem; border-radius: 6px; } .success { background: #0dffd8; color: #3c763d; border: 1px solid #d6e9c6; } .error { background: #f2dede; color: #a94442; border: 1px solid #ebccd1; } code { display: block; padding: 0.8rem; margin: 0.5rem 0; background: rgba(0,0,0,0.05); border-radius: 4px; word-break: break-all; } /* Centering content */ .container { display: flex; justify-content: center; align-items: center; height: 100%; } </style> </head> <body> <div class="container"> <div class="card"> <h1 style="margin-top:0; text-align:center">电信认证</h1> <form method="post" onsubmit="return validateForm()"> <div class="form-group"> <input type="text" name="phonenum" placeholder="手机号码" required oninput="this.value = this.value.replace(/[^0-9]/g,'')" onkeypress="return isNumber(event)" onpaste="return false" title="请输入11位手机号码" value="<?= htmlspecialchars($phonenum) ?>" maxlength="11"> </div> <div class="form-group"> <input type="password" name="password" placeholder="登录密码" required oninput="this.value = this.value.replace(/[^0-9]/g,'')" onkeypress="return isNumber(event)" onpaste="return false" title="请输入6位密码" maxlength="6"> </div> <button type="submit">获取Token</button> </form> <?php if ($showResult) : ?> <div class="result-box <?= $isSuccess ? 'success' : 'error' ?>"> <strong><?= $isSuccess ? '获取成功:' : '发生异常:' ?></strong> <code><?= htmlspecialchars($resultContent) ?></code> <?php if ($isSuccess) : ?> <small style="display:block; margin-top:0.5rem; opacity:0.8"> Token有效期通常为7天,请妥善保存 </small> <?php endif; ?> </div> <?php endif; ?> <script> function isNumber(evt) { evt = (evt) ? evt : window.event; var charCode = (evt.which) ? evt.which : evt.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) { return false; } return true; } function validateForm() { var phonenum = document.forms[0]["phonenum"].value; var password = document.forms[0]["password"].value; if (phonenum.length !== 11 || !/^\d+$/.test(phonenum)) { alert("手机号码必须为11位数字"); return false; } if (password.length !== 6 || !/^\d+$/.test(password)) { alert("密码必须为6位数字"); return false; } return true; } </script> </div> </div> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 39
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 38
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 67
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 66
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 66
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 66
Branch analysis from position: 65
Branch analysis from position: 66
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
Branch analysis from position: 56
Branch analysis from position: 67
Branch analysis from position: 38
Branch analysis from position: 39
filename:       /in/TCcrv
function name:  (null)
number of ops:  69
compiled vars:  !0 = $showResult, !1 = $isSuccess, !2 = $resultContent, !3 = $phonenum, !4 = $password, !5 = $login
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     30719
          2        DO_ICALL                                                     
    3     3        INIT_FCALL                                                   'ini_set'
          4        SEND_VAL                                                     'display_errors'
          5        SEND_VAL                                                     1
          6        DO_ICALL                                                     
  124     7        ASSIGN                                                       !0, <false>
  125     8        ASSIGN                                                       !1, <false>
  126     9        ASSIGN                                                       !2, ''
  127    10        ASSIGN                                                       !3, ''
  129    11        FETCH_R                          global              ~12     '_SERVER'
         12        FETCH_DIM_R                                          ~13     ~12, 'REQUEST_METHOD'
         13        IS_IDENTICAL                                                 ~13, 'POST'
         14      > JMPZ                                                         ~14, ->39
  130    15    >   FETCH_IS                                             ~15     '_POST'
         16        FETCH_DIM_IS                                         ~16     ~15, 'phonenum'
         17        COALESCE                                             ~17     ~16
         18        QM_ASSIGN                                            ~17     ''
         19        ASSIGN                                                       !3, ~17
  131    20        FETCH_IS                                             ~19     '_POST'
         21        FETCH_DIM_IS                                         ~20     ~19, 'password'
         22        COALESCE                                             ~21     ~20
         23        QM_ASSIGN                                            ~21     ''
         24        ASSIGN                                                       !4, ~21
  133    25        NEW                                                  $23     'TelecomLogin'
         26        DO_FCALL                                          0          
         27        ASSIGN                                                       !5, $23
  134    28        INIT_METHOD_CALL                                             !5, 'getToken'
         29        SEND_VAR_EX                                                  !3
         30        SEND_VAR_EX                                                  !4
         31        DO_FCALL                                          0  $26     
         32        ASSIGN                                                       !2, $26
  135    33        ASSIGN                                                       !1, <true>
  136    34        FRAMELESS_ICALL_2                strpos              ~29     !2, '%E7%99%BB%E5%BD%95%E5%A4%B1%E8%B4%A5'
         35        TYPE_CHECK                                      1018          ~29
         36      > JMPZ                                                         ~30, ->38
  137    37    >   ASSIGN                                                       !1, <false>
  139    38    >   ASSIGN                                                       !0, <true>
  142    39    >   ECHO                                                         '%0A%3C%21DOCTYPE+html%3E%0A%3Chtml+lang%3D%22zh-CN%22%3E%0A%3Chead%3E%0A++++%3Cmeta+charset%3D%22UTF-8%22%3E%0A++++%3Cmeta+name%3D%22viewport%22+content%3D%22width%3Ddevice-width%2C+initial-scale%3D1.0%22%3E%0A++++%3Ctitle%3E%E7%94%B5%E4%BF%A1Token%E8%8E%B7%E5%8F%96%3C%2Ftitle%3E%0A++++%3Cstyle%3E%0A++++++++body%2C+html+%7B%0A++++++++++++height%3A+100%25%3B%0A++++++++++++margin%3A+0%3B%0A++++++++++++padding%3A+0%3B%0A++++++++++++font-family%3A+-apple-system%2C+BlinkMacSystemFont%2C+%22Segoe+UI%22%2C+Roboto%2C+sans-serif%3B%0A++++++++%7D%0A++++++++.card+%7B%0A++++++++++++padding%3A+1.5rem%3B%0A++++++++++++border-radius%3A+8px%3B%0A++++++++++++box-shadow%3A+0+2px+8px+rgba%280%2C0%2C0%2C0.1%29%3B%0A++++++++++++background%3A+white%3B%0A++++++++++++width%3A+100%25%3B%0A++++++++++++max-width%3A+500px%3B%0A++++++++++++margin%3A+2rem+auto%3B%0A++++++++%7D%0A++++++++.form-group+%7B%0A++++++++++++margin-bottom%3A+1.2rem%3B%0A++++++++%7D%0A++++++++input+%7B%0A++++++++++++width%3A+100%25%3B%0A++++++++++++padding%3A+0.8rem%3B%0A++++++++++++border%3A+1px+solid+%23ddd%3B%0A++++++++++++border-radius%3A+6px%3B%0A++++++++%7D%0A++++++++button+%7B%0A++++++++++++background%3A+%23007aff%3B%0A++++++++++++color%3A+white%3B%0A++++++++++++width%3A+100%25%3B%0A++++++++++++padding%3A+1rem%3B%0A++++++++++++border%3A+none%3B%0A++++++++++++border-radius%3A+6px%3B%0A++++++++++++font-size%3A+1rem%3B%0A++++++++++++cursor%3A+pointer%3B%0A++++++++%7D%0A++++++++.result-box+%7B%0A++++++++++++margin-top%3A+1.5rem%3B%0A++++++++++++padding%3A+1rem%3B%0A++++++++++++border-radius%3A+6px%3B%0A++++++++%7D%0A++++++++.success%2C+.error+%7B%0A++++++++++++padding%3A+1rem%3B%0A++++++++++++border-radius%3A+6px%3B%0A++++++++%7D%0A++++++++.success+%7B%0A++++++++++++background%3A+%230dffd8%3B%0A++++++++++++color%3A+%233c763d%3B%0A++++++++++++border%3A+1px+solid+%23d6e9c6%3B%0A++++++++%7D%0A++++++++.error+%7B%0A++++++++++++background%3A+%23f2dede%3B%0A++++++++++++color%3A+%23a94442%3B%0A++++++++++++border%3A+1px+solid+%23ebccd1%3B%0A++++++++%7D%0A++++++++code+%7B%0A++++++++++++display%3A+block%3B%0A++++++++++++padding%3A+0.8rem%3B%0A++++++++++++margin%3A+0.5rem+0%3B%0A++++++++++++background%3A+rgba%280%2C0%2C0%2C0.05%29%3B%0A++++++++++++border-radius%3A+4px%3B%0A++++++++++++word-break%3A+break-all%3B%0A++++++++%7D%0A++++++++%2F%2A+Centering+content+%2A%2F%0A++++++++.container+%7B%0A++++++++++++display%3A+flex%3B%0A++++++++++++justify-content%3A+center%3B%0A++++++++++++align-items%3A+center%3B%0A++++++++++++height%3A+100%25%3B%0A++++++++%7D%0A++++%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A++++%3Cdiv+class%3D%22container%22%3E%0A++++++++%3Cdiv+class%3D%22card%22%3E%0A++++++++++++%3Ch1+style%3D%22margin-top%3A0%3B+text-align%3Acenter%22%3E%E7%94%B5%E4%BF%A1%E8%AE%A4%E8%AF%81%3C%2Fh1%3E%0A++++++++++++%0A++++++++++++%3Cform+method%3D%22post%22+onsubmit%3D%22return+validateForm%28%29%22%3E%0A++++++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++++++++%3Cinput+type%3D%22text%22+name%3D%22phonenum%22+placeholder%3D%22%E6%89%8B%E6%9C%BA%E5%8F%B7%E7%A0%81%22+required%0A+++++++++++++++++++++++++++oninput%3D%22this.value+%3D+this.value.replace%28%2F%5B%5E0-9%5D%2Fg%2C%27%27%29%22%0A+++++++++++++++++++++++++++onkeypress%3D%22return+isNumber%28event%29%22%0A+++++++++++++++++++++++++++onpaste%3D%22return+false%22%0A+++++++++++++++++++++++++++title%3D%22%E8%AF%B7%E8%BE%93%E5%85%A511%E4%BD%8D%E6%89%8B%E6%9C%BA%E5%8F%B7%E7%A0%81%22%0A+++++++++++++++++++++++++++value%3D%22'
  232    40        INIT_FCALL                                                   'htmlspecialchars'
         41        SEND_VAR                                                     !3
         42        DO_ICALL                                             $33     
         43        ECHO                                                         $33
         44        ECHO                                                         '%22+maxlength%3D%2211%22%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%0A++++++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++++++++%3Cinput+type%3D%22password%22+name%3D%22password%22+placeholder%3D%22%E7%99%BB%E5%BD%95%E5%AF%86%E7%A0%81%22+required%0A+++++++++++++++++++++++++++oninput%3D%22this.value+%3D+this.value.replace%28%2F%5B%5E0-9%5D%2Fg%2C%27%27%29%22%0A+++++++++++++++++++++++++++onkeypress%3D%22return+isNumber%28event%29%22%0A+++++++++++++++++++++++++++onpaste%3D%22return+false%22%0A+++++++++++++++++++++++++++title%3D%22%E8%AF%B7%E8%BE%93%E5%85%A56%E4%BD%8D%E5%AF%86%E7%A0%81%22%0A+++++++++++++++++++++++++++maxlength%3D%226%22%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%0A++++++++++++++++%3Cbutton+type%3D%22submit%22%3E%E8%8E%B7%E5%8F%96Token%3C%2Fbutton%3E%0A++++++++++++%3C%2Fform%3E%0A%0A++++++++++++'
  247    45      > JMPZ                                                         !0, ->67
  248    46    >   ECHO                                                         '++++++++++++%3Cdiv+class%3D%22result-box+'
         47      > JMPZ                                                         !1, ->50
         48    >   QM_ASSIGN                                            ~34     'success'
         49      > JMP                                                          ->51
         50    >   QM_ASSIGN                                            ~34     'error'
         51    >   ECHO                                                         ~34
         52        ECHO                                                         '%22%3E%0A++++++++++++++++%3Cstrong%3E'
  249    53      > JMPZ                                                         !1, ->56
         54    >   QM_ASSIGN                                            ~35     '%E8%8E%B7%E5%8F%96%E6%88%90%E5%8A%9F%EF%BC%9A'
         55      > JMP                                                          ->57
         56    >   QM_ASSIGN                                            ~35     '%E5%8F%91%E7%94%9F%E5%BC%82%E5%B8%B8%EF%BC%9A'
         57    >   ECHO                                                         ~35
         58        ECHO                                                         '%3C%2Fstrong%3E%0A++++++++++++++++%3Ccode%3E'
  250    59        INIT_FCALL                                                   'htmlspecialchars'
         60        SEND_VAR                                                     !2
         61        DO_ICALL                                             $36     
         62        ECHO                                                         $36
         63        ECHO                                                         '%3C%2Fcode%3E%0A++++++++++++++++'
  251    64      > JMPZ                                                         !1, ->66
  252    65    >   ECHO                                                         '++++++++++++++++++++%3Csmall+style%3D%22display%3Ablock%3B+margin-top%3A0.5rem%3B+opacity%3A0.8%22%3E%0A++++++++++++++++++++++++Token%E6%9C%89%E6%95%88%E6%9C%9F%E9%80%9A%E5%B8%B8%E4%B8%BA7%E5%A4%A9%EF%BC%8C%E8%AF%B7%E5%A6%A5%E5%96%84%E4%BF%9D%E5%AD%98%0A++++++++++++++++++++%3C%2Fsmall%3E%0A++++++++++++++++'
  256    66    >   ECHO                                                         '++++++++++++%3C%2Fdiv%3E%0A++++++++++++'
  258    67    >   ECHO                                                         '%0A++++++++++++%3Cscript%3E%0A++++++++++++++++function+isNumber%28evt%29+%7B%0A++++++++++++++++++++evt+%3D+%28evt%29+%3F+evt+%3A+window.event%3B%0A++++++++++++++++++++var+charCode+%3D+%28evt.which%29+%3F+evt.which+%3A+evt.keyCode%3B%0A++++++++++++++++++++if+%28charCode+%3E+31+%26%26+%28charCode+%3C+48+%7C%7C+charCode+%3E+57%29%29+%7B%0A++++++++++++++++++++++++return+false%3B%0A++++++++++++++++++++%7D%0A++++++++++++++++++++return+true%3B%0A++++++++++++++++%7D%0A%0A++++++++++++++++function+validateForm%28%29+%7B%0A++++++++++++++++++++var+phonenum+%3D+document.forms%5B0%5D%5B%22phonenum%22%5D.value%3B%0A++++++++++++++++++++var+password+%3D+document.forms%5B0%5D%5B%22password%22%5D.value%3B%0A%0A++++++++++++++++++++if+%28phonenum.length+%21%3D%3D+11+%7C%7C+%21%2F%5E%5Cd%2B%24%2F.test%28phonenum%29%29+%7B%0A++++++++++++++++++++++++alert%28%22%E6%89%8B%E6%9C%BA%E5%8F%B7%E7%A0%81%E5%BF%85%E9%A1%BB%E4%B8%BA11%E4%BD%8D%E6%95%B0%E5%AD%97%22%29%3B%0A++++++++++++++++++++++++return+false%3B%0A++++++++++++++++++++%7D%0A%0A++++++++++++++++++++if+%28password.length+%21%3D%3D+6+%7C%7C+%21%2F%5E%5Cd%2B%24%2F.test%28password%29%29+%7B%0A++++++++++++++++++++++++alert%28%22%E5%AF%86%E7%A0%81%E5%BF%85%E9%A1%BB%E4%B8%BA6%E4%BD%8D%E6%95%B0%E5%AD%97%22%29%3B%0A++++++++++++++++++++++++return+false%3B%0A++++++++++++++++++++%7D%0A%0A++++++++++++++++++++return+true%3B%0A++++++++++++++++%7D%0A++++++++++++%3C%2Fscript%3E%0A++++++++%3C%2Fdiv%3E%0A++++%3C%2Fdiv%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  289    68      > RETURN                                                       1

Class TelecomLogin:
Function transnumber:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
Branch analysis from position: 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
filename:       /in/TCcrv
function name:  transNumber
number of ops:  27
compiled vars:  !0 = $str, !1 = $encode, !2 = $result, !3 = $offset, !4 = $i, !5 = $char
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      <true>
   10     2        ASSIGN                                                       !2, ''
   11     3      > JMPZ                                                         !1, ->6
          4    >   QM_ASSIGN                                            ~7      2
          5      > JMP                                                          ->7
          6    >   QM_ASSIGN                                            ~7      -2
          7    >   ASSIGN                                                       !3, ~7
   12     8        ASSIGN                                                       !4, 0
          9      > JMP                                                          ->22
   13    10    >   FETCH_DIM_R                                          ~10     !0, !4
         11        ASSIGN                                                       !5, ~10
   14    12        INIT_FCALL                                                   'chr'
         13        INIT_FCALL                                                   'ord'
         14        SEND_VAR                                                     !5
         15        DO_ICALL                                             $12     
         16        ADD                                                  ~13     $12, !3
         17        BW_AND                                               ~14     ~13, 255
         18        SEND_VAL                                                     ~14
         19        DO_ICALL                                             $15     
         20        ASSIGN_OP                                         8          !2, $15
   12    21        PRE_INC                                                      !4
         22    >   STRLEN                                               ~18     !0
         23        IS_SMALLER                                                   !4, ~18
         24      > JMPNZ                                                        ~19, ->10
   16    25    > > RETURN                                                       !2
   17    26*     > RETURN                                                       null

End of function transnumber

Function encrypt:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TCcrv
function name:  encrypt
number of ops:  23
compiled vars:  !0 = $str, !1 = $public_key, !2 = $encrypted
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   RECV                                                 !0      
   21     1        ASSIGN                                                       !1, '-----BEGIN+PUBLIC+KEY-----%0AMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBkLT15ThVgz6%2FNOl6s8GNPofd%0AWzWbCkWnkaAm7O2LjkM1H7dMvzkiqdxU02jamGRHLX%2FZNMCXHnPcW%2FsDhiFCBN18%0AqFvy8g6VYb9QtroI09e176s%2BZCtiv7hbin2cCTj99iUpnEloZm19lwHyo69u5UMi%0APMpq0%2FXKBO8lYhN%2FgwIDAQAB%0A-----END+PUBLIC+KEY-----'
   28     2        INIT_FCALL_BY_NAME                                           'openssl_public_encrypt'
          3        SEND_VAR_EX                                                  !0
          4        SEND_VAR_EX                                                  !2
          5        SEND_VAR_EX                                                  !1
          6        FETCH_CONSTANT                                       ~4      'OPENSSL_PKCS1_PADDING'
          7        SEND_VAL_EX                                                  ~4
          8        DO_FCALL                                          0  $5      
          9        BOOL_NOT                                             ~6      $5
         10      > JMPZ                                                         ~6, ->18
   29    11    >   NEW                                                  $7      'Exception'
         12        INIT_FCALL_BY_NAME                                           'openssl_error_string'
         13        DO_FCALL                                          0  $8      
         14        CONCAT                                               ~9      '%E5%8A%A0%E5%AF%86%E5%A4%B1%E8%B4%A5%3A+', $8
         15        SEND_VAL_EX                                                  ~9
         16        DO_FCALL                                          0          
         17      > THROW                                             0          $7
   31    18    >   INIT_FCALL                                                   'base64_encode'
         19        SEND_VAR                                                     !2
         20        DO_ICALL                                             $11     
         21      > RETURN                                                       $11
   32    22*     > RETURN                                                       null

End of function encrypt

Function gettoken:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 81
Branch analysis from position: 72
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 86, Position 2 = 92
Branch analysis from position: 86
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 92
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 123
Branch analysis from position: 123
2 jumps found. (Code = 107) Position 1 = 124, Position 2 = -2
Branch analysis from position: 124
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TCcrv
function name:  getToken
number of ops:  128
compiled vars:  !0 = $phonenum, !1 = $password, !2 = $uuid, !3 = $ts, !4 = $enc_str, !5 = $body, !6 = $url, !7 = $response, !8 = $result, !9 = $errorData, !10 = $msg, !11 = $code, !12 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   35     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   38     2        INIT_FCALL                                                   'str_pad'
          3        INIT_FCALL                                                   'mt_rand'
          4        SEND_VAL                                                     0
          5        SEND_VAL                                                     9999999999999999
          6        DO_ICALL                                             $13     
          7        SEND_VAR                                                     $13
          8        SEND_VAL                                                     16
          9        SEND_VAL                                                     '0'
         10        SEND_VAL                                                     0
         11        DO_ICALL                                             $14     
         12        ASSIGN                                                       !2, $14
   39    13        INIT_FCALL                                                   'date'
         14        SEND_VAL                                                     'YmdHis'
         15        DO_ICALL                                             $16     
         16        ASSIGN                                                       !3, $16
   42    17        FRAMELESS_ICALL_3                substr              ~18     !2, 0
         18        OP_DATA                                                      12
         19        CONCAT                                               ~19     'iPhone+14+13.2.', ~18
         20        CONCAT                                               ~20     ~19, !0
         21        CONCAT                                               ~21     ~20, !3
         22        CONCAT                                               ~22     ~21, !1
         23        CONCAT                                               ~23     ~22, '0%24%24%240.'
         24        ASSIGN                                                       !4, ~23
   48    25        INIT_ARRAY                                           ~25     '', 'accountType'
   49    26        INIT_METHOD_CALL                                             'transNumber'
         27        SEND_VAR                                                     !1
         28        DO_FCALL                                          0  $26     
         29        ADD_ARRAY_ELEMENT                                    ~25     $26, 'authentication'
   50    30        FRAMELESS_ICALL_3                substr              ~27     !2, 0
         31        OP_DATA                                                      16
         32        ADD_ARRAY_ELEMENT                                    ~25     ~27, 'deviceUid'
   51    33        ADD_ARRAY_ELEMENT                                    ~25     '0', 'isChinatelecom'
   52    34        INIT_METHOD_CALL                                             'encrypt'
         35        SEND_VAR                                                     !4
         36        DO_FCALL                                          0  $28     
         37        ADD_ARRAY_ELEMENT                                    ~25     $28, 'loginAuthCipherAsymmertric'
   53    38        ADD_ARRAY_ELEMENT                                    ~25     '4', 'loginType'
   54    39        INIT_METHOD_CALL                                             'transNumber'
         40        SEND_VAR                                                     !0
         41        DO_FCALL                                          0  $29     
         42        ADD_ARRAY_ELEMENT                                    ~25     $29, 'phoneNum'
   55    43        ADD_ARRAY_ELEMENT                                    ~25     '13.2.3', 'systemVersion'
         44        INIT_ARRAY                                           ~30     ~25, 'fieldData'
   57    45        ADD_ARRAY_ELEMENT                                    ~30     'test', 'attach'
         46        INIT_ARRAY                                           ~31     ~30, 'content'
   60    47        INIT_ARRAY                                           ~32     'userLoginNormal', 'code'
   61    48        FETCH_OBJ_R                                          ~33     'client_type'
         49        ADD_ARRAY_ELEMENT                                    ~32     ~33, 'clientType'
   62    50        ADD_ARRAY_ELEMENT                                    ~32     !3, 'timestamp'
   63    51        ADD_ARRAY_ELEMENT                                    ~32     '20002', 'shopId'
   64    52        ADD_ARRAY_ELEMENT                                    ~32     '110003', 'source'
   65    53        ADD_ARRAY_ELEMENT                                    ~32     'Sid98s', 'sourcePassword'
   66    54        ADD_ARRAY_ELEMENT                                    ~32     !0, 'userLoginName'
         55        ADD_ARRAY_ELEMENT                                    ~31     ~32, 'headerInfos'
   45    56        ASSIGN                                                       !5, ~31
   71    57        ASSIGN                                                       !6, 'https%3A%2F%2Fappgologin.189.cn%3A9031%2Flogin%2Fclient%2FuserLoginNormal'
   72    58        INIT_METHOD_CALL                                             'curlPost'
         59        SEND_VAR_EX                                                  !6
         60        SEND_VAR_EX                                                  !5
         61        DO_FCALL                                          0  $36     
         62        ASSIGN                                                       !7, $36
   75    63        INIT_FCALL                                                   'json_decode'
         64        SEND_VAR                                                     !7
         65        SEND_VAL                                                     <true>
         66        DO_ICALL                                             $38     
         67        ASSIGN                                                       !8, $38
   76    68        INIT_FCALL                                                   'json_last_error'
         69        DO_ICALL                                             $40     
         70        IS_NOT_IDENTICAL                                             $40, 0
         71      > JMPZ                                                         ~41, ->81
   77    72    >   NEW                                                  $42     'Exception'
         73        INIT_FCALL                                                   'json_last_error_msg'
         74        DO_ICALL                                             $43     
         75        CONCAT                                               ~44     'JSON%E8%A7%A3%E6%9E%90%E5%A4%B1%E8%B4%A5%3A+', $43
         76        CONCAT                                               ~45     ~44, '%0A%E5%93%8D%E5%BA%94%E5%8E%9F%E5%A7%8B%E5%86%85%E5%AE%B9%3A%0A'
         77        CONCAT                                               ~46     ~45, !7
         78        SEND_VAL_EX                                                  ~46
         79        DO_FCALL                                          0          
         80      > THROW                                             0          $42
   80    81    >   FETCH_DIM_IS                                         ~48     !8, 'responseData'
         82        FETCH_DIM_IS                                         ~49     ~48, 'data'
         83        FETCH_DIM_IS                                         ~50     ~49, 'loginSuccessResult'
         84        ISSET_ISEMPTY_DIM_OBJ                             0          ~50, 'token'
         85      > JMPZ                                                         ~51, ->92
   81    86    >   FETCH_DIM_R                                          ~52     !8, 'responseData'
         87        FETCH_DIM_R                                          ~53     ~52, 'data'
         88        FETCH_DIM_R                                          ~54     ~53, 'loginSuccessResult'
         89        FETCH_DIM_R                                          ~55     ~54, 'token'
         90      > RETURN                                                       ~55
   80    91*       JMP                                                          ->122
   84    92    >   FETCH_DIM_IS                                         ~56     !8, 'responseData'
         93        FETCH_DIM_IS                                         ~57     ~56, 'data'
         94        FETCH_DIM_IS                                         ~58     ~57, 'loginFailResult'
         95        COALESCE                                             ~59     ~58
         96        QM_ASSIGN                                            ~59     <array>
         97        ASSIGN                                                       !9, ~59
   85    98        FETCH_DIM_IS                                         ~61     !9, 'resultDesc'
         99        COALESCE                                             ~62     ~61
        100        FETCH_DIM_IS                                         ~63     !8, 'responseData'
        101        FETCH_DIM_IS                                         ~64     ~63, 'resultDesc'
        102        COALESCE                                             ~65     ~64
        103        QM_ASSIGN                                            ~65     '%E6%9C%AA%E7%9F%A5%E9%94%99%E8%AF%AF'
        104        QM_ASSIGN                                            ~62     ~65
        105        ASSIGN                                                       !10, ~62
   86   106        FETCH_DIM_IS                                         ~67     !9, 'resultCode'
        107        COALESCE                                             ~68     ~67
        108        FETCH_DIM_IS                                         ~69     !8, 'responseData'
        109        FETCH_DIM_IS                                         ~70     ~69, 'resultCode'
        110        COALESCE                                             ~71     ~70
        111        QM_ASSIGN                                            ~71     '%E6%9C%AA%E7%9F%A5%E7%8A%B6%E6%80%81%E7%A0%81'
        112        QM_ASSIGN                                            ~68     ~71
        113        ASSIGN                                                       !11, ~68
   87   114        NEW                                                  $73     'Exception'
        115        ROPE_INIT                                         4  ~75     '%E7%99%BB%E5%BD%95%E5%A4%B1%E8%B4%A5+%28'
        116        ROPE_ADD                                          1  ~75     ~75, !11
        117        ROPE_ADD                                          2  ~75     ~75, '%29%3A+'
        118        ROPE_END                                          3  ~74     ~75, !10
        119        SEND_VAL_EX                                                  ~74
        120        DO_FCALL                   

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.44 ms | 1809 KiB | 25 Q