LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Connect to Public Unsecured Wireless Networks using command line and scripts (https://www.linuxquestions.org/questions/linux-wireless-networking-41/connect-to-public-unsecured-wireless-networks-using-command-line-and-scripts-4175476430/)

plackons 09-09-2013 12:39 AM

Connect to Public Unsecured Wireless Networks using command line and scripts
 
Hello
I would like to find an automated way to connect to networks such as Starbucks using command line shell scripts or perl scripts.
I already run the wpa_supplicant and can get assigned the IP address.
The network however has landing pages that use forms and checkboxes for "Terms And Conditions".
It is not my intent to bypass the legal agreements and the security. I simply want to accept the conditions and temporarily connect to the internet in the background without user intervention.
This should be possible using a combination of perl and shell scripts. Can someone advise?

Thanks!

business_kid 09-10-2013 03:50 AM

IME you have to fine-tune each of those for the access point in question. They are very different. Some clearly want you to accept terms and conditions, others require a login.

plackons 09-10-2013 09:15 AM

Hi,
Thanks for the reply. I found that at least as far as teh Starbucks for example, they are very standard between their different stores. They have the same script running in each.
The issue I am across now is I have a perl script to mechanize the form submission to the AP, but I dont know what URL I should pass to the script.

Thanks!

schneidz 09-10-2013 09:24 AM

i imagine it would be the router that passes that webpage: usually 192.168.0.1 or 192.168.1.1 or 192.168.2.1 or 10.0.0.1 ...

i think you can use wget with post to get and respond to the landing page in the terminal... also maybe elinks will help ?

business_kid 09-11-2013 03:22 AM

Quote:

Originally Posted by plackons (Post 5025264)
Hi,
Thanks for the reply. I found that at least as far as teh Starbucks for example, they are very standard between their different stores. They have the same script running in each.
The issue I am across now is I have a perl script to mechanize the form submission to the AP, but I dont know what URL I should pass to the script.

Thanks!

IME, some use a very standard one as has been mentioned; others run the dhcp server on weird machines (10.0.0.43) as it is a load that can be moved. Others again have layers of access on the same network, which confuses things mightily.

schneidz 09-11-2013 07:31 AM

the last time i was at a hotel the wifi user/pass was a weird combination of room number and last name. i had to call the front desk 3 times because someone at my job booked the room (good luck automating that).

i just remembered... my job uses cisco-vpn but it doesnt work well with public wifi. so they put together some vpn-helper batch script that opens an ms-explorer frame that temporarilly disables the web proxy and allows the user to enter in the wifi credentials and then hands off the rest of the automated process to the cisco-vpn.

i think lack of standardization of public wifi hotspots makes it close to impossible to fully automate without human intervention.


All times are GMT -5. The time now is 09:11 AM.