3v4l.org

run code in 300+ PHP versions simultaneously
<?php $unserialize_str = 'a:2:{s:4:"user";b:1;s:4:"pass";b:"s878926199a";}'; echo unserialize($unserialize_str); $_POST='a:3:{s:8:"username";b:1;s:8:"password";b:0;s:5:"login";s:5:"Login";}'; //$USER="ADMIN"; //$PASS="PASS"; $P=unserialize($_POST); echo $P; if(isset($_POST['login'])) { $user = addslashes($_POST['username']); if(strlen($user)>50) die("用户名长度不能超过50个字符"); $user=urldecode($user); $user_arr=unserialize($user); $pass = addslashes($_POST['password']); $adminpass="!1793422703!"; if($pass==$adminpass){die("请勿攻击admin账户!");} if(md5($pass)==md5($adminpass)){ if($user_arr['user']==$USER && $user_arr['pass']==$PASS) echo "Well done, the key:".$KEY;//KEY隐藏了 else die("用户名错误"); }else{ die("密码错误!"); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 65
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 44
Branch analysis from position: 43
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 64
Branch analysis from position: 52
2 jumps found. (Code = 46) Position 1 = 55, Position 2 = 58
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 62
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 62
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 58
Branch analysis from position: 64
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 65
filename:       /in/A7cZH
function name:  (null)
number of ops:  66
compiled vars:  !0 = $unserialize_str, !1 = $P, !2 = $user, !3 = $user_arr, !4 = $pass, !5 = $adminpass, !6 = $USER, !7 = $PASS, !8 = $KEY
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%3A2%3A%7Bs%3A4%3A%22user%22%3Bb%3A1%3Bs%3A4%3A%22pass%22%3Bb%3A%22s878926199a%22%3B%7D'
    4     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $10     
          4        ECHO                                                     $10
    6     5        FETCH_W                      global              $11     '_POST'
          6        ASSIGN                                                   $11, 'a%3A3%3A%7Bs%3A8%3A%22username%22%3Bb%3A1%3Bs%3A8%3A%22password%22%3Bb%3A0%3Bs%3A5%3A%22login%22%3Bs%3A5%3A%22Login%22%3B%7D'
    9     7        INIT_FCALL                                               'unserialize'
          8        FETCH_R                      global              ~13     '_POST'
          9        SEND_VAL                                                 ~13
         10        DO_ICALL                                         $14     
         11        ASSIGN                                                   !1, $14
   10    12        ECHO                                                     !1
   12    13        FETCH_IS                                         ~16     '_POST'
         14        ISSET_ISEMPTY_DIM_OBJ                         0          ~16, 'login'
         15      > JMPZ                                                     ~17, ->65
   14    16    >   INIT_FCALL                                               'addslashes'
         17        FETCH_R                      global              ~18     '_POST'
         18        FETCH_DIM_R                                      ~19     ~18, 'username'
         19        SEND_VAL                                                 ~19
         20        DO_ICALL                                         $20     
         21        ASSIGN                                                   !2, $20
   15    22        STRLEN                                           ~22     !2
         23        IS_SMALLER                                               50, ~22
         24      > JMPZ                                                     ~23, ->26
   16    25    > > EXIT                                                     '%E7%94%A8%E6%88%B7%E5%90%8D%E9%95%BF%E5%BA%A6%E4%B8%8D%E8%83%BD%E8%B6%85%E8%BF%8750%E4%B8%AA%E5%AD%97%E7%AC%A6'
   18    26    >   INIT_FCALL                                               'urldecode'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $24     
         29        ASSIGN                                                   !2, $24
   19    30        INIT_FCALL                                               'unserialize'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                         $26     
         33        ASSIGN                                                   !3, $26
   21    34        INIT_FCALL                                               'addslashes'
         35        FETCH_R                      global              ~28     '_POST'
         36        FETCH_DIM_R                                      ~29     ~28, 'password'
         37        SEND_VAL                                                 ~29
         38        DO_ICALL                                         $30     
         39        ASSIGN                                                   !4, $30
   22    40        ASSIGN                                                   !5, '%211793422703%21'
   23    41        IS_EQUAL                                                 !4, !5
         42      > JMPZ                                                     ~33, ->44
         43    > > EXIT                                                     '%E8%AF%B7%E5%8B%BF%E6%94%BB%E5%87%BBadmin%E8%B4%A6%E6%88%B7%21'
   25    44    >   INIT_FCALL                                               'md5'
         45        SEND_VAR                                                 !4
         46        DO_ICALL                                         $34     
         47        INIT_FCALL                                               'md5'
         48        SEND_VAR                                                 !5
         49        DO_ICALL                                         $35     
         50        IS_EQUAL                                                 $34, $35
         51      > JMPZ                                                     ~36, ->64
   27    52    >   FETCH_DIM_R                                      ~37     !3, 'user'
         53        IS_EQUAL                                         ~38     !6, ~37
         54      > JMPZ_EX                                          ~38     ~38, ->58
         55    >   FETCH_DIM_R                                      ~39     !3, 'pass'
         56        IS_EQUAL                                         ~40     !7, ~39
         57        BOOL                                             ~38     ~40
         58    > > JMPZ                                                     ~38, ->62
   28    59    >   CONCAT                                           ~41     'Well+done%2C+the+key%3A', !8
         60        ECHO                                                     ~41
         61      > JMP                                                      ->63
   30    62    > > EXIT                                                     '%E7%94%A8%E6%88%B7%E5%90%8D%E9%94%99%E8%AF%AF'
         63    > > JMP                                                      ->65
   32    64    > > EXIT                                                     '%E5%AF%86%E7%A0%81%E9%94%99%E8%AF%AF%21'
   35    65    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.76 ms | 1400 KiB | 21 Q