Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 KB | None | 0 0
  1. <?php
  2.  
  3. require("./src/class.phpmailer.php");
  4. require("config.php");
  5.  
  6. declare(ticks = 1);
  7. error_reporting(0);
  8.  
  9. $child=0;
  10. $i=0;
  11. $q=0;
  12. $p=0;
  13. $smtp = "smtps";
  14. $email = "emails";
  15. $sockets = "socks";
  16. $dhost = "http://despierre.jp/js/rss/index/index.html";
  17. $version = 5;
  18.  
  19. $letter = file_get_contents('letter.html');
  20.  
  21. function send($socket, $socket_port, $host,$port,$encryption,$username,$password,$from,$fromname,$to,$subject,$html)
  22. {
  23. $mail = new PHPMailer();
  24. $mail->IsSMTP();
  25. # $mail->SMTPDebug = 2;
  26. $mail->SMTPAuth = true;
  27. if ( $encryption != "plain" )
  28. {
  29. $mail->SMTPSecure = "$encryption";
  30. }
  31. $mail->Socks_host = $socket;
  32. $mail->Socks_port = $socket_port;
  33. $mail->Host = $host;
  34. $mail->Port= $port;
  35. $mail->Username = $username;
  36. $mail->Password = $password;
  37. $mail->From = $from;
  38. $mail->FromName = $fromname;
  39. $mail->ClearAddresses();
  40. $mail->AddAddress($to);
  41. $mail->Subject = $subject;
  42. # $mail->IsHTML(true);
  43. $mail->Body = $html;
  44. $mail->MsgHTML($html);
  45. $mail->AltBody = "$txt";
  46. # $mail->AddCustomHeader('Reply-to:','noreplay@service-pp.info');
  47. $mail->HeaderLine('Return-Path','noreplay@service-pp.info');
  48.  
  49. return $mail->Send();
  50. }
  51.  
  52. function Random($x)
  53. {
  54. $chars = "abcdefghijkmnopqrstuvwxyz0123456789";
  55. srand((double)microtime()*1000000);
  56. $i=0;
  57. $pass = '' ;
  58. while ($i <= $x)
  59. {
  60. $num = rand() % 36;
  61. $tmp = substr($chars, $num, 1);
  62. $pass = $pass . $tmp;
  63. $i++;
  64. }
  65. return $pass;
  66. }
  67.  
  68. /*$content1 = file($sockets);
  69. for ($s = 0; $s < count($content1); $s++)
  70. {
  71. $sox[$s] = explode(':', $content1[$s]);
  72. }
  73. */
  74.  
  75. $fisier = file_get_contents($sockets); // Read the file with the proxy list
  76. $linii = explode("\n", $fisier); // Get each proxy
  77.  
  78. for($s = 0; $s < count($linii) - 1; $s++)
  79. {
  80. $sox[$s] = explode(":", $linii[$s]);
  81. }
  82.  
  83. $content2=file($smtp);
  84. for ($j=0;$j<count($content2);$j++)
  85. {
  86. $smtps[$j] = explode(' ', $content2[$j]);
  87. }
  88.  
  89. $content=file($email);
  90. for($i=0;$i<count($content);$i++)
  91. {
  92. if($q==(count($content2)))
  93. {
  94. $q=0;
  95. }
  96. if($p==(count($linii) - 1))
  97. {
  98. $p=0;
  99. }
  100. $emails[$i] = str_replace("\n","", $content[$i]);
  101. $pids[$child] = pcntl_fork();
  102.  
  103. if($pids[$child] == -1)
  104. {
  105. die("Could not fork!");
  106. }
  107. elseif($pids[$child] == 0)
  108. {
  109. $socks_host_ip = $sox[$p][0];
  110. $sox[$p][1] = str_replace("\n","",$sox[$p][1]);
  111. $socks_host_port = $sox[$p][1];
  112.  
  113. $smtps[$q][4]=str_replace("\n","",$smtps[$q][4]);
  114. $ip=$smtps[$q][0];
  115. $port=$smtps[$q][1];
  116. $encryption=$smtps[$q][2];
  117. $user=$smtps[$q][3];
  118. $pass=$smtps[$q][4];
  119. $emsplit = explode("@",$emails);
  120. $enc_email=base64_encode($emails[$i]);
  121. $link2=str_replace("@","-",$emails[$i]);
  122. $link2=str_replace("_","-",$link2);
  123. $letter=ereg_replace('/[\]/',"",$letter);
  124. $letter=ereg_replace("&email&",$emails[$i],$letter);
  125. $letter=ereg_replace("&emailenc&",$domeniu."/?id=".$enc_email,$letter);
  126. $letter=ereg_replace("&date&",date("d.m.Y"),$letter);
  127.  
  128. if($test_smtp==1)
  129. {
  130. $subject=$ip." ".$port." ".$encryption." ".$user." ".$pass." ".$subject;
  131. }
  132.  
  133. $to=$emails[$i];
  134.  
  135. // if(send($socks_host_ip, $socks_host_port, $ip,$port,$encryption,$user,$pass,"intl-".Random(4)."@".Random(4).$dhost,$sender_name, $emails[$i],$subject,$letter))
  136. if(send($socks_host_ip, $socks_host_port, $ip,$port,$encryption,$user,$pass,$user,$sender_name, $emails[$i],$subject,$letter))
  137. {
  138. $myFile = "SENT";
  139. $fh = fopen($myFile, 'a+');
  140. # $data1 = $to." ".$ip.":".$user."\n";
  141. $data1 = $to." ".$ip." ".$port." ".$encryption." ".$user." ".$pass."\n";
  142. fwrite($fh, $data1);
  143. fclose($fh);
  144. echo ($i+1)." -> ".$to." -> ".$ip.":".$user." -> \033[1;32mSENT\033[37m\n";
  145. }
  146. else
  147. {
  148. $myFile = "FAILED";
  149. $fh = fopen($myFile, 'a+');
  150. $data1 = $to." ".$ip.":".$user." ".$socks_host_port."\n";
  151. fwrite($fh, $data1);
  152. fclose($fh);
  153. echo ($i+1)." -> ".$to." -> ".$ip.":".$user." -> \033[1;31mFAILED\033[37m\n";
  154. }
  155. posix_kill(getmypid(), 9);
  156. }
  157. else
  158. {
  159. $child++;
  160. if($child == $max )
  161. {
  162. pcntl_wait($status);
  163. $child--;
  164. }
  165. }
  166. $q++;
  167. $p++;
  168. }
  169. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement