Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For places with annoying captive portals that you have to log into every day, is there a way to capture and replay traffic (for the login page) when connected to a specific wifi network?

Edit: I have figured out how to bypass the captive portal that annoys me every day with a greasemonkey script:

// ==UserScript==
// @name        wifi-autologin
// @namespace   lakdsjf-ns
// @description Hopefully autologins to a wifi network
// @include*
// @include*
// @version     1
// @run-at document-end
// ==/UserScript==

window.addEventListener('load', submitAction);
share|improve this question
up vote 0 down vote accepted

If you're talking about a web-based login screen, there's a good chance it sets a cookie and a corresponding token, which change upon each viewing, in order to protect against Login CSRF. This would also prevent what you are trying to do from working.

Basically, this means that the form sets a unique cookie along with a token in a hidden form element, ensuring that the person submitting the form is the same person that requested the page.

On the off-chance that they don't do this, you could write a script to login via curl, and then place that script into /etc/network/if-up.d/ (as described here).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.