Skip to content

关于研究生账号登录问题 #18

@Neptonsliner

Description

@Neptonsliner

我写了如下的测试程序

from zzupy import network, ZZUPy
import logging
import os

# 清除可能存在的代理环境变量
os.environ.pop('HTTP_PROXY', None)
os.environ.pop('HTTPS_PROXY', None)
os.environ.pop('http_proxy', None)
os.environ.pop('https_proxy', None)

logging.basicConfig(level=logging.DEBUG)

me = ZZUPy("(myusercode)","(mypassword)")
try:
    info = me.login()
    print(info)
except Exception as e:
    print(e)

DEBUG日志显示:

PS C:\Users\19463\Documents\Work\Gitea项目\My_Program\AutoLogin> & C:/Users/19463/.conda/envs/other_program/python.exe c:/Users/19463/Documents/Work/Gitea项目/My_Program/AutoLogin/main.py
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:httpcore.connection:connect_tcp.started host='cas.s.zzu.edu.cn' port=443 local_address=None timeout=5.0 socket_options=None
DEBUG:httpcore.connection:connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x000002442C63B4D0>
DEBUG:httpcore.connection:start_tls.started ssl_context=<ssl.SSLContext object at 0x000002442C5FDB50> server_hostname='cas.s.zzu.edu.cn' timeout=5.0
DEBUG:httpcore.connection:start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x000002442C63E0D0>
DEBUG:httpcore.http11:send_request_headers.started request=<Request [b'GET']>
DEBUG:httpcore.http11:send_request_headers.complete
DEBUG:httpcore.http11:send_request_body.started request=<Request [b'GET']>
DEBUG:httpcore.http11:send_request_body.complete
DEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'GET']>
DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Server', b'nginx'), (b'Date', b'Mon, 15 Sep 2025 12:14:45 GMT'), (b'Content-Type', b'text/plain;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Vary', b'Accept-Encoding'), (b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'Cache-Control', b'no-cache, no-store, max-age=0, must-revalidate'), (b'Pragma', b'no-cache'), (b'Expires', b'0'), (b'Strict-Transport-Security', b'max-age=31536000 ; includeSubDomains'), (b'X-Frame-Options', b'DENY'), (b'Content-Encoding', b'gzip')])
INFO:httpx:HTTP Request: GET https://cas.s.zzu.edu.cn/token/jwt/publicKey "HTTP/1.1 200 "
DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'GET']>
DEBUG:httpcore.http11:receive_response_body.complete
DEBUG:httpcore.http11:response_closed.started
DEBUG:httpcore.http11:response_closed.complete
DEBUG:httpcore.connection:connect_tcp.started host='token.s.zzu.edu.cn' port=443 local_address=None timeout=5.0 socket_options=None
DEBUG:httpcore.connection:connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x000002442C63F4D0>
DEBUG:httpcore.connection:start_tls.started ssl_context=<ssl.SSLContext object at 0x000002442C5FDB50> server_hostname='token.s.zzu.edu.cn' timeout=5.0
DEBUG:httpcore.connection:start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x000002442C65CE90>
DEBUG:httpcore.http11:send_request_headers.started request=<Request [b'POST']>
DEBUG:httpcore.http11:send_request_headers.complete
DEBUG:httpcore.http11:send_request_body.started request=<Request [b'POST']>
DEBUG:httpcore.http11:send_request_body.complete
DEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'POST']>
DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'Server', b'nginx'), (b'Date', b'Mon, 15 Sep 2025 12:14:46 GMT'), (b'Content-Type', b'application/json;charset=UTF-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Vary', b'Accept-Encoding'), (b'Vary', b'Origin'), (b'Vary', b'Access-Control-Request-Method'), (b'Vary', b'Access-Control-Request-Headers'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'Cache-Control', b'no-cache, no-store, max-age=0, must-revalidate'), (b'Pragma', b'no-cache'), (b'Expires', b'0'), (b'Strict-Transport-Security', b'max-age=31536000 ; includeSubDomains'), (b'X-Frame-Options', b'DENY'), (b'Content-Encoding', b'gzip')])
INFO:httpx:HTTP Request: POST https://token.s.zzu.edu.cn/password/passwordLogin?username=__RSA__TjYJhXEwHZvZVSsVee%2B%2FGiF90%2FgoKnSHQFQ274yOgGGo8zPljBQde5BYsaq4fpgqCUBkjuG8KI4dUmcZhhzPcsAaWo4nS4h%2FggTFxGHe%2BmQsnKxSAwc7OMIqJWdrd7aop2HSoWLwfibZw%2FHgIOdX6bVEJLcnHR1MSI9Dl%2BN0CeFhfyOkYNCtN%2Bwhs1pMalwsaw1AmiAMxw5hsCJ11xDuTXUiN%2F%2FQLTL4KEmhATKKdJ4gt%2FzUngEZOPeI0Ti2ECoKIEX91VNwhcHRKg%2Fvcq6hf7MI85d2nfpGHfHy7BHudQxohchbFlUa3yklB4mwx9y8pUltmC%2F7qYn5IFBwyW8c5w%3D%3D&password=__RSA__FFhUlI6o1dmAHf5Dwxy9uhK2zVg4wDC5rSffwDA5PVtHn183gGxfhZQDZp5kSrBixKRn18wjnqwz2UP7wDUx7Z1aqerbU3%2BL9u55pE%2Byk1Iz7shVfVN0Lhf5F5LvdbOdPp9fI1jbVr%2BApvrbrnFyLJtttSl2QI9PVHvO8pjg%2FkOu%2Fodz3EI51tK8n78AaJwdI%2FGvyBysXz5SavziJJzh8GMKjhf0PMFd3%2FhE2kG5nvk2r6d9Zzs%2BhcD94nYiiLJRsxaavKdtF0odP7Ls53gVQZ%2BBrh4%2BRzshPFT0sxTb%2F9IauOE65vQtHslBBpXrac1H5%2FK9R6Nx6YkoQg4mTI4RMQ%3D%3D&appId=com.supwisdom.zzu&geo=&deviceId=&osType=android&clientId=&mfaState= "HTTP/1.1 200 "
DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
DEBUG:httpcore.http11:receive_response_body.complete
DEBUG:httpcore.http11:response_closed.started
DEBUG:httpcore.http11:response_closed.complete
DEBUG:httpcore.connection:connect_tcp.started host='jw.v.zzu.edu.cn' port=443 local_address=None timeout=5.0 socket_options=None
DEBUG:httpcore.connection:connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x000002442C65D5B0>
DEBUG:httpcore.connection:start_tls.started ssl_context=<ssl.SSLContext object at 0x000002442C5FDB50> server_hostname='jw.v.zzu.edu.cn' timeout=5.0
DEBUG:httpcore.connection:start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x000002442C652570>
DEBUG:httpcore.http11:send_request_headers.started request=<Request [b'POST']>
DEBUG:httpcore.http11:send_request_headers.complete
DEBUG:httpcore.http11:send_request_body.started request=<Request [b'POST']>
DEBUG:httpcore.http11:send_request_body.complete
DEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'POST']>
DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'x-application-context', b'application'), (b'cache-control', b'no-store'), (b'content-type', b'application/json;charset=UTF-8'), (b'content-length', b'135'), (b'date', b'Mon, 15 Sep 2025 12:27:33 GMT'), (b'set-cookie', b'SVRNAME=ws1; path=/'), (b'connection', b'close')])
INFO:httpx:HTTP Request: POST https://jw.v.zzu.edu.cn/app-ws/ws/app-service/super/app/login-token "HTTP/1.1 200 "
DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
DEBUG:httpcore.http11:receive_response_body.complete
DEBUG:httpcore.http11:response_closed.started
DEBUG:httpcore.http11:response_closed.complete

之后我尝试用该账号密码通过统一认证平台手动登录,可以成功登录(排除账号密码错误问题)
我将账号更换成一个本科生账号,此时可以正常登录

请问研究生账号是否对这里的登录有影响

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions