Git Product home page Git Product logo

auto-sign's Introduction

Hi, nice to meet you there.

Welcome to my github page!
I'm 子墨

My GitHub Statistics

Stars Forks

auto-sign's People

Contributors

2eui2ehi2e avatar mrjesen avatar zimoloveshuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-sign's Issues

推送

server酱无法使用,日志中没有server酱相关提示
image

模拟登陆api服务器关闭

请求模拟登陆api服务器时,有时候会报错,错误是Connection refused,在linux上搞的定时任务,报错后就没办法打卡了,,
捕获

TYUT测试失败

返回数据如下:

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

请问这个问题如何处理

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)

关于福州大学mod。。。

疑似虽然会过期,但好像是在几个中循环,昨天12点抓包的,今天凌晨过期,但10点半抓包又变回去了,

(已解决)存在签到但是程序运行提示[当前没有未签到任务]

问题解决,经过抓包发现请假之后签到不会出现在['datas']['unSignedTasks']里面,而是在['datas']['leaveTasks']里面,把代码中的['datas']['unSignedTasks']替换成['datas']['leaveTasks']就可以成功签到了。(副作用就是在非请假状态时不能签到了,回校后再改回['datas']['unSignedTasks'])学校真够**,请假了还要签到。

之前是可以正常使用的,变化就是我请了假,但这个签到是请假也会发送的(图片上的已签是我手动用今日校园签的
Screenshot_20201222194442

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

今日校园版本更新,并使用了新的 DES Key

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',

或者诸位可以使用 我的分支

KeyError: 'cookies'

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'}

通用流程下执行login.py遇到的问题

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 验证码发送失败

求救

今日校园似乎更新导致脚本失效

使用原脚本提示

自动签到失败,原因是:请提交正确的签到信息

搜索看到这位大佬的commit中增加 "uaIsCpadaily":True

尝试增加 form['uaIsCpadaily'] = True

后提示变为

自动签到失败,原因是:今日校园版本过低,请更新至最新版本!

望dalao解答 QAQ

www.cpdaily.com 访问不了导致脚本失效了

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',))

发送邮件失败

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

功能需求

能做一个实现销假的界面么?感谢

设置问题

就是用generate.py那个文件读取出来的是之前老师发的一个信息收集文件而不是现在正在进行打卡的签到文件

fzu签到失效

IMG_20200826_092249
如图,改了版本号也不行,不知道是不是请求体变了Ծ‸Ծ

今日校园最新的接口

大佬,今天今日校园更改了最新的接口,别的接口我都抓到了,现在就差一个获取最新签到的接口,想问下,你们抓到了吗?

执行index.py后卡死,无报错。

使用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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.