PERL: Netlog online scanner / visitor ( automated)

Discuss anything here related to the large world of computers and electronics, whether you're asking for help, wanting to learn more, or just want to share some intellect with your fellow forumers.
Locked
Synbitz
Novice Member
Posts: 21
Joined: Wed Jul 28, 2010 10:04 pm
Lobby Username: Synbitz

PERL: Netlog online scanner / visitor ( automated)

Post by Synbitz »

original post : http://www.scribd.com/doc/12408637/1500-Visitors-a-Day

Modified script ( posting was outdated )

Code: Select all

require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
$ua->agent ("Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716
Thunderbird/1.0.6");
$url ="http://nl.netlog.com/go/explore/profiles/view=online&country=-1&region=&gender=BOTH&minimumAge=16&maximumAge=50&ageType=ALL&page=";
@numr = (1...25);
chomp($session = $ARGV[0]);
$session =~ s/ //ig;
print "\n\n\n==================================\n\n\n";
print "Session id: '$session'";
print "\n\n\n==================================\n\n\n";
@header = ('Cookie' => 'PHPSESSID='.$session.'');
$j = 1;
while($j < 50)

{
$j++;
@urls = ();
foreach $nr(@numr)
{
	$lolurl = $url.$nr;
	$rs = $ua->get($lolurl,@header);
	if($rs->is_success)
	{
		print "Bitch ";
		$c = $rs->content;

		while ($c =~ /<a href="(.*)" title="(.*)" class="nick person" target="_blank" >/ig)
	
		{
		push(@urls, "http://nl.netlog.com$1");
		print writee "$1\n";

		}
		$csize = @urls;
		print "Page $nr done - size of urls $csize \n";
		}
}$i=0;


foreach $ulrl(@urls)
{
	$size = @urls;
	$rs = $ua->get($ulrl,@header);
	if($rs->is_success)
	{
		$i++;
		print "Crawled this noob -  $ulrl! nr $i of $size\n";
	}
}print "\n\n\n==================================\n\n\n";

print "Part $j completed! Size of urls: $size\n";
print "Completed url's: $i \n";
print "\n\n\n==================================\n\n\n";
sleep(5);
}
A synbitz modification.
Image

Locked

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests