Go to file
2022-09-15 20:25:53 +08:00
bistu_wifi load config in order, /etc/bistu_wifi then ~/.config... 2022-09-15 19:03:04 +08:00
.gitignore ignore /build in git 2022-09-15 18:38:47 +08:00
auth-sample make a python package with script 2022-09-15 15:22:52 +08:00
pyproject.toml increase version number 2022-09-15 20:25:53 +08:00
README.md add README 2022-09-15 15:53:58 +08:00


This project's target is authorize bistu wifi without open a website and try to simplify the login process with a runnable script which can be easily integrated with autostart mechanism.

This project use only standard library of python3, and no other dependency, so there will be nothing annoying like No module named XXX. But also take it in mind that it's python3, I don't known if it work with python2.


Open the project directory and run

pip install .

After install, there will be a runnable script bistu-wifi at your bin, like ${HOME}/.local/bin if you install at user level, or /usr/bin (or somewhere I don't know) if you install at system level.


bistu-wifi --help
usage: bistu-wifi [-h] [-u [USERNAME]] [-p [PASSWORD]] [--host [HOST]] [-o] [-c [CONFIG]] [--notime]

Login or logout bistu wifi, by sending a post request to authorization host

  -h, --help            show this help message and exit
  -u [USERNAME], --username [USERNAME]
                        username you use to login bistu wifi
  -p [PASSWORD], --password [PASSWORD]
                        password you use to login bistu wifi
  --host [HOST]         host to send login/logout request to, default use
  -o, --logout          logout bistu wifi. try to login if not privided
  -c [CONFIG], --config [CONFIG]
                        load info(username, password, host) from config file. Will try /home/leafee98/.config/bistu-wifi/auth.ini if not provided.
  --notime              don't output time field in log

The format of config file is like below

    username = 202000000
    password = Bistu000000
    host =


Set the environment BISTU_WIFI_DEBUG and the script will print some more log.



Open the project directory and run

pip install --editable .

Then run the script use bistu-wifi. Don't use python -m bistu_wifi or python bistu_wifi/__main__.py because of relative import.

See more at python setuptools.