3v4l.org

run code in 300+ PHP versions simultaneously
<?php $unserialize_str = 'a:2:{s:4:"user";b:1;s:4:"pass";b:"s878926199a";}'; $u=unserialize($unserialize_str); echo $u; $_POST='a:3:{s:8:"username";b:1;s:8:"password";b:s878926199a;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 = 17, Position 2 = 66
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 45
Branch analysis from position: 44
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 65
Branch analysis from position: 53
2 jumps found. (Code = 46) Position 1 = 56, Position 2 = 59
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 63
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 59
Branch analysis from position: 65
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 66
filename:       /in/niafh
function name:  (null)
number of ops:  67
compiled vars:  !0 = $unserialize_str, !1 = $u, !2 = $P, !3 = $user, !4 = $user_arr, !5 = $pass, !6 = $adminpass, !7 = $USER, !8 = $PASS, !9 = $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'
    3     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $11     
          4        ASSIGN                                                   !1, $11
    4     5        ECHO                                                     !1
    6     6        FETCH_W                      global              $13     '_POST'
          7        ASSIGN                                                   $13, 'a%3A3%3A%7Bs%3A8%3A%22username%22%3Bb%3A1%3Bs%3A8%3A%22password%22%3Bb%3As878926199a%3Bs%3A5%3A%22login%22%3Bs%3A5%3A%22Login%22%3B%7D'
    9     8        INIT_FCALL                                               'unserialize'
          9        FETCH_R                      global              ~15     '_POST'
         10        SEND_VAL                                                 ~15
         11        DO_ICALL                                         $16     
         12        ASSIGN                                                   !2, $16
   10    13        ECHO                                                     !2
   12    14        FETCH_IS                                         ~18     '_POST'
         15        ISSET_ISEMPTY_DIM_OBJ                         0          ~18, 'login'
         16      > JMPZ                                                     ~19, ->66
   14    17    >   INIT_FCALL                                               'addslashes'
         18        FETCH_R                      global              ~20     '_POST'
         19        FETCH_DIM_R                                      ~21     ~20, 'username'
         20        SEND_VAL                                                 ~21
         21        DO_ICALL                                         $22     
         22        ASSIGN                                                   !3, $22
   15    23        STRLEN                                           ~24     !3
         24        IS_SMALLER                                               50, ~24
         25      > JMPZ                                                     ~25, ->27
   16    26    > > 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    27    >   INIT_FCALL                                               'urldecode'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $26     
         30        ASSIGN                                                   !3, $26
   19    31        INIT_FCALL                                               'unserialize'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                         $28     
         34        ASSIGN                                                   !4, $28
   21    35        INIT_FCALL                                               'addslashes'
         36        FETCH_R                      global              ~30     '_POST'
         37        FETCH_DIM_R                                      ~31     ~30, 'password'
         38        SEND_VAL                                                 ~31
         39        DO_ICALL                                         $32     
         40        ASSIGN                                                   !5, $32
   22    41        ASSIGN                                                   !6, '%211793422703%21'
   23    42        IS_EQUAL                                                 !5, !6
         43      > JMPZ                                                     ~35, ->45
         44    > > EXIT                                                     '%E8%AF%B7%E5%8B%BF%E6%94%BB%E5%87%BBadmin%E8%B4%A6%E6%88%B7%21'
   25    45    >   INIT_FCALL                                               'md5'
         46        SEND_VAR                                                 !5
         47        DO_ICALL                                         $36     
         48        INIT_FCALL                                               'md5'
         49        SEND_VAR                                                 !6
         50        DO_ICALL                                         $37     
         51        IS_EQUAL                                                 $36, $37
         52      > JMPZ                                                     ~38, ->65
   27    53    >   FETCH_DIM_R                                      ~39     !4, 'user'
         54        IS_EQUAL                                         ~40     !7, ~39
         55      > JMPZ_EX                                          ~40     ~40, ->59
         56    >   FETCH_DIM_R                                      ~41     !4, 'pass'
         57        IS_EQUAL                                         ~42     !8, ~41
         58        BOOL                                             ~40     ~42
         59    > > JMPZ                                                     ~40, ->63
   28    60    >   CONCAT                                           ~43     'Well+done%2C+the+key%3A', !9
         61        ECHO                                                     ~43
   27    62      > JMP                                                      ->64
   30    63    > > EXIT                                                     '%E7%94%A8%E6%88%B7%E5%90%8D%E9%94%99%E8%AF%AF'
   25    64    > > JMP                                                      ->66
   32    65    > > EXIT                                                     '%E5%AF%86%E7%A0%81%E9%94%99%E8%AF%AF%21'
   35    66    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
245.57 ms | 1010 KiB | 17 Q