3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); if(@$_GET['password'] && intval(@$_GET['password'])===1){ $step1=FALSE; $step2=FALSE; $step3=FALSE; include("flag.php"); $db = new SQLite3('access.db'); $result = $db->query('SELECT * FROM USERS WHERE password="'.$_GET['password'].'"'); if($result->fetchArray()) $step1=true; $result = $db->query('SELECT * FROM USERS WHERE password=\''.$_GET['password'].'\''); if($result->fetchArray()) $step2=true; $result = $db->query('SELECT * FROM USERS WHERE password='.$_GET['password']); if($result->fetchArray()) $step3=true; if($step1 && $step1 && $step3) echo "<pre>".$flag."</pre>"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 67
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 48
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 59
Branch analysis from position: 58
2 jumps found. (Code = 46) Position 1 = 60, Position 2 = 61
Branch analysis from position: 60
2 jumps found. (Code = 46) Position 1 = 62, Position 2 = 63
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 67
Branch analysis from position: 64
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 67
Branch analysis from position: 63
Branch analysis from position: 61
Branch analysis from position: 59
Branch analysis from position: 48
Branch analysis from position: 36
Branch analysis from position: 67
Branch analysis from position: 15
filename:       /in/tuNMV
function name:  (null)
number of ops:  68
compiled vars:  !0 = $step1, !1 = $step2, !2 = $step3, !3 = $db, !4 = $result, !5 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    5     3        BEGIN_SILENCE                                    ~7      
          4        FETCH_R                      global              ~8      '_GET'
          5        FETCH_DIM_R                                      ~9      ~8, 'password'
          6        END_SILENCE                                              ~7
          7      > JMPZ_EX                                          ~9      ~9, ->15
          8    >   BEGIN_SILENCE                                    ~10     
          9        FETCH_R                      global              ~11     '_GET'
         10        FETCH_DIM_R                                      ~12     ~11, 'password'
         11        END_SILENCE                                              ~10
         12        CAST                                          4  ~13     ~12
         13        IS_IDENTICAL                                     ~14     ~13, 1
         14        BOOL                                             ~9      ~14
         15    > > JMPZ                                                     ~9, ->67
    6    16    >   ASSIGN                                                   !0, <false>
    7    17        ASSIGN                                                   !1, <false>
    8    18        ASSIGN                                                   !2, <false>
    9    19        INCLUDE_OR_EVAL                                          'flag.php', INCLUDE
   11    20        NEW                                              $19     'SQLite3'
         21        SEND_VAL_EX                                              'access.db'
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !3, $19
   13    24        INIT_METHOD_CALL                                         !3, 'query'
         25        FETCH_R                      global              ~22     '_GET'
         26        FETCH_DIM_R                                      ~23     ~22, 'password'
         27        CONCAT                                           ~24     'SELECT+%2A+FROM+USERS+WHERE+password%3D%22', ~23
         28        CONCAT                                           ~25     ~24, '%22'
         29        SEND_VAL_EX                                              ~25
         30        DO_FCALL                                      0  $26     
         31        ASSIGN                                                   !4, $26
   14    32        INIT_METHOD_CALL                                         !4, 'fetchArray'
         33        DO_FCALL                                      0  $28     
         34      > JMPZ                                                     $28, ->36
         35    >   ASSIGN                                                   !0, <true>
   16    36    >   INIT_METHOD_CALL                                         !3, 'query'
         37        FETCH_R                      global              ~30     '_GET'
         38        FETCH_DIM_R                                      ~31     ~30, 'password'
         39        CONCAT                                           ~32     'SELECT+%2A+FROM+USERS+WHERE+password%3D%27', ~31
         40        CONCAT                                           ~33     ~32, '%27'
         41        SEND_VAL_EX                                              ~33
         42        DO_FCALL                                      0  $34     
         43        ASSIGN                                                   !4, $34
   17    44        INIT_METHOD_CALL                                         !4, 'fetchArray'
         45        DO_FCALL                                      0  $36     
         46      > JMPZ                                                     $36, ->48
         47    >   ASSIGN                                                   !1, <true>
   19    48    >   INIT_METHOD_CALL                                         !3, 'query'
         49        FETCH_R                      global              ~38     '_GET'
         50        FETCH_DIM_R                                      ~39     ~38, 'password'
         51        CONCAT                                           ~40     'SELECT+%2A+FROM+USERS+WHERE+password%3D', ~39
         52        SEND_VAL_EX                                              ~40
         53        DO_FCALL                                      0  $41     
         54        ASSIGN                                                   !4, $41
   20    55        INIT_METHOD_CALL                                         !4, 'fetchArray'
         56        DO_FCALL                                      0  $43     
         57      > JMPZ                                                     $43, ->59
         58    >   ASSIGN                                                   !2, <true>
   22    59    > > JMPZ_EX                                          ~45     !0, ->61
         60    >   BOOL                                             ~45     !0
         61    > > JMPZ_EX                                          ~45     ~45, ->63
         62    >   BOOL                                             ~45     !2
         63    > > JMPZ                                                     ~45, ->67
         64    >   CONCAT                                           ~46     '%3Cpre%3E', !5
         65        CONCAT                                           ~47     ~46, '%3C%2Fpre%3E'
         66        ECHO                                                     ~47
   24    67    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.12 ms | 1400 KiB | 15 Q