Working with a IoT application

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
  1. robot.txt
  2. root rf
  3. ‘a.txt; rm -rf /; ‘ “
  4. a.txt’; ls /;

Related Posts

Close Bitnami banner
Bitnami