Jump to content

Help With Redirect.php


sawks

Recommended Posts

Just wondered if anyone whos got this working can give me any tips.

I have pineapple mk4.

dns spoofing is turned on.

Dns spoof config =

172.16.42.1 example.com

landing page config=

<html>

<head>

<meta http-equiv="REFRESH" content="0;url=redirect.php">

</head>

<body>

</body>

</html>

redirect.php =

<?php

$ref = $_SERVER['HTTP_REFERER'];

if (strpos($ref, “example”)){ header('Location: example.html'); }

require('default.html');

?>

default.html just has text default, and example.html just has text hello

when i goto example.com from a browser it redirect me to:

http://www.example.com/redirect.php

and brings up the text from default.html :(

So its not redirecting to example.html

Can anyone help??

Link to comment
Share on other sites

How bazaar!!

I SSHed into the pineapple and found in the configs the symbol " had been replaced with ...

so if (strpos($ref, “example”)){ header('Location: example.html'); }

was actually

if (strpos($ref, ...example...)){ header('Location: example.html'); } so it didnt work.

All fixed. sorry about that.

Link to comment
Share on other sites

never mind i figured it out.... it was the redirect.php that was causing me problems. I posted the revised php:


<?php
$ref = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if (strpos($ref, "example")) { header('Location: example.html'); }
?>
[/CODE]

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