home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit v2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Unix / c-src / fakemail.c < prev    next >
C/C++ Source or Header  |  1999-11-04  |  5KB  |  217 lines

  1. /* coded by Konker/Nofix; i know its old news but, if your lame and shit..
  2.    ********************************************************************
  3.    major FUCK YOU to Bluffs run, Rory DeSantiago..youll get yours..
  4.    Mark Pendtgraft you fuckin stuck up piece of shit.
  5.    ********************************************************************
  6.    Use this at your own risk, i will not be held responsible for it. or what 
  7.    you email people with it
  8.    
  9.    You can edit this really simple and make a email bomber or what 
  10.    ever you want to. 
  11.    if you do please email me:   konker@radiks.net    or get me on icq sometime.
  12.  
  13.    Email Me at    konker@radiks.net ; please no anon mail:)
  14.    my icq #10891673, please dont message bomb me:) latez... 
  15.  
  16.   Ironicly this was made on the same day i quit/lost my job at Bluffs Run, that 
  17.   fuckin place can burn in hell, for anyone that wants a cool project or help
  18.   me, mass mail    bluffsrun@bluffsrun.com     ive had enuff fun crashing them
  19.   everyday....seems there stupid ass programmer/hardware maintnece is a fuckin 
  20.   shit...fuck them......
  21.   
  22.   ** major fuck you to rory desantiago and marc pendtgraft  **
  23.  
  24.   ...heh i always was the best person that worked there..:). They fuck everyone
  25.   over.. that dont have tits and a nice ass:) Oh well...off to program...
  26. */         
  27.  
  28. /* CHANGE   char    *host;   to either your own mail server or some other isp's    mail server */
  29.  
  30. #include        <stdio.h>
  31. #include        <stdlib.h>
  32. #include        <string.h>
  33. #include        <unistd.h>
  34. #include        <sys/types.h>
  35. #include        <sys/time.h>
  36. #include        <netinet/in.h>
  37. #include        <sys/socket.h>
  38. #include        <netdb.h>
  39.  
  40. #define MAXDATABUF 10000
  41. #define PORT 25 
  42.  
  43. void    usage(char *progname);
  44. void    sc(int com);
  45. char    *gethost(char *ea);
  46. struct    sockaddr_in    addr;
  47. struct    hostent        *he;
  48. char    *host = "top.net",
  49.     *from,
  50.     *recieve,
  51.     *msg,
  52.     *sendcom;
  53. int    i,
  54.     sock;    
  55.     
  56. //memset( &sin, 0, sizeof( sin ) ) ;
  57. //memset( sendcom, 0, sizeof( sendcom ) ) ;
  58. //memset( buf, 0, sizeof( buf ) ) ;
  59.  
  60. //memset(&addr, 0, sizeof(addr));
  61.  
  62. int main(int argc, char *argv[]) {
  63.  
  64.  if(argc < 3) {
  65.     usage(argv[0]);
  66.     exit(1);
  67.  }
  68.  
  69.  if(argc == 2) 
  70.     msg = "Death On BluffsRun.com\n\n\n\n";
  71.  else
  72.     msg = argv[3]; 
  73.  
  74.  from = argv[1];
  75.  recieve = argv[2];
  76.  
  77.  //host = gethost(argv[1]);
  78.  
  79.  if((he = gethostbyname(host)) == NULL) {
  80.     printf("\n\t** Invalid host name: %s **\n", host);
  81.     return(0);
  82.     }
  83.  
  84. sock = socket(AF_INET, SOCK_STREAM, 0);  /*create socket*/
  85.  
  86.  if(sock < 0) {
  87.     printf("\n\t** Socket could not be created **\n");
  88.     exit(1);  /*if socket cannot be created exit*/
  89.     } 
  90.  
  91. /*assign socket structs*/
  92. addr.sin_family = AF_INET;
  93. addr.sin_port = htons(PORT);
  94. addr.sin_addr = *((struct in_addr *)he->h_addr);
  95. bzero(&(addr.sin_zero), 8);
  96.  
  97.  if(connect(sock, &addr, sizeof(addr)) < 0) {
  98.     printf("\n\t** could not connect to %s**\n", host);
  99.     exit(1);
  100.     }
  101.  printf("\n*******by Konker icq 10891673*******\n");
  102.  printf("\n*********************************************************\n");
  103.  printf("*  FUCK BLUFFS RUN * FuCK RorY DeSantiago * Fuck DAve   *\n");
  104.  printf("*********************************************************\n");
  105.  printf("Mailing %s, From %s\n\n", argv[2], argv[1]); 
  106.  fflush(stdout);
  107.  for(i = 1; i < 11; i++){
  108.     /* printf("%i\n", i); */
  109.      sc(i);
  110.      }
  111.  
  112. printf("DONE!!!!!!!\n");
  113. close(sock);
  114.  
  115. return(0);
  116. }
  117.  
  118.  
  119. void    usage(char *progname) {
  120.   printf("Death On BluffsRun.Com");
  121.   printf("\n   usage: %s  from@bluffsrun.com  to@host.com \"we fuck people over\" \n\n", progname);
  122. }
  123.  
  124. void    sc(int com) {
  125.  
  126. /* char    buf[MAXDATABUF]; */
  127.   int     sendbytes = 0;
  128. /*        recvbytes = 0;   */
  129.   switch(com) {
  130.    case 1: {
  131.     sendcom = malloc(5+strlen(host) + 1);
  132.     strcpy(sendcom, "HELO ");
  133.     strcat(sendcom, host);
  134.     break;
  135.    }
  136.    case 2: {
  137.     sendcom = malloc(10+strlen(from) + 1);
  138.     strcpy(sendcom, "MAIL FROM:");
  139.     strcat(sendcom, from);
  140.     break;
  141.    }
  142.    case 3: {
  143.     sendcom = malloc(8 + strlen(recieve) + 1);
  144.     strcpy(sendcom, "RCPT TO:");
  145.     strcat(sendcom, recieve);
  146.     break;
  147.    }
  148.    case 4: {
  149.     sendcom = malloc(5);
  150.     strcpy(sendcom, "DATA");
  151.     break; 
  152.    }
  153.    case 5: {
  154.     sendcom = malloc(6+strlen(from));
  155.     strcpy(sendcom, "From: ");
  156.     strcat(sendcom, from);
  157.     break;
  158.    }
  159.    case 6: {
  160.     sendcom = malloc(4 + strlen(recieve) + 1);
  161.     strcpy(sendcom, "To: ");
  162.     strcat(sendcom, recieve);
  163.     break;
  164.    }
  165.    case 7: { 
  166.     sendcom = malloc(16+1);
  167.     strcpy(sendcom, "Subject: Hacking"); 
  168.     break;
  169.    }
  170.    case 8: {
  171.     sendcom = malloc(10+strlen(from) + 1);
  172.     strcpy(sendcom, "Reply-To: ");
  173.     strcat(sendcom, from);
  174.     break;
  175.    }
  176.    case 9: {
  177.     sendcom = malloc(strlen(msg) + 1);
  178.     strcpy(sendcom, msg);
  179.     break; 
  180.    }
  181.    case 10: {
  182.     sendcom = malloc(2);
  183.     strcpy(sendcom, "\n.");
  184.    }
  185.   } 
  186.  
  187.    sendcom[strlen(sendcom)] = '\n';
  188.  
  189.    sendbytes = send(sock, sendcom, strlen(sendcom), 0);
  190.     if(sendbytes < 0) {
  191.        printf("\n\t** Error Writing To Socket\n");
  192.        exit(0);
  193.     }
  194.        else
  195.        fflush(stdout);
  196.        usleep(5); 
  197.        printf("#");
  198.        memset(sendcom, 0, sizeof(sendcom));
  199.     
  200.    /* recvbytes = recv(sock, buf, MAXDATABUF, 0); 
  201.         if(recvbytes < 0) { 
  202.            printf("\n\t** Error Receiving Text **\n");
  203.        exit(0);
  204.         }
  205.         else {
  206.           printf("%s", buf);
  207.        memset( buf, 0, sizeof( buf ) ) ;
  208.         } */
  209. }
  210.  
  211. char    *gethost(char *ea) {
  212. char    *tmp;
  213.     tmp = malloc(strlen(host));
  214.     tmp = strchr(ea, '@');
  215.     return(&ea[strlen(ea) - strlen(tmp) + 1]);
  216. }
  217.