Page 1 of 1

Login Captive Portal for Untangled firewall [Solved]

Posted: 14 Mar 2013, 00:55
by cttan
Anybody know how to login the Captive Portal for Untangled firewall using curl and php? or is there any other method which I can use with bash script?
I have tried using various method from Google search without success.
Before this page I am prompted with a page with some links(Continue or Always... ) to click.

Pls see portal outlook here:-
http://postimage.org/image/g6j050xs9/
http://postimage.org/image/547mlzmlt/

Portal source here:-
https://www.box.com/s/qehgwwxyb6ymnfa778rk

Edited
Hi Hamza,

Sorry for misunderstanding you. Pls see zip file in above link.

Solution provided by Hamza:-

Code: Select all

#!/bin/bash

# Replace with your firewall username
user="YOUR_USERNAME"
# Replace with your firewall password
pass="YOUR_PASSWORD"
# Replace only the x.x.x.x with the firewall web IP which is 192.168.127.254 in your screenshot.
url="http://x.x.x.x/users/authenticate"
cookies=/tmp/captive-cookie.txt

wget --keep-session-cookies --save-cookies $cookies -o /tmp/captive-login.log --post-data="username=$user&password=$pass" $url

Re: Login Captive Portal for Untangled firewall Using Curl

Posted: 14 Mar 2013, 08:13
by Hamza
Please download all this page content (including external JS/CSS files) and make a zip after upload it somewhere, after post the download link.

Re: Login Captive Portal for Untangled firewall Using Curl

Posted: 14 Mar 2013, 11:16
by Hamza
I have seen your edit but I need all resources loaded on this page including JS files which seems to be the most important.

Re: Login Captive Portal for Untangled firewall Using Curl

Posted: 14 Mar 2013, 18:24
by Hamza
Thanks, that is a simple login system. Please note that even if you can log in from php/bash script (executed in CLI), you'll not able to browser directly from your browser as all login systems, it uses cookies which can't be imported to Firefox from bash script.

That such system is good when you want to download something automatically without needing to put your details each time.

In order to permanently save your details for automatic login, you can use a feature in most know browsers, named "Save password" which will save your details into the browser database and will auto fill up the input box next time you'll visit the website/page.

Re: Login Captive Portal for Untangled firewall Using Curl

Posted: 14 Mar 2013, 22:31
by cttan
Hi Hamza,

I just want to login only. No other interaction require for the site.
It is used to autheticate firewall user.

Re: Login Captive Portal for Untangled firewall Using Curl

Posted: 14 Mar 2013, 22:37
by Hamza
If that is a private project. Please email me using "Email" feature in my profile and I'll be happy to help you. There is a way to login automatically.

Re: Login Captive Portal for Untangled firewall Using Curl

Posted: 15 Mar 2013, 02:17
by cttan
Updated picture and PM sent

Re: Login Captive Portal for Untangled firewall [Solved]

Posted: 18 Mar 2013, 07:53
by Hamza
Topic solved. :)