Tool by Guason para HTTP Hacking

Started by dracko.rx, February 24, 2010, 03:09:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

#Name program = Dame_Info
#Version  = beta
#Funcion = Peticiones HTTP
#Autor = Guason





use IO::Socket;

unless ($ARGV[0] and $ARGV[1] and $ARGV[2]  ) {
print "\n\n\t\t\tDame_Info 0.1 by Guason\t\t\t\n\n";
print "Modo de uso = $0 <SERVER> <PORT> <PETICION>\n\n";
print "<SERVER> = Server ejemplo 127.0.0.1\n";
print "<PORT> = Puerto a usar ej 80 , 8080\n";
print "<PETICION> = GET ,HEAD ,OPTIONS\n\n";
exit 1;
}

my $remote= $ARGV[0];
my $port = $ARGV[1];
my $opcion  = $ARGV[2];

print "\n\n";


if  ( $opcion  eq "GET" ) {
$peticion = "GET / HTTP\/1.0";
$peticion .= "\r\n\r\n"; #Concatenamos un doble CR/LF para indicar el final del Header

my $iaddr = inet_aton($remote) || die "$remote";
my $paddr = sockaddr_in($port, $iaddr) || die "Caca !!";
my $proto = getprotobyname('tcp') || die "protocol !!";

socket(SOCK, PF_INET, SOCK_STREAM, $proto);
connect(SOCK, $paddr) || die "cannot connect to $remote: $!";
send(SOCK,$peticion,0);

while(<SOCK>)
{
print $_;
}
}

if ( $opcion eq "HEAD") {
$peticion = "HEAD / HTTP\/1.0";
$peticion .= "\r\n\r\n"; #Concatenamos un doble CR/LF para indicar el final del Header

my $iaddr = inet_aton($remote) || die "$remote";
my $paddr = sockaddr_in($port, $iaddr) || die "Caca !!";
my $proto = getprotobyname('tcp') || die "protocol !!";

socket(SOCK, PF_INET, SOCK_STREAM, $proto);
connect(SOCK, $paddr) || die "cannot connect to $remote: $!";
send(SOCK,$peticion,0);

while(<SOCK>)
{
print $_;
}
}

if ( $opcion eq "OPTIONS") {
$peticion = "OPTIONS / HTTP\/1.0";
$peticion .= "\r\n\r\n"; #Concatenamos un doble CR/LF para indicar el final del Header

my $iaddr = inet_aton($remote) || die "$remote";
my $paddr = sockaddr_in($port, $iaddr) || die "Caca !!";
my $proto = getprotobyname('tcp') || die
Venta de diseños - Contactar por MP

http://rax0rnet.blogspot.com/