3v4l.org

run code in 300+ PHP versions simultaneously
<?php ?><?php session_start(); if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) { $methods = openssl_get_cipher_methods(); mysql_connect("localhost", "root", "123456") or die(mysql_error()); mysql_select_db('passman'); $res = mysql_query('select password from passwd where user_name="root"'); $str = mysql_fetch_array($res); $clefSecrete = "glop"; $decrypted = openssl_decrypt($encrypted, $methods[62], $clefSecrete); $bla = openssl_decrypt($str['password'], $methods[62], $clefSecrete); print "<h1>Secure Password Manager v.0.9b</h1>"; print '<a href="index.php?logout">Logout</a>'; print "<h4>System Information:</h4>"; print "Ubuntu Linux 2.6.32-45-generic-pae<br>"; print "OpenSSH 5.3p1<br>"; print "MySql Version 14.14 Distrib 5.1.62 for Debian-Linux-GNU<br><br>"; ?> <table border=1 align="left"><tr><td align="center"> <?php print "SSH Credentials:<br>username: root:<br>password: <b>" . $bla . "</b>"; ?> </td> <td align="center"> <?php print "MySql Credentials:<br>username: root:<br>password: <b>12346</b>"; ?> </td> <td align="center"> <?php print "WordPress Credentials:<br>username: admin:<br>password: <b>Ihax1337stuff</b>"; ?> </td> </tr></table> <?php } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 68
Branch analysis from position: 10
2 jumps found. (Code = 47) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
Branch analysis from position: 9
filename:       /in/ZRaM4
function name:  (null)
number of ops:  69
compiled vars:  !0 = $methods, !1 = $res, !2 = $str, !3 = $clefSecrete, !4 = $decrypted, !5 = $encrypted, !6 = $bla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    3     2        FETCH_IS                                         ~8      '_SESSION'
          3        ISSET_ISEMPTY_DIM_OBJ                         0  ~9      ~8, 'logged_in'
          4      > JMPZ_EX                                          ~9      ~9, ->9
          5    >   FETCH_R                      global              ~10     '_SESSION'
          6        FETCH_DIM_R                                      ~11     ~10, 'logged_in'
          7        BOOL                                             ~12     ~11
          8        BOOL                                             ~9      ~12
          9    > > JMPZ                                                     ~9, ->68
    4    10    >   INIT_FCALL_BY_NAME                                       'openssl_get_cipher_methods'
         11        DO_FCALL                                      0  $13     
         12        ASSIGN                                                   !0, $13
    5    13        INIT_FCALL_BY_NAME                                       'mysql_connect'
         14        SEND_VAL_EX                                              'localhost'
         15        SEND_VAL_EX                                              'root'
         16        SEND_VAL_EX                                              '123456'
         17        DO_FCALL                                      0  $15     
         18      > JMPNZ_EX                                         ~16     $15, ->23
         19    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         20        DO_FCALL                                      0  $17     
         21      > EXIT                                                     $17
         22*       BOOL                                             ~16     <true>
    6    23    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         24        SEND_VAL_EX                                              'passman'
         25        DO_FCALL                                      0          
    7    26        INIT_FCALL_BY_NAME                                       'mysql_query'
         27        SEND_VAL_EX                                              'select+password+from+passwd+where+user_name%3D%22root%22'
         28        DO_FCALL                                      0  $19     
         29        ASSIGN                                                   !1, $19
    8    30        INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         31        SEND_VAR_EX                                              !1
         32        DO_FCALL                                      0  $21     
         33        ASSIGN                                                   !2, $21
    9    34        ASSIGN                                                   !3, 'glop'
   10    35        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
         36        SEND_VAR_EX                                              !5
         37        CHECK_FUNC_ARG                                           
         38        FETCH_DIM_FUNC_ARG                               $24     !0, 62
         39        SEND_FUNC_ARG                                            $24
         40        SEND_VAR_EX                                              !3
         41        DO_FCALL                                      0  $25     
         42        ASSIGN                                                   !4, $25
   11    43        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
         44        CHECK_FUNC_ARG                                           
         45        FETCH_DIM_FUNC_ARG                               $27     !2, 'password'
         46        SEND_FUNC_ARG                                            $27
         47        CHECK_FUNC_ARG                                           
         48        FETCH_DIM_FUNC_ARG                               $28     !0, 62
         49        SEND_FUNC_ARG                                            $28
         50        SEND_VAR_EX                                              !3
         51        DO_FCALL                                      0  $29     
         52        ASSIGN                                                   !6, $29
   12    53        ECHO                                                     '%3Ch1%3ESecure+Password+Manager+v.0.9b%3C%2Fh1%3E'
   13    54        ECHO                                                     '%3Ca+href%3D%22index.php%3Flogout%22%3ELogout%3C%2Fa%3E'
   14    55        ECHO                                                     '%3Ch4%3ESystem+Information%3A%3C%2Fh4%3E'
   15    56        ECHO                                                     'Ubuntu+Linux+2.6.32-45-generic-pae%3Cbr%3E'
   16    57        ECHO                                                     'OpenSSH+5.3p1%3Cbr%3E'
   17    58        ECHO                                                     'MySql+Version+14.14+Distrib+5.1.62+for+Debian-Linux-GNU%3Cbr%3E%3Cbr%3E'
   19    59        ECHO                                                     '%3Ctable+border%3D1+align%3D%22left%22%3E%3Ctr%3E%3Ctd+align%3D%22center%22%3E%0A'
   21    60        CONCAT                                           ~31     'SSH+Credentials%3A%3Cbr%3Eusername%3A+root%3A%3Cbr%3Epassword%3A+%3Cb%3E', !6
         61        CONCAT                                           ~32     ~31, '%3C%2Fb%3E'
         62        ECHO                                                     ~32
   23    63        ECHO                                                     '%3C%2Ftd%3E%0A%3Ctd+align%3D%22center%22%3E%0A'
   26    64        ECHO                                                     'MySql+Credentials%3A%3Cbr%3Eusername%3A+root%3A%3Cbr%3Epassword%3A+%3Cb%3E12346%3C%2Fb%3E'
   28    65        ECHO                                                     '%3C%2Ftd%3E%0A%3Ctd+align%3D%22center%22%3E%0A'
   31    66        ECHO                                                     'WordPress+Credentials%3A%3Cbr%3Eusername%3A+admin%3A%3Cbr%3Epassword%3A+%3Cb%3EIhax1337stuff%3C%2Fb%3E'
   33    67        ECHO                                                     '%3C%2Ftd%3E%0A%3C%2Ftr%3E%3C%2Ftable%3E%0A'
   37    68    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.13 ms | 1400 KiB | 15 Q