#!usr/bin/perl
#Counter Strike 1.6 Servers List
#Version 0.1
#Coded By Doddy H
use LWP::UserAgent;
use Cwd;
use Time::HiRes "usleep";
my $nave = LWP::UserAgent->new;
$nave->agent(
"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
);
$nave->timeout(5);
my @founds;
my @founds_final;
head();
print "<ul class="bbc_list
"><li type="square
"> Pages (1-899) : ";[/li
][/list
] chomp( my $pag = <stdin> );
print "\n\n</li><li type="square
"> Searching Servers ....\n";[/li
][/list
]
for my $count ( 1 .. $pag ) {
my $code =
toma( "http://www.gametracker.com/search/cs/?searchipp=50&searchpge="
. $count );
my @found = $code =~ m/(\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}:\d+)/g;
for (@found) {
push( @founds_final, $_ ); }
}
my @founds_final = repes(@founds_final);
print "\n</li><li type="square
"> Servers Found : " . int(@founds_final);[/li
][/list
]
my $ruta_logs = getcwd() . "/" . "cs_servers.txt";
if ( -f $ruta_logs ) {
}
open( LOGS
, ">>cs_servers.txt" );
for (@founds_final) {
}
print "\n\n</li><li type="square
"> All results are stored in : $ruta_logs\n";[/li
][/list
]
if ( -f $ruta_logs ) {
}
copyright();
sub head {
my @logo = (
"#=============================================#", "\n",
"# Counter Strike 1.6 Servers List #", "\n",
"#---------------------------------------------#", "\n",
"# Written By Doddy H #", "\n",
"# Email: lepuke[at]hotmail[com] #", "\n",
"# Website: doddyhackman.webcindario.com #", "\n",
"#---------------------------------------------#", "\n",
"# The End ? #", "\n",
"#=============================================#", "\n"
);
marquesina(@logo);
}
sub copyright {
my @fin = ("-- == (C) Doddy Hackman 2012 == --");
marquesina(@fin);
<stdin>;
}
sub marquesina {
#Effect based in the exploits by Jafer Al Zidjali
my @logo = @_;
my $car = "|";
for my $uno (@logo) {
for my $dos ( split //, $uno ) {
$|++;
if ( $car eq "|" ) {
mostrar( "\b" . $dos . $car, "/" );
}
elsif ( $car eq "/" ) {
mostrar( "\b" . $dos . $car, "-" );
}
elsif ( $car eq "-" ) {
mostrar( "\b" . $dos . $car, "\\" );
}
else {
mostrar( "\b" . $dos . $car, "|" );
}
usleep(40_000);
}
}
sub mostrar {
$car = $_[1];
}
}
sub repes {
my @limpio;
foreach $test (@_) {
push @limpio, $test unless $repe{$test}++; }
}
sub toma {
return $nave->get( $_[0] )->content; }
#The End ?