All pastes #172997 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-09-16 13:26 UTC
rendered paste body
# By Ebixad
# Contact me : /query Ebixad on irc.geeknode.org or irc.freenode.net or irc.epiknet.net or ebixad -at- gmail -dot- com

#!/usr/bin/perl
use IO::Socket::INET;

# Serveur informations
my $site = "www.siteduzero.com";
my $port = 80;
my $dir  = "/";
my @pages = ("admin.php", "index.html", "hehehehehehe.php");


print "[~] Connection on $site:$port.\n";

my $server = IO::Socket::INET->new
(
	PeerAddr => $site,
	Proto    => "tcp",
	PeerPort => $port
) or die "[!] Failed !\n";
$server -> autoflush(1);

print "[+] Done.\n\n";

foreach (@pages) {

	print $server "GET $_ HTTP/1.0\n\n\n";
	print "[~] Searching for $_\n";

		while(my $text = <$server>) {

			if ($text =~ /HTTP\/1.\S+ \S+ OK/) { 
			print "[+] $_ exists !\n\n";	
			}

		$i++;
		}
}