It's a tool to auto login NJUPT wifi.
❗ Warning: If you are using a proxy,remember to add p.njupt.edu.cn
to the proxy whitelist.
-
Download the realse edition and double-click to run the file.
-
If it's the first time to run the file.It will generate a config file
account.json
和wifi.log
under the current path.Remember to change the details in config file.(Next session is about how to set the config.)
⭕ Tips: When you move the file,remember to move the config together.
- After setting config,run the file will try to connect NJUPT wifi.If it connected there will be a System notification
⭕ Tips: If you want to exit the software,please use TaskManager.
the account.json will as the follow.
{
"account": "account",
"mode": "mode",
"password": "password",
"step": 5
}
Replace
-
account → "your account"
-
mode → "cmcc"(移动)/"njxy"(电信)/""(校园网)
-
password → "your password"
-
Step: It's the time interval between two connections, default is 5 seconds.(It's not essential)
If you want use/change other parameters please rebuild the file.
The file will return outputs in log to check whether the connection is successful.
Here are some outputs.
Outputs | Meanings | Status |
---|---|---|
Generated account.json.Change the information. | complete the config and run again | ⭕ |
dr1003({"result":0,"msg":"AC999","ret_code":2}); | already connected | ✔ |
dr1003({"result":0,"msg":"从 Radius 获取错误代码出现异常!","ret_code":1}); | mode wrong | ❌ |
dr1003({"result":0,"msg":"账号或密码错误(ldap 校验)","ret_code":1}); | account or password wrong | ❌ |
ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))) | turn off your proxy | ❌ |
(Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000239E5903A00>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) |
connect the correct wifi | ❌ |
dr1003({"result":1,"msg":"Portal 协议认证成功!"}); | successfully connect | ✔ |
If you want to build the file by yourself, please make sure you have installed the following packages.
And use pyinstaller
and following command to build the file.
pyinstaller --onefile --noconsole --clean --hidden-import plyer.platforms.win.notification wifi.py
Welcome Issues and PRs.