Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Dumb perl script

Name: Why does this 405? 2009-03-15 1:13

use LWP::Simple;
use LWP::UserAgent;
use HTML::TokeParser;
use WWW::Mechanize;
$url = 'http://img.4chan.org/b/';
$url_all = $url;
my $html = get($url);
my $stream = HTML::TokeParser->new(\$html);
my @reply_urls;
my $mech = WWW::Mechanize->new();
$text = "Food Food Food Food Food Food Food Food Food Food Food Food Food Food Food Food Food Food Food ";
$test_url = "http://img.4chan.org/b/res/123725144.html";

sub userAg
{
my $browser = LWP::UserAgent->new;
$browser->agent('Mozilla/4.0 (compatible; MSIE 5.0; Linux) Opera 5.0  [en]');
my $response = $browser->post(
  $test_url,
  [
    'com'  => 'poooooooo 444',
  ],
);
if($response)
{
print $response->content;

};
}

sub mech_1
{
    $mech->submit_form
        (
        form_name => 'post',
        fields      => {com => "$text"},
        button    => 'Submit'
        )

}
sub mech_2{
$mech->get($test_url);
$mech->success or die $mech->response->status_line;
$mech->form_number(1);
$mech->field(com => "23452347562034765023746502347");
$mech->submit() or die $mech->response->status_line;
}
sub get_urls
{
  while(my $token = $stream->get_token)
  {
    if($token->[0] eq "S" && $token->[1] eq "a")
    {
    if ($token->[2]{href} !~ m/#/ && $token->[2]{href} =~ m/res\//)
    {
   
    $nice_url = $token->[2]{href};
    $nice_url =~ s/res\///g;
    $url_all .= $nice_url;
    push (@reply_urls,$url_all);
    $url_all = $url;
    }
    }
  }
}
sub print_urls
{
get_urls();
foreach(@reply_urls)
{
sleep(15);
}

}

Name: Anonymous 2009-03-15 21:33

>>3
I think you mean Leisure Suit Larry Wall.

>>6
Everyone knows Perl. That doesn't mean we have to help /b/tards who don't.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List