Commits

Anonymous committed 5cac8ce

Nonsense generation of email addresses; project to confuse spammers

Comments (0)

Files changed (1)

+# This program could be improved by reading the ddrp_daybo database, which contains
+# more information about valid domain names.
+
+#include <stdio.h>
+#include <time.h>
+#include <stdlib.h>
+#ifndef __WIN32__
+# include <unistd.h>
+#endif
+
+static void MonkeyDust(unsigned long Number);
+static int GenRand(int bSeed);
+static void Domain(const char* Address);
+static char* Domain2(const char* Address);
+
+int main()
+{
+  puts("Content-Type: text/html\n");
+  puts("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">");
+  puts("<html>");
+  puts("  <head>");
+  puts("    <title>Monkeydust page, let's see who grabs the bait</title>");
+  puts("  </head>");
+  puts("  <body>");
+  MonkeyDust(75000);
+  puts("  </body>");
+  puts("</html>");
+  return EXIT_SUCCESS;
+}
+
+static void MonkeyDust(unsigned long Number)
+{
+  unsigned long i;
+  unsigned int j;
+  char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_";
+  char address[20];
+
+  GenRand(1); /* Seed generator */
+  for ( i = 0UL; i < Number; i++ ) {
+    for ( j = 0; j < sizeof(address)-1; j++ ) {
+      int RandomNumber = GenRand(0);
+      address[j] = chars[RandomNumber % sizeof(chars)-1];
+    }
+    address[sizeof(address)-1] = '\0';
+    Domain(address);
+    puts("<br>");
+  }
+}
+
+static int GenRand(int bSeed)
+{
+  if ( bSeed ) {
+    int s = (int)time(NULL);
+    s = s >> 1;
+#ifndef __WIN32__
+    s = s ^ getpid();
+#endif
+    srand(s);
+  }
+
+  return rand();
+}
+
+static void Domain(const char* Address)
+{
+  char* email = Domain2(Address);
+  printf("<a href=\"mailto:%s\">%s</a>\n", email, email);
+}
+
+static char* Domain2(const char* Address)
+{
+  static char crap[4096];
+
+  static const char* domains[] = {
+    "brad-x.com",
+    "btinternet.com",
+    "aol.co.uk",
+    "aol.com",
+    "co.kr",
+    "bt.net",
+    "bt.co.uk",
+    "bt.com",
+    "wanadoo.fr",
+    "wanadoo.nl",
+    "bbc.co.uk",
+    "gualala-x.com",
+    "microsoft.com",
+    "microsoft.co.uk",
+    "msn.com",
+    "hotmail.com",
+    "yahoo.com",
+    "yahoo.co.uk",
+    "ch",
+    "tw",
+    "labour.org.uk",
+    "mirc.co.uk",
+    "zzn.com"
+  };
+
+  sprintf(crap, "%s@%s", Address, domains[GenRand(0)%sizeof(domains)/sizeof(domains[0])]);
+  return crap;
+}