Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. <?php
  2.  
  3. if($_POST['submit']){
  4.  
  5. $spoof = (stripslashes(trim($_POST['spoof'])));
  6. $target = (stripslashes(trim($_POST['target'])));
  7. $reply = (stripslashes(trim($_POST['reply'])));
  8. $title = str_replace(array("\n", "\r"), '', stripslashes(trim($_POST['title'])));
  9. $body = (stripslashes(trim($_POST['body'])));
  10.  
  11. $headers = "From: $spoof\r\n";
  12. $headers .= "Reply-To: $reply\r\n";
  13. $headers .= 'MIME-Version: 1.0' . "\n";
  14. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  15.  
  16. $regex="/^[a-zA-Z][\w \.\-]+[a-zA-Z0-9]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,4}$/";
  17. if($spoof == "" || !preg_match($regex, $spoof)){
  18.  
  19. echo "<font color='red'><b> Error: No Spoof Email Provided or Email Invalid!
  20. </font></b>"; //error checking
  21. exit;
  22. }
  23. elseif($target == "" || !preg_match($regex, $target)){
  24. echo "<font color='red'><b> Error: No Target Email Provided or Email Invalid!
  25. </font></b>";
  26. exit;
  27. }
  28. elseif($reply == ""){
  29. echo "<font color='red'><b> Error: No Reply Email Provided! </font></b>";
  30. exit;
  31. }
  32. elseif($title == ""){
  33. echo "<font color='red'><b> Error: No Email Title Provided! </font></b>";
  34. exit;
  35. }
  36. elseif($body == ""){
  37. echo "<font color='red'><b> Error: No Email Body Provided! </font></b>";
  38. exit;
  39. }
  40. else{
  41. mail($target, $title, $body, $headers);
  42. echo "Mail Was Sent!";
  43. }
  44. }
  45. else{
  46. ?>
  47. <!-- This is the CSS which makes the form look the way it does. -->
  48. <html>
  49. <title> TheUnknown1's E-mail spoofer </title>
  50. <body>
  51. <style type="text/css">
  52. body {
  53. font-family: Arial;
  54. font-size: .9em;
  55. }
  56. input {
  57. background: #ECFDCE;
  58. border: 1px solid green;
  59. }
  60. textarea {
  61. background: #ECFDCE;
  62. border: 1px solid green;
  63. }
  64. legend {
  65. border: 1px solid #048DB4;
  66. background: #F0F8FF;
  67. }
  68.  
  69. fieldset {
  70. border: 1px solid #048DB4;
  71. width: 18.7em;
  72. padding-left: 11px;
  73. padding-bottom: 20px;
  74. background: #F0F8FF;
  75. }
  76. <!-- This is the HTML form -->
  77. </style>
  78. <fieldset>
  79. <legend>TheUnknown1's E-mail spoofer</legend>
  80. <form action="" method="POST">
  81. Spoofed Email:<br>
  82. <input type="text" size="40" name="spoof"><br>
  83. Targets Email:<br>
  84. <input type="text" size="40" name="target"><br>
  85. Reply Email:<br>
  86. <input type="text" size="40" name="reply"><br>
  87. Message Title:<br>
  88. <input type="text"size="40" name="title"><br>
  89. Message Body:<br>
  90. <textarea rows="20" cols="42" name="body">
  91. </textarea><br>
  92. <input type="submit" value="Submit" name="submit">
  93. <input type="reset" value="Clear">
  94. </form>
  95. </fieldset>
  96. </body>
  97. </html>
  98. <?php
  99. }
  100.  
  101.  
  102. ?>
  103. </pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement