自动登录中南大学校园网,保持校园网登录态。
复制 config.env.example 为 config.env,填写你的学号、密码和运营商类型:
cp config.env.example config.env配置项说明:
username="812345678"
password="your_password_here"
type="1" # 1=中国移动, 2=中国联通, 3=中国电信, 4=校园网Shell 版本会持续检测网络状态;发现掉线后会自动重新认证,适合长期挂在本机或服务器上运行。
直接运行:
sh shell/csu-autoauth.sh或者给脚本执行权限后运行:
chmod +x shell/csu-autoauth.sh
./shell/csu-autoauth.sh日志文件默认写入:
logs/csu-autoauth.log
停止运行可直接按 Ctrl + C。
先安装依赖:
pip install -r requirements.txt再运行:
python python/auto.pyPython 版本适合手动触发或配合定时任务使用;如果你想持续保活,优先使用 Shell 版本。