Jump to content

Pineapple Phishing Issue


Recommended Posts

I have managed to get php installed and everything setup correctly however the redirect.php file is not picking up the URL i enter.

In this file i have the following:

<?php
$ref = $_SERVER['HTTP_REFERER'];


if (strpos($ref, "facebook"))	{ header('Location: facebook.html'); }

else{
	require('peets.html');
	}

?>	

If i echo $ref there is no data in it. Do i have to enter the ref command into the index.html file and post it across to the redirect.php?

PHP is diffrent installed correctly as i can echo stuff however just not getting any data entered for $ref.

Anyone know how to get around this problem?

Link to comment
Share on other sites

Some browsers dont set the referrer variable, or maybe you are hitting the page directly, it won't work unless you have dns masquerading set up correctly and hit facebook.com/index.html hosted on the pineapple. If you just hit the redirect.php, there won't be a redirect set because you weren't redirected from anywhere.

If you still can't get it working, maybe try using javascript on the html page to get the window.location and send that as a get request to the redirect.php file...

Edited by UnDeFiNeD
Link to comment
Share on other sites

I mentioned this to Darren when he first released the script, I'd personally go for checking $_SERVER['HTTP_HOST'] instead of the referrer as it checks the URL you have not the one where you came from.

Try changing HTTP_REFERER to HTTP_HOST and see if that fixes it.

Link to comment
Share on other sites

I mentioned this to Darren when he first released the script, I'd personally go for checking $_SERVER['HTTP_HOST'] instead of the referrer as it checks the URL you have not the one where you came from.

Try changing HTTP_REFERER to HTTP_HOST and see if that fixes it.

:) sounds good to me, another thing to consider is using include() or echo file_get_contents() in the index.php page instead of just redirecting to the html page.

I would also have liked to point my 404 errors to the redirect page, but idk how to set this webserver up for that...

Link to comment
Share on other sites

I mentioned this to Darren when he first released the script, I'd personally go for checking $_SERVER['HTTP_HOST'] instead of the referrer as it checks the URL you have not the one where you came from.

Try changing HTTP_REFERER to HTTP_HOST and see if that fixes it.

Unfortunately using Ubuntu Firefox 3.6.17 I have the same problem irrespective of whether I use HTTP_HOST or HTTP_REFERER.

Link to comment
Share on other sites

This is how I think it should look:

<?php
$ref = $_SERVER['HTTP_HOST'];

if (strpos($ref, "facebook")) {
  header('Location: facebook.html');
  exit;
} else {
  require('peets.html');
  exit;
}

?>  

Link to comment
Share on other sites

This is how I think it should look:

<?php
$ref = $_SERVER['HTTP_HOST'];

if (strpos($ref, "facebook")) {
  header('Location: facebook.html');
  exit;
} else {
  require('peets.html');
  exit;
}

?>  

Sorry...same problem as before.

Thanks for all your support - much appreciated!

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