3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($str, $key) { $iv = substr(md5("stoppay",true), 0, 8); return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $str, MCRYPT_MODE_CBC, $iv)); } function decrypt($str, $key) { $iv = substr(md5("stoppay",true), 0, 8); return base64_decode(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $str, MCRYPT_MODE_CBC, $iv)); } $chave = "80ab0e26de70872c65830a2efedabad3"; $texto = "ForBrazil Ends"; echo encrypt($texto,$chave); $chave = "80ab0e26de70872c65830a2efedabad3"; $validacao = "7hm5ie9BUROMleN1QPUFJSCyFO48ht8OduNvp4de7Ks="; echo decrypt($validacao,$chave); $Validation = "7hm5ie9BUROMleN1QPUFJSCyFO48ht8OduNvp4de7Ks="; $key = "e79c4da4f94b86cba5a81ba39fed083dbaf8bce"; $key = "80ab0e26de70872c65830a2efedabad3"; $msg = $text['felicitation'].decrypt(base64_decode($Validation),base64_encode($key)); echo "Le flag est: ".$msg; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uSZNr
function name:  (null)
number of ops:  33
compiled vars:  !0 = $chave, !1 = $texto, !2 = $validacao, !3 = $Validation, !4 = $key, !5 = $msg, !6 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, '80ab0e26de70872c65830a2efedabad3'
   13     1        ASSIGN                                                   !1, 'ForBrazil+Ends'
   15     2        INIT_FCALL                                               'encrypt'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $9      
          6        ECHO                                                     $9
   17     7        ASSIGN                                                   !0, '80ab0e26de70872c65830a2efedabad3'
   18     8        ASSIGN                                                   !2, '7hm5ie9BUROMleN1QPUFJSCyFO48ht8OduNvp4de7Ks%3D'
   20     9        INIT_FCALL                                               'decrypt'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        DO_FCALL                                      0  $12     
         13        ECHO                                                     $12
   23    14        ASSIGN                                                   !3, '7hm5ie9BUROMleN1QPUFJSCyFO48ht8OduNvp4de7Ks%3D'
   24    15        ASSIGN                                                   !4, 'e79c4da4f94b86cba5a81ba39fed083dbaf8bce'
   25    16        ASSIGN                                                   !4, '80ab0e26de70872c65830a2efedabad3'
   26    17        FETCH_DIM_R                                      ~16     !6, 'felicitation'
         18        INIT_FCALL                                               'decrypt'
         19        INIT_FCALL                                               'base64_decode'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $17     
         22        SEND_VAR                                                 $17
         23        INIT_FCALL                                               'base64_encode'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $18     
         26        SEND_VAR                                                 $18
         27        DO_FCALL                                      0  $19     
         28        CONCAT                                           ~20     ~16, $19
         29        ASSIGN                                                   !5, ~20
   29    30        CONCAT                                           ~22     'Le+flag+est%3A+', !5
         31        ECHO                                                     ~22
   31    32      > RETURN                                                   1

Function encrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uSZNr
function name:  encrypt
number of ops:  26
compiled vars:  !0 = $str, !1 = $key, !2 = $iv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        INIT_FCALL                                               'substr'
          3        INIT_FCALL                                               'md5'
          4        SEND_VAL                                                 'stoppay'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 8
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !2, $4
    4    12        INIT_FCALL                                               'base64_encode'
         13        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
         14        FETCH_CONSTANT                                   ~6      'MCRYPT_RIJNDAEL_256'
         15        SEND_VAL_EX                                              ~6
         16        SEND_VAR_EX                                              !1
         17        SEND_VAR_EX                                              !0
         18        FETCH_CONSTANT                                   ~7      'MCRYPT_MODE_CBC'
         19        SEND_VAL_EX                                              ~7
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0  $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                         $9      
         24      > RETURN                                                   $9
    5    25*     > RETURN                                                   null

End of function encrypt

Function decrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uSZNr
function name:  decrypt
number of ops:  26
compiled vars:  !0 = $str, !1 = $key, !2 = $iv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'substr'
          3        INIT_FCALL                                               'md5'
          4        SEND_VAL                                                 'stoppay'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 8
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !2, $4
    9    12        INIT_FCALL                                               'base64_decode'
         13        INIT_FCALL_BY_NAME                                       'mcrypt_decrypt'
         14        FETCH_CONSTANT                                   ~6      'MCRYPT_RIJNDAEL_256'
         15        SEND_VAL_EX                                              ~6
         16        SEND_VAR_EX                                              !1
         17        SEND_VAR_EX                                              !0
         18        FETCH_CONSTANT                                   ~7      'MCRYPT_MODE_CBC'
         19        SEND_VAL_EX                                              ~7
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0  $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                         $9      
         24      > RETURN                                                   $9
   10    25*     > RETURN                                                   null

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.46 ms | 1398 KiB | 24 Q