fork download
  1. <?php
  2.  
  3. $FLAG="abcd";
  4.  
  5.  
  6. function encode($value)
  7. {
  8. $data = '';
  9. for($i = 0; $i < strlen($value); $i++){
  10. $temp = ord(substr($value, i, 1)) ^ 125;
  11. while(strlen($temp) < 2){
  12. $temp = '0' . $temp;
  13. }
  14. $data = (string)$data . $temp;
  15. }
  16. return bin2hex(base64_decode($data));
  17. }
  18. printf("flag{%s}", strrev(encode($FLAG)));
  19. ?>
Success #stdin #stdout #stderr 0.01s 82880KB
stdin
Standard input is empty
stdout
flag{9bd57e67d9bd57e67d}
stderr
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/FhLpzU/prog.php on line 10
PHP Warning:  substr() expects parameter 2 to be integer, string given in /home/FhLpzU/prog.php on line 10
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/FhLpzU/prog.php on line 10
PHP Warning:  substr() expects parameter 2 to be integer, string given in /home/FhLpzU/prog.php on line 10
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/FhLpzU/prog.php on line 10
PHP Warning:  substr() expects parameter 2 to be integer, string given in /home/FhLpzU/prog.php on line 10
PHP Notice:  Use of undefined constant i - assumed 'i' in /home/FhLpzU/prog.php on line 10
PHP Warning:  substr() expects parameter 2 to be integer, string given in /home/FhLpzU/prog.php on line 10