#!/usr/bin/perl -Tw # drbot version 0.9 # by modulus schmodulus # Tue Jan 10 17:19:47 PST 2006 #TODO use perl switch module to parse arguments instead of using @ARGV use strict; use LWP; use HTTP::Cookies; $0="drbot.pl"; my $verbose=undef; &usage() if !defined $ARGV[0]; if ($ARGV[0] eq "-v"){ $verbose=1; } else { &usage(); } # create new cookie_jar object my $cookie_jar = HTTP::Cookies->new( file => 'cookies.dat', autosave => 1); # Create new user agent object my $ua = LWP::UserAgent->new; # allow POST requests to be redirectable push @{ $ua->requests_redirectable }, 'POST'; # set user agent type $ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;)'); # set user agent cookies $ua->cookie_jar($cookie_jar); print "Logging into DR.." if defined $verbose; my $currpage=&drlogin(); print "Acquiring list of My Neighborhood.." if defined $verbose; &drinvestigate($currpage); sub drinvestigate{ my $html = $_[0]; my %id_name; my @investigate_links; # My Neighborhood if ($html =~ /(]*>My Neighborhood<\/a>)/g){ $html = $1; }; if ($html =~ /href=\"([^\"]*)\"/g){ $html = $1; }; my $targets = click_link($html); sleep 1 && print "." if defined $verbose; #baggerlip #My Profile #