Boxiom Posted February 21, 2014 Share Posted February 21, 2014 Hello. So right now I have a splash where you simply have to click Accept to get access to the network. However, I want the user to input their name in a form to be able to continue. I also want that name to be stored somewhere, so I know who accessed the network and when. I tried using a form on the splash that sends the field inputs to a php script, but obviously the .php file never loads because you aren't authenticated yet. So, is there a way to either: 1. Save the value in a field anywhere on the pineapple 2. Process the form to a .php file and take care of the rest there? Thanks! Quote Link to comment Share on other sites More sharing options...
mreidiv Posted February 21, 2014 Share Posted February 21, 2014 You might look at this thread for more info you might be able to pm the op and get the scrypt and files. https://forums.hak5.org/index.php?/topic/30730-share-my-custom-nodogsplash-evil-portal-landing-page/?hl=nodogsplash or https://forums.hak5.org/index.php?/topic/31186-phising-page-for-nodogsplashevil-portal/?hl=nodogsplash Quote Link to comment Share on other sites More sharing options...
Boxiom Posted March 7, 2014 Author Share Posted March 7, 2014 Hi again. Haven't gotten any response on PM, so I'll try here again. How can I make the splash.htm work with .php files before they users are authenticated? Quote Link to comment Share on other sites More sharing options...
Boxiom Posted March 18, 2014 Author Share Posted March 18, 2014 Bumping this. Been looking around everywhere with no luck. The links posted above didn't help me because the original files were deleted. I tried placing the .php files in my /www folder, but I can't access them at all while using nodogsplash. So if anyone could help me out that would be great. Doesn't have to be done the way I'm thinking, any solution to this would be just fine. Quote Link to comment Share on other sites More sharing options...
newbi3 Posted March 18, 2014 Share Posted March 18, 2014 Have your HTML page post the information to a PHP script on your webserver thats runs on port 8080 in /www and have that script save it to a text file Quote Link to comment Share on other sites More sharing options...
Boxiom Posted March 18, 2014 Author Share Posted March 18, 2014 Thanks for the reply. I have uploaded my .php file to the /www folder, which processes the forms in the splash.html and saves the values to a text file. I tried to set FirewallRules allow 8080 in the nodogsplash config within the users-to-router. I also tried to allow that port within the preauthenticated-users. However, I am still not able to access the .php file when submitting the form in the splash file (i simply got stuck on the same page). My process.php looks like this: <html> <body> <?php date_default_timezone_set('Etc/GMT-1'); $date = date('m/d/Y G:i:s', time()); $space = ' '; $dataString = $_GET["wpakey"]; $dataString .= "\n"; $fWrite = fopen("guestbook.txt","a"); $wrote = fwrite($fWrite, $date.$space.$dataString); fclose($fWrite); ?> </body> </html> And within my splash.html I have a form that processes the inputs to the process.php. Any idea what I'm missing? Quote Link to comment Share on other sites More sharing options...
newbi3 Posted March 18, 2014 Share Posted March 18, 2014 Try making a file called test.php and in it write <?php echo "hello world"; ?> Then with nodogsplash running try to access 172.16.42.1:8080/test.php let me know if you see "hello world" Quote Link to comment Share on other sites More sharing options...
Boxiom Posted March 18, 2014 Author Share Posted March 18, 2014 Alright that worked fine. -_- I guess there's something wrong with my .php file then? I'll try tweaking it a bit and hopefully I'll figure it out. Thanks for the help so far! Quote Link to comment Share on other sites More sharing options...
newbi3 Posted March 19, 2014 Share Posted March 19, 2014 try this: 172.16.42.1:8080/process.php?wpakey=testing123 if that saves testing123 to a file then your problem is with your html. It could very well be that in your HTML form you are using a "POST" and in your PHP you are expecting a "GET" $dataString = $_GET["wpakey"]; If that is the case change $_GET to $_POST and that should fix your issue. $dataString = $_POST["wpakey"]; Quote Link to comment Share on other sites More sharing options...
Boxiom Posted March 19, 2014 Author Share Posted March 19, 2014 (edited) Alright, I tried that, and it worked fine. It saved testing123 to the text file. I also tried to upload the splash and process.php to some online free hosting just to test, and the whole thing worked fine. However, if I run nodogsplash and enter something into the textfields it doesn't save to a textfile. So I'm guessing there's something wrong with my html, like you said. The splash looks like this right now: <h1>Login</h1> <br> <h2>Wpakey:</h2> <form action="process.php" id="login-form" method="get"> <input type="password" name="wpakey"> <input type="submit" value="Log in"> </form> This didn't work. If I run nodogsplash and enter google.com, I am sent to the splash. When I then fill out the form and click Log In, it says www.google.com/process.php?wpakey=test123. So it somehow doesn't send to my .php file at all it seems. I also tried this, which didn't work either (just sends me to about:blank in the browser): <h1>Login</h1> <br> <h2>Wpakey:</h2> <form action="172.16.42.1:8080/process.php" id="login-form" method="get"> <input type="password" name="wpakey"> <input type="submit" value="Log in"> </form> What am I missing? Thanks. Edit: Just thought I'd mention that I am not authenticated in any way yet when trying this. I thought I'd redirect to the $authtarget after running the php script. Edited March 19, 2014 by Boxiom Quote Link to comment Share on other sites More sharing options...
newbi3 Posted March 19, 2014 Share Posted March 19, 2014 HTML <h1>Login</h1> <br> <h2>Wpakey:</h2> <form action="172.16.42.1:8080/process.php" id="login-form" method="post"> <input type="password" name="wpakey" id="wpakey"> <input type="submit" value="Log in"> </form> PHP <html> <body> <?php date_default_timezone_set('Etc/GMT-1'); $date = date('m/d/Y G:i:s', time()); $space = ' '; $dataString = $_POST["wpakey"]; $dataString .= "\n"; $fWrite = fopen("guestbook.txt","a"); $wrote = fwrite($fWrite, $date.$space.$dataString); fclose($fWrite); ?> </body> </html> I don't have the time to test it right now but go ahead and try that Quote Link to comment Share on other sites More sharing options...
Boxiom Posted March 19, 2014 Author Share Posted March 19, 2014 I tested it, and it simply sends me to an about:blank page in the browser. :/ Nothing is saved to guestbook.txt-file either. 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.