#!/usr/bin/perl use IO::Socket; use Tk; $|=1; my $main = MainWindow->new(); $main->title("g00gle"); $main->geometry("270x100"); $main->Label(-text => "\nSearch:") -> pack ; $search = $main->Entry(-width,23)->pack(); my $text = 'By matrix_killer and JohnnyButterkeks'; my $button = $main->Button(-text => 'Start', -command => \&google)->pack(-side => 'top'); my $label = $main->Label(-textvariable => \$text)->pack(-side => 'bottom'); MainLoop(); sub google { $search = $search ->get() ; for ($n=0; $n < 900; $n++){ $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "www.google.com", PeerPort => "80") || sleep(0); print $sock "GET /ie?q=$search&hl=bg&lr=&start=$n&sa=N HTTP/1.0\nHost: www.google.com\nConnection: close\n\n"; while ($foo = <$sock>) { if ($foo =~ /href=(http:\/\/\S+)/gi) { $save = $1; $save =~ s/(http:\/\/toolbar.google.com)//eg; $save =~ s/>\S+//g; print "\n$save"; open (foo, ">>links.txt"); print foo "\n$save"; }}}}