Auto authenticate to public wifis or test hotspots

This small Python script will automatically login to public hotspots or development networks. It monitors the iwd wireless lan network daemon and performs an authentication process as soon it is connected and a matching connection profile is present.

Do not use this in production or against real public access points, since automatically logging in will violate most of the terms of use. The useage of this software is for development or research purpose only.

Python script performing authentication

An profile script matches the ESSID as filename. It is a YAML file containing instructions as a sequence of http requests.

- request:
    url: http://example.com/login
  response:
    - jquery: "form[name='login'] input[name='username']"
      capture:
        macaddress: [ "@value" ]
- request:
    url: http://example.com/login
    method: POST
    form:
      username: <% macaddress[0] %>
      password: example123

The http request is done by hyperpotamus, which you’ll need as a dependency to use this program.

Feel free to submit your connection profiles to the GitLab repository! The script itself is also present there.

I’ll consider doing some packaging for this script and will provide systemd unit files to run this program as a daemon in the background :)

Update 2020/08: I created an AUR package, so in ArchLinux everything you’ll have to do is install the package and do systemctl enable --now iwd-autocaptiveauth to use this script :)

💬 Are you interested in our work or have some questions? Join us in our public Signal chat pi crew 👋
🪙 If you like our work or want to supprot us, you can donate MobileCoins to our address.

Leave a Reply

Your email address will not be published. Required fields are marked *