Changeset 350 for trollforge


Ignore:
Timestamp:
05/29/10 08:54:54 (3 years ago)
Author:
pynchon
Message:

now with XML RPC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trollforge/pynchon/pastebin.pl

    r349 r350  
    11#!/usr/bin/perl 
    22 
    3 # cmdline tool to make the lisp pastebin bot flood freenode chans 
    4 # 
    5 # usage: 
     3# lisp pastebot flooder 
     4 
    65use warnings; 
    76use strict; 
    8  
    97use WWW::Mechanize; 
    10 use WWW::Mechanize::FormFiller; 
    11  
    12 my $m = WWW::Mechanize->new(); 
    13 my $f = WWW::Mechanize::FormFiller->new(); 
     8use List::Util qw/shuffle/; 
     9use Frontier::Client; 
    1410 
    1511if ($#ARGV < 2) { 
     
    1713        exit 1; 
    1814} 
    19  
    2015my $user = shift @ARGV; 
    2116my $title = join(' ', @ARGV); 
     
    8580while (1) { 
    8681        foreach (@chanlist) { 
    87  
    88                 $m->get("http://paste.lisp.org/"); 
    89                 $m->submit_form(form_number => 1, fields => { 
    90                                 channel => $_, username => $user, title => $title, 
    91                                 captcha => "lisp", text => $paste } ); 
    92                 print "spammed $_\n"; 
     82                my $client = Frontier::Client->new(url => "http://www.common-lisp.net:8185/RPC2"); 
     83                my @data =      ($_, $user, $title, $paste); 
     84                $client->call("newpaste", @data); 
     85                        print "spammed $_\n"; 
    9386        } 
    9487} 
    9588 
    96 # RIP erxz.com, you will not recover. 
    97 # 
    98 #       $m->get("http://erxz.com/pb/html"); 
    99 #       $m->submit_form(form_number => 1, fields => { 
    100 #                       channel => $chan, 
    101 #                       nick => $user, 
    102 #                       summary => $title, 
    103 #                       paste => $paste } ); 
    104  
    105  
Note: See TracChangeset for help on using the changeset viewer.