3v4l.org

run code in 300+ PHP versions simultaneously
<?php $admin_password = "admin"; // senha da área de administração (/admin) $mysql_hostname = "localhost"; // servidor MySQL $mysql_user = "root"; // usuário MySQL $mysql_password = ""; // senha MySQL $mysql_database = "bookface"; // banco de dados MySQL $prefix = ""; // prefixo das tabelas (desnecessário) // não configure aqui $installed = true; // $env = $_SERVER['QUERY_STRING']; $naofaz = Array("order", "concat", "union", "ORDER", "CONCAT", "UNION", "select", "SELECT", "drop", "DROP"); $env = str_replace($naofaz, "%SQLI", $env); if(strpos($env, "%SQLI")!=false OR @mysql_error()!=null) { die('<script> location.href="about:blank"; </script>'); } $bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database"); mysql_select_db($mysql_database, $bd) or die("Could not select database"); $con = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database"); mysql_select_db($mysql_database, $con) or die("Could not select database"); $conn = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database"); mysql_select_db($mysql_database, $conn) or die("Could not select database"); $link = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database"); mysql_select_db($mysql_database, $link) or die("Could not select database"); $db = mysql_select_db($mysql_database) or die("Could not select database"); if($installed==false) { die("<script> location.href='install/'; </script>"); } if(is_dir("install") AND $installed==true) { die("Exclua o diretório \"install\" para continuar."); } if(!is_writable("uploadedimage")) { die("Falta CHMOD 777 em \"uploadedimage\""); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 47) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 40
2 jumps found. (Code = 47) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 47
2 jumps found. (Code = 47) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 56
2 jumps found. (Code = 47) Position 1 = 61, Position 2 = 63
Branch analysis from position: 61
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 63
2 jumps found. (Code = 47) Position 1 = 70, Position 2 = 72
Branch analysis from position: 70
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 72
2 jumps found. (Code = 47) Position 1 = 77, Position 2 = 79
Branch analysis from position: 77
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 79
2 jumps found. (Code = 47) Position 1 = 86, Position 2 = 88
Branch analysis from position: 86
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 88
2 jumps found. (Code = 47) Position 1 = 93, Position 2 = 95
Branch analysis from position: 93
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 95
2 jumps found. (Code = 47) Position 1 = 100, Position 2 = 102
Branch analysis from position: 100
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 104, Position 2 = 105
Branch analysis from position: 104
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 105
2 jumps found. (Code = 46) Position 1 = 109, Position 2 = 111
Branch analysis from position: 109
2 jumps found. (Code = 43) Position 1 = 112, Position 2 = 113
Branch analysis from position: 112
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 113
2 jumps found. (Code = 43) Position 1 = 118, Position 2 = 119
Branch analysis from position: 118
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 119
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 111
Branch analysis from position: 29
filename:       /in/RmA0R
function name:  (null)
number of ops:  120
compiled vars:  !0 = $admin_password, !1 = $mysql_hostname, !2 = $mysql_user, !3 = $mysql_password, !4 = $mysql_database, !5 = $prefix, !6 = $installed, !7 = $env, !8 = $naofaz, !9 = $bd, !10 = $con, !11 = $conn, !12 = $link, !13 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'admin'
    3     1        ASSIGN                                                   !1, 'localhost'
    4     2        ASSIGN                                                   !2, 'root'
    5     3        ASSIGN                                                   !3, ''
    6     4        ASSIGN                                                   !4, 'bookface'
    7     5        ASSIGN                                                   !5, ''
   10     6        ASSIGN                                                   !6, <true>
   11     7        FETCH_R                      global              ~21     '_SERVER'
          8        FETCH_DIM_R                                      ~22     ~21, 'QUERY_STRING'
          9        ASSIGN                                                   !7, ~22
   12    10        ASSIGN                                                   !8, <array>
   13    11        INIT_FCALL                                               'str_replace'
         12        SEND_VAR                                                 !8
         13        SEND_VAL                                                 '%25SQLI'
         14        SEND_VAR                                                 !7
         15        DO_ICALL                                         $25     
         16        ASSIGN                                                   !7, $25
   14    17        INIT_FCALL                                               'strpos'
         18        SEND_VAR                                                 !7
         19        SEND_VAL                                                 '%25SQLI'
         20        DO_ICALL                                         $27     
         21        BOOL                                             ~28     $27
         22      > JMPNZ_EX                                         ~28     ~28, ->29
         23    >   BEGIN_SILENCE                                    ~29     
         24        INIT_FCALL_BY_NAME                                       'mysql_error'
         25        DO_FCALL                                      0  $30     
         26        END_SILENCE                                              ~29
         27        IS_NOT_EQUAL                                     ~31     $30, null
         28        BOOL                                             ~28     ~31
         29    > > JMPZ                                                     ~28, ->31
   15    30    > > EXIT                                                     '%3Cscript%3E+location.href%3D%22about%3Ablank%22%3B+%3C%2Fscript%3E'
   18    31    >   INIT_FCALL_BY_NAME                                       'mysql_connect'
         32        SEND_VAR_EX                                              !1
         33        SEND_VAR_EX                                              !2
         34        SEND_VAR_EX                                              !3
         35        DO_FCALL                                      0  $32     
         36        ASSIGN                                           ~33     !9, $32
         37      > JMPNZ_EX                                         ~33     ~33, ->40
         38    > > EXIT                                                     'Could+not+connect+database'
         39*       BOOL                                             ~33     <true>
   19    40    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         41        SEND_VAR_EX                                              !4
         42        SEND_VAR_EX                                              !9
         43        DO_FCALL                                      0  $34     
         44      > JMPNZ_EX                                         ~35     $34, ->47
         45    > > EXIT                                                     'Could+not+select+database'
         46*       BOOL                                             ~35     <true>
   21    47    >   INIT_FCALL_BY_NAME                                       'mysql_connect'
         48        SEND_VAR_EX                                              !1
         49        SEND_VAR_EX                                              !2
         50        SEND_VAR_EX                                              !3
         51        DO_FCALL                                      0  $36     
         52        ASSIGN                                           ~37     !10, $36
         53      > JMPNZ_EX                                         ~37     ~37, ->56
         54    > > EXIT                                                     'Could+not+connect+database'
         55*       BOOL                                             ~37     <true>
   22    56    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         57        SEND_VAR_EX                                              !4
         58        SEND_VAR_EX                                              !10
         59        DO_FCALL                                      0  $38     
         60      > JMPNZ_EX                                         ~39     $38, ->63
         61    > > EXIT                                                     'Could+not+select+database'
         62*       BOOL                                             ~39     <true>
   24    63    >   INIT_FCALL_BY_NAME                                       'mysql_connect'
         64        SEND_VAR_EX                                              !1
         65        SEND_VAR_EX                                              !2
         66        SEND_VAR_EX                                              !3
         67        DO_FCALL                                      0  $40     
         68        ASSIGN                                           ~41     !11, $40
         69      > JMPNZ_EX                                         ~41     ~41, ->72
         70    > > EXIT                                                     'Could+not+connect+database'
         71*       BOOL                                             ~41     <true>
   25    72    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         73        SEND_VAR_EX                                              !4
         74        SEND_VAR_EX                                              !11
         75        DO_FCALL                                      0  $42     
         76      > JMPNZ_EX                                         ~43     $42, ->79
         77    > > EXIT                                                     'Could+not+select+database'
         78*       BOOL                                             ~43     <true>
   27    79    >   INIT_FCALL_BY_NAME                                       'mysql_connect'
         80        SEND_VAR_EX                                              !1
         81        SEND_VAR_EX                                              !2
         82        SEND_VAR_EX                                              !3
         83        DO_FCALL                                      0  $44     
         84        ASSIGN                                           ~45     !12, $44
         85      > JMPNZ_EX                                         ~45     ~45, ->88
         86    > > EXIT                                                     'Could+not+connect+database'
         87*       BOOL                                             ~45     <true>
   28    88    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         89        SEND_VAR_EX                                              !4
         90        SEND_VAR_EX                                              !12
         91        DO_FCALL                                      0  $46     
         92      > JMPNZ_EX                                         ~47     $46, ->95
         93    > > EXIT                                                     'Could+not+select+database'
         94*       BOOL                                             ~47     <true>
   30    95    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         96        SEND_VAR_EX                                              !4
         97        DO_FCALL                                      0  $48     
         98        ASSIGN                                           ~49     !13, $48
         99      > JMPNZ_EX                                         ~49     ~49, ->102
        100    > > EXIT                                                     'Could+not+select+database'
        101*       BOOL                                             ~49     <true>
   32   102    >   BOOL_NOT                                         ~50     !6
        103      > JMPZ                                                     ~50, ->105
   33   104    > > EXIT                                                     '%3Cscript%3E+location.href%3D%27install%2F%27%3B+%3C%2Fscript%3E'
   36   105    >   INIT_FCALL                                               'is_dir'
        106        SEND_VAL                                                 'install'
        107        DO_ICALL                                         $51     
        108      > JMPZ_EX                                          ~52     $51, ->111
        109    >   BOOL                                             ~53     !6
        110        BOOL                                             ~52     ~53
        111    > > JMPZ                                                     ~52, ->113
   37   112    > > EXIT                                                     'Exclua+o+diret%C3%B3rio+%22install%22+para+continuar.'
   39   113    >   INIT_FCALL                                               'is_writable'
        114        SEND_VAL                                                 'uploadedimage'
        115        DO_ICALL                                         $54     
        116        BOOL_NOT                                         ~55     $54
        117      > JMPZ                                                     ~55, ->119
   40   118    > > EXIT                                                     'Falta+CHMOD+777+em+%22uploadedimage%22'
   42   119    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.69 ms | 1408 KiB | 21 Q