document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.         case T_HOST:
  2.             if (!gothost) {
  3.  
  4.                 int i=0;
  5.                 struct in_addr **addr_list;
  6.                 struct hostent *he = gethostbyname(ap[i].x.from); //Le paso el domain permitido o prohibido
  7.  
  8.                 //En he->addr_list me queda la lista de IPs que resuelven.
  9.                 if (he!=NULL)
  10.                 {
  11.                          addr_list = (struct in_addr **)he->h_addr_list;
  12.                          for(i = 0; addr_list[i] != NULL; i++) //Para todas las IPs de ese dominio
  13.                          {//Comparar con la IP r->connection->remote_ip. Si alguno matchea, pa\'dentro, else denied
  14.                                 char *ip=inet_ntoa( *(struct in_addr *) addr_list[i]);
  15.  
  16.                                 if (ip!=NULL) //Si tengo una IP
  17.                                         if (strcmp (ip,r->connection->remote_ip)==0) //y concide con la remota
  18.                                                 return (1); //hemos encontrado la IP
  19.                          }
  20.                 }
  21.  
  22.             }
  23.             break;
');