Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
domeniczz committed Aug 15, 2023
0 parents commit ef37961
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/runGladosAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 开始每日签到

on:
workflow_dispatch:
schedule:
# UTC 1点30分(北京时间 9点30分)
- cron: 30 1 * * *
# 标星时触发工作流程
watch:
types: [started]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run checkin
run: |
python3 glados.py
env:
GLADOS_COOKIE: "${{ secrets.GLADOS_COOKIE }}"
PUSHPLUS_TOKEN: ${{ secrets.PUSHPLUS_TOKEN }}
- uses: gautamkrishnar/keepalive-workflow@master
28 changes: 28 additions & 0 deletions .github/workflows/syncGit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 获取最新脚本
on:
schedule:
- cron: "0 12 * * 1"
workflow_dispatch:
watch:
types: started
repository_dispatch:
types: sync-zero205-scripts
jobs:
repo-sync:
env:
PAT: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false

- name: sync lukeys-scripts
uses: repo-sync/github-sync@v2
if: env.PAT
with:
source_repo: "https://github.com/lukesyy/glados_automation.git"
source_branch: "main"
destination_branch: "main"
github_token: ${{ secrets.PAT }}
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# glados自动签到,实现无限白嫖。

原仓库地址:https://github.com/lukesyy/glados_automation

复制了一个仓库,防止原仓库被 Github 封后,Fork 也都失效

环境变量:`GLADOS_COOKIE`(必要) 和 `PUSHPLUS_TOKEN`(非必要)

`GLADOS_COOKIE`多个账号需使用 '&' 隔开
示例:cookie&cookie&cookie



# 食用方法 (github_actions)

1.点击右上角 **fork** 按钮

2.在自己仓库中打开此项目

3.配置环境变量

4.点亮右上角的星星 **star** 激活 actions

5.然后点击 Actions 标签查看运行的详细状况

# 青龙面板
直接把 glados_Qinglong.py 文件放到青龙里 环境变量同上。

# 自动同步上游代码(非必要)
环境变量名称 `PAT`
点击 https://github.com/settings/tokens 按下图操作 申请一个秘钥 放到环境变量里就可以了

![微信截图_20230423132436](https://user-images.githubusercontent.com/70319988/233821350-908a0752-658d-4452-919d-8e7b1acf81f4.png)
![微信截图_20230423132355](https://user-images.githubusercontent.com/70319988/233821351-f7644740-325b-41cb-8d86-0b9692d9eedb.png)

# Tips

当你签到差不多一个月的时候就不能百分百获得一天的使用额度,而是有几率获得一天的额度。如果觉得好用建议 购买一个30天的pro套餐 就可以一直签到一直续杯了。

![image](https://user-images.githubusercontent.com/70319988/231369203-c812910a-963d-45b8-98a5-95b2623c25d7.png)
![image](https://user-images.githubusercontent.com/70319988/199923789-639e8295-b03e-4abd-858e-ff427015512a.png)
![image](https://user-images.githubusercontent.com/70319988/199923884-d81dd457-ecc5-4de9-b480-191d25217c47.png)

42 changes: 42 additions & 0 deletions glados.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import requests,json,os
# -------------------------------------------------------------------------------------------
# github workflows
# -------------------------------------------------------------------------------------------
if __name__ == '__main__':
# pushplus秘钥 申请地址 http://www.pushplus.plus
sckey = os.environ.get("PUSHPLUS_TOKEN", "")
# 推送内容
sendContent = ''
# glados账号cookie 直接使用数组 如果使用环境变量需要字符串分割一下
cookies = os.environ.get("GLADOS_COOKIE", []).split("&")
if cookies[0] == "":
print('未获取到COOKIE变量')
cookies = []
exit(0)
url= "https://glados.rocks/api/user/checkin"
url2= "https://glados.rocks/api/user/status"
referer = 'https://glados.rocks/console/checkin'
origin = "https://glados.rocks"
useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
payload={
'token': 'glados.one'
}
for cookie in cookies:
checkin = requests.post(url,headers={'cookie': cookie ,'referer': referer,'origin':origin,'user-agent':useragent,'content-type':'application/json;charset=UTF-8'},data=json.dumps(payload))
state = requests.get(url2,headers={'cookie': cookie ,'referer': referer,'origin':origin,'user-agent':useragent})
#--------------------------------------------------------------------------------------------------------#
time = state.json()['data']['leftDays']
time = time.split('.')[0]
email = state.json()['data']['email']
if 'message' in checkin.text:
mess = checkin.json()['message']
print(email+'----结果--'+mess+'----剩余('+time+')天') # 日志输出
sendContent += email+'----'+mess+'----剩余('+time+')天\n'
else:
requests.get('http://www.pushplus.plus/send?token=' + sckey + '&content='+email+'cookie已失效')
print('cookie已失效') # 日志输出
#--------------------------------------------------------------------------------------------------------#
if sckey != "":
requests.get('http://www.pushplus.plus/send?token=' + sckey + '&title='+email+'签到成功'+'&content='+sendContent)


46 changes: 46 additions & 0 deletions glados_Qinglong.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import requests,json,os

# pushplus秘钥
sckey = os.environ.get("PUSHPLUS_TOKEN", "")
sendContent = ''
# glados账号cookie
cookies= os.environ.get("GLADOS_COOKIE", []).split("&")
if cookies[0] == "":
print('未获取到COOKIE变量')
cookies = []
exit(0)


def start():
url= "https://glados.rocks/api/user/checkin"
url2= "https://glados.rocks/api/user/status"
referer = 'https://glados.rocks/console/checkin'
origin = "https://glados.rocks"
useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
payload={
'token': 'glados.one'
}
for cookie in cookies:
checkin = requests.post(url,headers={'cookie': cookie ,'referer': referer,'origin':origin,'user-agent':useragent,'content-type':'application/json;charset=UTF-8'},data=json.dumps(payload))
state = requests.get(url2,headers={'cookie': cookie ,'referer': referer,'origin':origin,'user-agent':useragent})
#--------------------------------------------------------------------------------------------------------#
time = state.json()['data']['leftDays']
time = time.split('.')[0]
email = state.json()['data']['email']
if 'message' in checkin.text:
mess = checkin.json()['message']
print(email+'----'+mess+'----剩余('+time+')天') # 日志输出
global sendContent
sendContent += email+'----'+mess+'----剩余('+time+')天\n'
else:
requests.get('http://www.pushplus.plus/send?token=' + sckey + '&content='+email+'更新cookie')
#--------------------------------------------------------------------------------------------------------#
if sckey != "":
requests.get('http://www.pushplus.plus/send?token=' + sckey + '&title=VPN签到成功'+'&content='+sendContent)


def main_handler(event, context):
return start()

if __name__ == '__main__':
start()

0 comments on commit ef37961

Please sign in to comment.