Welcome to my github page!
I'm 子墨
zimoloveshuang / auto-sign Goto Github PK
View Code? Open in Web Editor NEW今日校园自动签到,通用
今日校园自动签到,通用
就是用generate.py那个文件读取出来的是之前老师发的一个信息收集文件而不是现在正在进行打卡的签到文件
福州大学的,出现了这个错误
今天更新了今日校园,老的家庭地址从多选变成了{其他:【文本框】}这个怎么配置对应的yml参数?
难道是系统升级了可以检测出来没通过APP的签到?
如题,就算打卡失败也不应该直接exit(-1),单用户的话还行,但是对于多用户,如果第一个用户打卡失败了,后面的用户就不用打卡了
使用ctrl+c中止后,提示信息如下
File "/usr/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
Traceback (most recent call last):
File "/Users/cnyue/Git/auto-submit/index.py", line 388, in
print(main_handler({}, {}))/Users/cnyue/Git/auto-submit/generate.py
File "/Users/cnyue/Git/auto-submit/index.py", line 381, in main_handler
raise e
File "/Users/cnyue/Git/auto-submit/index.py", line 347, in main_handler
session = getSession(user, apis['login-url'])
File "/Users/cnyue/Git/auto-submit/index.py", line 109, in getSession
cookieStr = str(res.json()['cookies'])
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-09-05 11:32:19 {'tenantId': 'fzu', 'login-url': 'http://id.fzu.edu.cn/authserver/login?service=https%3A%2F%2Ffzu.cpdaily.com%2Fportal%2Flogin', 'host': 'fzu.cpdaily.com'}
2020-09-05 11:32:19 正在获取MOD_AUTH_CAS。。。
2020-09-05 11:32:20 获取MOD_AUTH_CAS成功。。。
2020-09-05 11:32:21 第1个默认配置项错误,请检查
fail
救~~~~
https://mobile.campushoy.com/v6/config/guest/tenant/list
和
https://mobile.campushoy.com/v6/config/guest/tenant/list
上了UA检测
你们的APP现在竟然敢请求root权限?真的无法无天了
总是提示自动签到失败,原因是:系统出现错误,可能是Cookies过期了
www.cpdaily.com 访问不了导致脚本失效了
Traceback (most recent call last):
File "/opt/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/var/lang/python3/lib/python3.6/socket.py", line 743, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/opt/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/opt/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/opt/urllib3/connection.py", line 300, in connect
conn = self._new_conn()
File "/opt/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f88b19d3518>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.cpdaily.com', port=443): Max retries exceeded with url: /v6/config/guest/tenant/list (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f88b19d3518>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/runtime/python3/bootstrap.py", line 176, in handle
ret = self.real_handler(event, context)
File "/var/user/index.py", line 323, in main_handler
raise e
File "/var/user/index.py", line 321, in main_handler
main()
File "/var/user/index.py", line 309, in main
apis = getCpdailyApis(user)
File "/var/user/index.py", line 50, in getCpdailyApis
schools = requests.get(url='https://www.cpdaily.com/v6/config/guest/tenant/list', verify=not debug).json()['data']
File "/opt/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/opt/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/opt/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/opt/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.cpdaily.com', port=443): Max retries exceeded with url: /v6/config/guest/tenant/list (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f88b19d3518>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Traceback (most recent call last):
File "index.py", line 349, in <module>
print(main_handler({}, {}))
File "index.py", line 342, in main_handler
raise e
File "index.py", line 340, in main_handler
main()
File "index.py", line 333, in main
session = getSession(user, apis)
File "index.py", line 116, in getSession
cookieStr = str(res.json()['cookies'])
KeyError: 'cookies'
API似乎失效了
{'timestamp': '2020-12-30T00:50:35.882+00:00', 'status': 500, 'error': 'Internal Server Error', 'message': '', 'path': '/wisedu-unified-login-api-v1.0/api/login'}
我用断点调试,发现 res 没有 datas 属性 这是为啥
今日校园版本更新,原有密钥失效,想请教一下大佬们是如何获得最新密钥的呀?
start http wiki. zimo:8080超时导致任务失败!望修复!
2020-09-17 11:12:07 自动签到成功
2020-09-17 11:12:07 正在发送邮件通知。。。
Starting new HTTP connection (1): www.zimo.wiki:8080
http://www.zimo.wiki:8080 "POST /mail-sender/sendMail HTTP/1.1" 200 None
2020-09-17 11:12:08 发送邮件通知失败。。。
2020-09-17 11:12:08 {'msg': 'Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256\n', 'code': 1}
END RequestId: d61d184d-65bf-4031-b7b5-bc82b098ff39
Report RequestId: d61d184d-65bf-4031-b7b5-bc82b098ff39 Duration:1923ms Memory:128MB MemUsage:56.179688MB
DogeZhang/auto-sign#3 (comment)
参考:
# submitForm
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 (4471302144)cpdaily/8.2.9 wisedu/8.2.9',
def DESEncrypt(s, key='ST83=@XV'):
# extension = { ......
"model": "iPhone10,1",
'appVersion': '8.2.9',
'systemVersion': '13.3.1',
'systemName': 'iOS',
# 似乎不用
'RetrofitHeader': '8.2.9',
或者诸位可以使用 我的分支
请问是什么原因?
使用原脚本提示
自动签到失败,原因是:请提交正确的签到信息
搜索看到这位大佬的commit中增加 "uaIsCpadaily":True
尝试增加 form['uaIsCpadaily'] = True
后提示变为
自动签到失败,原因是:今日校园版本过低,请更新至最新版本!
望dalao解答 QAQ
这边貌似教务后台登录出了点问题,尝试自己解决,就不麻烦项目作者了
问问大家看看
大佬,今天今日校园更改了最新的接口,别的接口我都抓到了,现在就差一个获取最新签到的接口,想问下,你们抓到了吗?
疑似虽然会过期,但好像是在几个中循环,昨天12点抓包的,今天凌晨过期,但10点半抓包又变回去了,
2020-09-05 21:42:28 {'login-url': 'http://id.fzu.edu.cn/authserver/login?service=https%3A%2F%2Ffzu.cpdaily.com%2Fportal%2Flogin', 'host': 'fzu.cpdaily.com'}
2020-09-05 21:42:29 None
2020-09-05 21:42:29 {'msg': 'login failed! 登陆失败,cookies返回为null', 'code': 1, 'cookies': None}
Process finished with exit code -1
这啥问题
希望大佬提供解决思路
返回数据如下:
Traceback (most recent call last):
File "/var/user/index.py", line 324, in main_handler
raise e
File "/var/user/index.py", line 322, in main_handler
main()
File "/var/user/index.py", line 312, in main
params = getUnSignedTasks(session, apis)
File "/var/user/index.py", line 144, in getUnSignedTasks
if len(res.json()['datas']['unSignedTasks']) < 1:
File "/opt/requests/models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "/var/lang/python3/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/var/lang/python3/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/var/lang/python3/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
同样的账户数据在auto-submit
项目中可以正常使用
执行日志如下:
START RequestId: 269c399c-0b65-4bdc-a5b4-0669ef369fe1
Event RequestId: 269c399c-0b65-4bdc-a5b4-0669ef369fe1
Starting new HTTPS connection (1): www.cpdaily.com:443
https://www.cpdaily.com:443 "GET /v6/config/guest/tenant/list HTTP/1.1" 200 None
Starting new HTTPS connection (1): www.cpdaily.com:443
https://www.cpdaily.com:443 "GET /v6/config/guest/tenant/info?ids=tyut HTTP/1.1" 200 None
Starting new HTTPS connection (1): tyut.campusphere.net:443
https://tyut.campusphere.net:443 "GET / HTTP/1.1" 302 154
https://tyut.campusphere.net:443 "GET /portal/index.html HTTP/1.1" 200 None
2020-10-30 13:18:44 {'login-url': 'https://tyut.campusphere.net/iap/login?service=https%3A%2F%2Ftyut.campusphere.net%2Fportal%2Flogin', 'host': 'tyut.campusphere.net'}
Starting new HTTP connection (1): www.zimo.wiki:8080
http://www.zimo.wiki:8080 "POST /wisedu-unified-login-api-v1.0/api/login HTTP/1.1" 200 None
2020-10-30 13:18:45 acw_tc=2f624a0616040351251098055e6b82ffebb10480388cb8daff6bdeb820f5ad;CONVERSATION=iap-1018615872508040-CONV-46fa580b-0c20-402b-9075-6ad6a0f789a1;CASTGC=iap-1018615872508040-TGT-30339081-bc8c-4590-88f1-df0785919e47;MOD_AUTH_CAS=ST-iap:1018615872508040:ST:5979e453-7258-492a-af00-c55dc5f9e730:20201030131845
Starting new HTTPS connection (1): tyut.campusphere.net:443
https://tyut.campusphere.net:443 "POST /wec-counselor-sign-apps/stu/sign/getStuSignInfosInOneDay HTTP/1.1" 404 710
https://tyut.campusphere.net:443 "POST /wec-counselor-sign-apps/stu/sign/getStuSignInfosInOneDay HTTP/1.1" 404 710
END RequestId: 269c399c-0b65-4bdc-a5b4-0669ef369fe1
Report RequestId: 269c399c-0b65-4bdc-a5b4-0669ef369fe1 Duration:2248ms Memory:128MB MemUsage:59.2383MB
运行偶尔失败
2021-07-15 23:55:06 {'tenantId': 'ahjzu', 'login-url': 'xxxxx(链接点进去直接就是我的金指教育品台了,所以不展示了', 'host': 'ahjzu.campusphere.net'}
2021-07-15 23:55:06 正在获取验证码。。。
2021-07-15 23:55:06 验证码发送失败
求救
能做一个实现销假的界面么?感谢
问题解决,经过抓包发现请假之后签到不会出现在['datas']['unSignedTasks']里面,而是在['datas']['leaveTasks']里面,把代码中的['datas']['unSignedTasks']替换成['datas']['leaveTasks']就可以成功签到了。(副作用就是在非请假状态时不能签到了,回校后再改回['datas']['unSignedTasks'])学校真够**,请假了还要签到。
之前是可以正常使用的,变化就是我请了假,但这个签到是请假也会发送的(图片上的已签是我手动用今日校园签的
START RequestId: 81eb24e3-1372-4165-83b3-745357e97d9f
Event RequestId: 81eb24e3-1372-4165-83b3-745357e97d9f
Starting new HTTPS connection (1): mobile.campushoy.com:443
https://mobile.campushoy.com:443 "GET /v6/config/guest/tenant/list HTTP/1.1" 200 None
Starting new HTTPS connection (1): mobile.campushoy.com:443
https://mobile.campushoy.com:443 "GET /v6/config/guest/tenant/info?ids=1020395759466146 HTTP/1.1" 200 None
Starting new HTTPS connection (1): xxxxxxxx.campusphere.net:443
https://xxxxxxxx.campusphere.net:443 "GET / HTTP/1.1" 302 154
https://xxxxxxxx.campusphere.net:443 "GET /portal/index.html HTTP/1.1" 200 None
2020-12-22 10:00:06 {'login-url': 'https://xxxxxxxx.campusphere.net/iap/login?service=https%3A%2F%2Fxxxxxxxx.campusphere.net%2Fportal%2Flogin', 'host': 'xxxxxxxx.campusphere.net'}
Starting new HTTP connection (1): www.zimo.wiki:8080
http://www.zimo.wiki:8080 "POST /wisedu-unified-login-api-v1.0/api/login HTTP/1.1" 200 None
Starting new HTTPS connection (1): xxxxxxxx.campusphere.net:443
https://xxxxxxxx.campusphere.net:443 "POST /wec-counselor-sign-apps/stu/sign/queryDailySginTasks HTTP/1.1" 200 None
https://xxxxxxxx.campusphere.net:443 "POST /wec-counselor-sign-apps/stu/sign/queryDailySginTasks HTTP/1.1" 200 None
2020-12-22 10:00:07 当前没有未签到任务
ERROR RequestId:81eb24e3-1372-4165-83b3-745357e97d9f Result:{"errorCode":-1,"errorMessage":"User process exit when running"}
END RequestId: 81eb24e3-1372-4165-83b3-745357e97d9f
Report RequestId: 81eb24e3-1372-4165-83b3-745357e97d9f Duration:3166ms Memory:64MB MemUsage:53.921875MB
我又来打扰了...
从昨天开始,签到返回的是SUCCESS,但是app里还是未签到,有人遇到么...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.