Login Captive Portal for Untangled firewall [Solved]

Non release banter
cttan
Shogun
Shogun
Posts: 333
Joined: 26 Jan 2011, 16:15
Distribution: Porteus 3.2 and 4.0 64bit KDE
Location: Malaysia

Login Captive Portal for Untangled firewall [Solved]

Post#1 by cttan » 14 Mar 2013, 00:55

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
Last edited by cttan on 18 Mar 2013, 07:52, edited 10 times in total.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Login Captive Portal for Untangled firewall Using Curl

Post#2 by Hamza » 14 Mar 2013, 08:13

Please download all this page content (including external JS/CSS files) and make a zip after upload it somewhere, after post the download link.
NjVFQzY2Rg==

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Login Captive Portal for Untangled firewall Using Curl

Post#3 by Hamza » 14 Mar 2013, 11:16

I have seen your edit but I need all resources loaded on this page including JS files which seems to be the most important.
NjVFQzY2Rg==

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Login Captive Portal for Untangled firewall Using Curl

Post#4 by Hamza » 14 Mar 2013, 18:24

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

cttan
Shogun
Shogun
Posts: 333
Joined: 26 Jan 2011, 16:15
Distribution: Porteus 3.2 and 4.0 64bit KDE
Location: Malaysia

Re: Login Captive Portal for Untangled firewall Using Curl

Post#5 by cttan » 14 Mar 2013, 22:31

Hi Hamza,

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

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Login Captive Portal for Untangled firewall Using Curl

Post#6 by Hamza » 14 Mar 2013, 22:37

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

cttan
Shogun
Shogun
Posts: 333
Joined: 26 Jan 2011, 16:15
Distribution: Porteus 3.2 and 4.0 64bit KDE
Location: Malaysia

Re: Login Captive Portal for Untangled firewall Using Curl

Post#7 by cttan » 15 Mar 2013, 02:17

Updated picture and PM sent

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Login Captive Portal for Untangled firewall [Solved]

Post#8 by Hamza » 18 Mar 2013, 07:53

Topic solved. :)
NjVFQzY2Rg==

Post Reply