001.<?php
002.
003.
004.
005.
006.
007.
008.
009.if($_POST['submit']){
010.
011.$spoof = (stripslashes(trim($_POST['spoof'])));
012.$target = (stripslashes(trim($_POST['target'])));
013.$reply = (stripslashes(trim($_POST['reply'])));
014.$title = str_replace(array("\n", "\r"), '',stripslashes(trim($_POST['title'])));
015.$body = (stripslashes(trim($_POST['body'])));
016.
017.$headers = "From: $spoof\r\n";
018.$headers .= "Reply-To: $reply\r\n";
019.$headers .= 'MIME-Version: 1.0' . "\n";
020.$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
021.
022.$regex="/^[a-zA-Z][\w \.\-]+[a-zA-Z0-9]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,4}$/";
023.if($spoof == "" || !preg_match($regex, $spoof)){
024.
025.echo "<font color='red'><b> Error: No Spoof Email Provided or Email Invalid!
026.</font></b>";
027.exit;
028.}
029.elseif($target == "" || !preg_match($regex, $target)){
030.echo "<font color='red'><b> Error: No Target Email Provided or Email Invalid!
031.</font></b>";
032.exit;
033.}
034.elseif($reply == ""){
035.echo "<font color='red'><b> Error: No Reply Email Provided! </font></b>";
036.exit;
037.}
038.elseif($title == ""){
039.echo "<font color='red'><b> Error: No Email Title Provided! </font></b>";
040.exit;
041.}
042.elseif($body == ""){
043.echo "<font color='red'><b> Error: No Email Body Provided! </font></b>";
044.exit;
045.}
046.else{
047.mail($target, $title, $body, $headers);
048.echo "Mail Was Sent!";
049.}
050.}
051.else{
052.?>
053.<!-- This is the CSS which makes the form look the way it does. -->
054.<html>
055.<body>
056.<style type="text/css">
057.body {
058.font-family: Arial;
059.font-size: .9em;
060.}
061.input {
062.background: #ECFDCE;
063.border: 1px solid green;
064.}
065.textarea {
066.background: #ECFDCE;
067.border: 1px solid green;
068.}
069.legend {
070.border: 1px solid #048DB4;
071.background: #F0F8FF;
072.}
073.
074.fieldset {
075.border: 1px solid #048DB4;
076.width: 18.7em;
077.padding-left: 11px;
078.padding-bottom: 20px;
079.background: #F0F8FF;
080.}
081.<!-- This is the HTML form -->
082.</style>
083.<fieldset>
084.<legend>Email Spoofer</legend>
085.<form action="" method="POST">
086.Spoofed Email:<br>
087.<input type="text" size="40" name="spoof"><br>
088.Targets Email:<br>
089.<input type="text" size="40" name="target"><br>
090.Reply Email:<br>
091.<input type="text" size="40" name="reply"><br>
092.Message Title:<br>
093.<input type="text"size="40" name="title"><br>
094.Message Body:<br>
095.<textarea rows="10" cols="30" name="body">
096.</textarea><br>
097.<input type="submit" value="Submit" name="submit">
098.<input type="reset" value="Clear">
099.</form>
100.</fieldset>
101.</body>
102.</html>
103.<?php
104.}
105.?>
106.</pre>