sawks Posted July 15, 2012 Share Posted July 15, 2012 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?? Quote Link to comment Share on other sites More sharing options...
sawks Posted July 15, 2012 Author Share Posted July 15, 2012 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. Quote Link to comment Share on other sites More sharing options...
Neworld Posted July 23, 2012 Share Posted July 23, 2012 I'm having similar problems.... can you explain where you found the configs file to fix the problem? Quote Link to comment Share on other sites More sharing options...
Neworld Posted July 24, 2012 Share Posted July 24, 2012 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] 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.