Imagine an IoT application that has the source code as shown below for displaying files.
<?php
print(enter file name);
$file=_GET[‘filename’];
system(“cat $file”);
?>
Which of these inputs should be provided to this device to delete all files in the root directory?
Options
- robot.txt
- root rf
- ‘a.txt; rm -rf /; ‘ “
- a.txt’; ls /;