I’m at a resturant that offers free wifi. However before you can use it you need to accept their terms (and waivers I imagine). On my phone, it pops up a web page, with an “I agree” button that needs to be clicked.
What happens here is the device makes a request which is intercepted and a normal HTML page is sent back in response. Parse as normal. Send a POST back w the relevant data. Collect the cookies. Proceed.
Typically a network like that uses a special DNS server. When you request any page, the DNS A record you get is the log on server. The A record is served to you with an extremely short TTL. By the time you log on / accept the user agreement, the faked record expires in your devices DNS cache. This is why if you override the DHCP servers DNS with Google DNS 8.8.8.8 and 8.8.4.4 the log in doesn’t pop up
Also, different places have different log on pages. You would have to make an auto log on for every type of system you run into. I did it for a Cisco Clean Access system years ago using a scripted wget command.
Skewworks description is more accurate of today’s systems, DNS hijacking for this has been dead for 5 years or so. We now hijack your http or https session request redirect to a external site request input and then pass you through to originally requested site. Good news for you currently i know of no real system that obfuscates the form info they require. To form field that says email address and so on and a normally labeled submit or reject form button.
Also in the near term future(2-3 years) a group of us that make said systems are working on a global pass system that will auto log into said wifi sites and still record the info required by the operators and pass it on with out multiple entries by the end user. This itself is still in wifi consortium stage. so worry about it once it hits, it will be key based.
My experiences is only related to restaurants and retail outlets so your mileage may vary. The firewalls we currently interface with hold about 75-80% of the market so i would expect them to be the same in more then my segmented industries.