学校的联通网换了新的运营商,从锐捷客户端认证改成了 Web 认证。相对于锐捷认证,Web 认证更加自由。但有一个问题就是,树莓派工作在命令行界面的时候不好进行 Web 认证,因此写了这个小程序。
简介
jauth 是一个 Python 程序。通过模拟用户访问认证页面,进行登录。
兼容性
所有操作系统。在下面的环境下测试成功:
- PC, Windows 10, 64-bit
- PC, Ubuntu 18.04 LTS, 64-bit
- 树莓派 3B, FreeBSD 11.2
- 树莓派 3B, Raspbian Stretch
- VMWare, macOS High Sierra
前置需求
- 安装 Python 3
- 安装 beautifulsoup4 与 requests
安装
wget --no-check-certificate https://raw.githubusercontent.com/CYRO4S/jauth/master/jauth.py && chmod +x jauth.py
使用
- 提供账号与密码
./jauth.py account [账号] [密码]
- 进行认证。
./jauth.py connect
- 若需解除认证,执行:
./jauth.py disconnect