PHP - CMD inj eval var_export - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.

Name: PHP - CMD inj eval var_export fullscreencopydownloadembedprint


Your result can be seen below.

Result of php executing





Full code of PHP - CMD inj eval var_export.php

  1. <?php
  2.  
  3. $array = [
  4.     "foo" => "b\'ar",
  5.     "bar" => exec("ls -l"),
  6. ];
  7. iconv('UTF-8', 'CP1252', var_export($array, true)) ;
  8.  
  9. print iconv('UTF-8', 'CP1252', var_export($array, true)) ;
  10.  
  11.  
  12. ?>
File Description
  • PHP - CMD inj eval var_export
  • PHP Code
  • 24 Aug-2022
  • 188 Bytes
You can Share it: