校园网 ePortal 单人登录实现(Python 3)。
仅用于你有明确授权的账号与网络环境。请勿用于未授权账号测试、撞库或冒用登录。
python3 single_login.py \
--index-url 'http://117.176.173.90/eportal/index.jsp?...' \
--username '你的账号' \
--password '你的密码' \
--check-online可选参数:
--base-url默认http://117.176.173.90/eportal/--service手动指定服务名(不指定则自动选默认服务)--logout-after-check在查询在线状态后按userIndex执行下线
from single_login import LoginRequest, login_once
req = LoginRequest(
base_url="http://117.176.173.90/eportal/",
index_url="http://117.176.173.90/eportal/index.jsp?...",
username="你的账号",
password="你的密码",
)
result = login_once(req, check_online=True)
print(result.login_response)
print(result.online_response)- 调用
InterFace.do?method=pageInfo/getServices/login - 复刻页面关键逻辑:
queryString双重编码- 用户名双重编码
password + ">" + mac后反转并 RSA 加密(当passwordEncrypt=true)
index_url要用当次重定向得到的完整链接(含wlanuserip/.../mac/...)。- 若页面开启验证码或运营商附加字段,本模块当前未交互处理这类分支。