3v4l.org

run code in 300+ PHP versions simultaneously
<?php require 'flag.php'; print '<html>'; print '<head><title>5dm</title></head>'; print '<body>'; if (isset($_POST['name']) and isset($_POST['password'])) { if ($_POST['name'] == $_POST['password']) { print 'Your password can not be your name.'; } else if (sha1($_POST['name']) === sha1($_POST['password'])) { print 'Flag: '.$flag; die; } else { print 'Invalid password.'; } } print '<form method="post">'; print 'Name: <input type="text" name="name"/><br/>'; print 'Password: <input type="text" name="password" /><br/>'; print '<input type="submit"/>'; print '</form>'; print '<a href="./index.txt">source</a>'; print '</body>'; print '</html>'; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 36
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 10
filename:       /in/mERcW
function name:  (null)
number of ops:  45
compiled vars:  !0 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          'flag.php', REQUIRE
    5     1        ECHO                                                     '%3Chtml%3E'
    6     2        ECHO                                                     '%3Chead%3E%3Ctitle%3E5dm%3C%2Ftitle%3E%3C%2Fhead%3E'
    7     3        ECHO                                                     '%3Cbody%3E'
   10     4        FETCH_IS                                         ~2      '_POST'
          5        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      ~2, 'name'
          6      > JMPZ_EX                                          ~3      ~3, ->10
          7    >   FETCH_IS                                         ~4      '_POST'
          8        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      ~4, 'password'
          9        BOOL                                             ~3      ~5
         10    > > JMPZ                                                     ~3, ->36
   11    11    >   FETCH_R                      global              ~6      '_POST'
         12        FETCH_DIM_R                                      ~7      ~6, 'name'
         13        FETCH_R                      global              ~8      '_POST'
         14        FETCH_DIM_R                                      ~9      ~8, 'password'
         15        IS_EQUAL                                                 ~7, ~9
         16      > JMPZ                                                     ~10, ->19
   12    17    >   ECHO                                                     'Your+password+can+not+be+your+name.'
         18      > JMP                                                      ->36
   13    19    >   INIT_FCALL                                               'sha1'
         20        FETCH_R                      global              ~11     '_POST'
         21        FETCH_DIM_R                                      ~12     ~11, 'name'
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24        INIT_FCALL                                               'sha1'
         25        FETCH_R                      global              ~14     '_POST'
         26        FETCH_DIM_R                                      ~15     ~14, 'password'
         27        SEND_VAL                                                 ~15
         28        DO_ICALL                                         $16     
         29        IS_IDENTICAL                                             $13, $16
         30      > JMPZ                                                     ~17, ->35
   14    31    >   CONCAT                                           ~18     'Flag%3A+', !0
         32        ECHO                                                     ~18
   15    33      > EXIT                                                     
         34*       JMP                                                      ->36
   17    35    >   ECHO                                                     'Invalid+password.'
   20    36    >   ECHO                                                     '%3Cform+method%3D%22post%22%3E'
   21    37        ECHO                                                     'Name%3A+%3Cinput+type%3D%22text%22+name%3D%22name%22%2F%3E%3Cbr%2F%3E'
   22    38        ECHO                                                     'Password%3A+%3Cinput+type%3D%22text%22+name%3D%22password%22+%2F%3E%3Cbr%2F%3E'
   23    39        ECHO                                                     '%3Cinput+type%3D%22submit%22%2F%3E'
   24    40        ECHO                                                     '%3C%2Fform%3E'
   25    41        ECHO                                                     '%3Ca+href%3D%22.%2Findex.txt%22%3Esource%3C%2Fa%3E'
   26    42        ECHO                                                     '%3C%2Fbody%3E'
   27    43        ECHO                                                     '%3C%2Fhtml%3E'
   29    44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.9 ms | 1400 KiB | 15 Q