/*---------------------------------------------------------------------------- DNS spammer ----------------------------------------------------------------------------*/ #include /* srand(), rand(), system() */ #include /* strcpy(), strcat(), strlen() */ #include /* ispunct() */ #include /* printf() */ #include /* time() */ #define MIN_SALT_LEN 1 #define MAX_SALT_LEN 4 /***************************************************************************** *****************************************************************************/ int main(void) { static const char *keywords[] = { /* porn */ "cunt", "dick", "porn", "penis", "vagina", "playboy", "clit", "milf", "sex", "fuck", "boner", "semprini", /* hobbies */ "stamps", "coins", "collect", "rpg", "games", "guns", "quilt", "garden", /* meds */ "viagra", "cialis", "cipro", "pepcid", "zantac", "tagamet", "prilosec", "nexium", "cardizem", "norvasc", "zocor", "lipitor", "crestor", "zetia", "vytorin", "caduet", "sudafed", "claritin", /* consumer electronics */ "cell", "xbox", "hdtv", /* Hollywood fluff */ "brittney", "paris", "gossip", "hollywood", /* misc */ "money", "mail", "email", "torrent", "download", "play", "gamble", "work", "mp3", "iraq", "democrats", "dnc", "republicans", "rnc", "election", "security" }; /**/ unsigned i, j, len1, len2, c; char buf[256]; /* re-seed random number generator */ srand((unsigned)time(NULL)); for(i = 0; i < 20; i++) { /* formulate command-line whois query */ strcpy(buf, "whois "); /* start domain name with random keyword */ j = rand() % (sizeof(keywords) / sizeof(keywords[0])); strcat(buf, keywords[j]); /* add random-length random-content 'salt' string */ len1 = strlen(buf); len2 = rand() % (MAX_SALT_LEN - MIN_SALT_LEN) + MIN_SALT_LEN + len1; for(j = len1; j < len2; j++) { do { c = rand() % 36; c += (c < 10) ? '0' : ('a' - 10); /* digits and letters only -- no punctuation */ } while(ispunct(c)); buf[j] = c; } buf[len2] = '\0'; /* .com */ strcat(buf, ".com"); /* do whois lookup */ fprintf(stderr, "%s\n", buf); system(buf); } return 0; }