<?php
//include('/etc/profile');
echo system("echo 'test' > /tmp/hacked.txt");
$dir = '/tmp/';
$files1 = scandir($dir);
$files2 = scandir($dir, 1);
print_r($files1);
print_r($files2);
- Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
- Warning: system(): Unable to fork [echo 'test' > /tmp/hacked.txt] in /in/TIHAJ on line 5
Array
(
[0] => .
[1] => ..
)
Array
(
[0] => ..
[1] => .
)
preferences:
246.31 ms | 404 KiB | 296 Q