Hack x Crack - Comunidad de Seguridad informática

Programación => Programación Web => Mensaje iniciado por: #RemoteExecution en Septiembre 13, 2011, 02:52:37 am

Título: [PHP]Script Esta Caido?
Publicado por: #RemoteExecution en Septiembre 13, 2011, 02:52:37 am
A veces pasa que no sabemos si es nuestra conexion o un sitio realmente esta caido, para comprobar eso les dejo un sencillo script, que espero que sea de su agrado y utilidad... Saludos.

Código: [Seleccionar]
<html>
<head>
<style>
body
    {
    background-color:#FFF;   
    font-family: Verdana;
    color: #000;
    }
input{
      -moz-border-radius: 3px;
      font-family: Verdana;
      background-color: #FFF;
      border: 1px solid #CCC;
      color: #000; 
      font-size: 25px;
      margin: 3px;
      padding: 3px;
     }
#sin_borde
          {
           border-width:0;
           cursor:pointer;
           display:block;
           font-family: Verdana;
          }
td
  {
    font-size: 25px;
    font-family: Verdana;
  }
</style>
<title>Averigua si un servidor esta ca&iacute;do o eres tu!</title>
</head>
<body>
<center>
<?php
/**
 * 
 *
 * @author Daniel Godoy
 * @copyright 2011
 * @Site www.0x3a.com.ar www.remoteexecution.com.ar www.delincuentedital.com.ar
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 
 **/
set_time_limit(0);
$url=htmlentities($_POST['url']);
if(isset(
$url)&&($url!= ""))
                            {
                            
$online = @fsockopen($url80);
                            if (
$online
                                        { 
                                         echo 
'¡Eres tú, <a href="http://'.$url.'" target=_blank>'.$url.'</a> está funcionando ok!
                                              <br><a href="'
.$_SERVER['PHP_SELF'].'">¿Deseas chequear otro sitio?</a>
                                              '

                                        } else { 
                                                echo 
'¡No, no eres tú! <a href="http://'.$url.'" target=_blank>'.$url.'</a> está caído.
                                                <br><a href="'
.$_SERVER['PHP_SELF'].'">¿Deseas chequear otro sitio?</a>
                                                '

                                               } 
                            }else{
                                 echo 
'
                                       <form name="pr" action="" method="post">
                                       <table align="center">
                                       <td>¿<input id="boton" type="text" name="url" size="15" maxlength="300" value=""/> ESTA CAIDO..</td>
                                       <td></td>
                                       <td><input type="submit" name="submit" id="sin_borde"  value="O SOY YO?" /></td>
                                       </table>
                                      '
;
                                 }
 


?>

</center>
</body>
</html>

Título: Re:[PHP]Script Esta Caido?
Publicado por: kid_goth en Septiembre 21, 2011, 08:20:51 pm
interesante hermano, lo voy a probar aunque no se como voy a hacer en caso de que quiera probarlo en otro lugar que no sea mi house o puesto de trabajo... creo que me tocaria descargar algun servidor local y probarlo pero si el caso es que no tengo internet ni modo....

de todos modos muchas gracias por el code (algo se le sacara)...

PD: para saber si hay conex desde mi pc a internet pruebo en consola "ping www.google.com", nunca falla