Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 0

孙勇军/sign_script

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (1)
master
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
The license selected for the repository is subject to the license used by the main branch of the repository.
master
Branches (1)
master
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (1)
master
sign_script
/
benteng.py
sign_script
/
benteng.py
benteng.py 10.41 KB
Copy Edit Raw Blame History
sunyj authored 2024年04月28日 10:56 +08:00 . 提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
'''
奔腾 benteng=xxx@xxxx
'''
import datetime
import json
import os
import pprint
import random
import time
import requests
import hashlib
def login(account, index):
try:
print(f'第{index}个账号 开始登录')
url = f'https://yomi.fawcar.com.cn/btyomi/usercenter/app/v1/v2/baseLogin'
param = {
"password": "hKIdguH\/Q7Dz1RJ40Xls07UiCKkNgKhzcQH\/DIhTV5TLdv9uYRBJqocbpi7\/uthDPFhOBmdjZvBVKDi6WL9kI3lCMOLiUZ7biK0GVnm8cKG\/cvCr6x3X9ltxacS4l\/b0b1GW4i3oSxURXM50PtpfF1GfD9m8WOCpih2yBIG1uKY=",
"account": account,
"continueToLogIn": "0",
"tspLoginRequest": {
"brand": "apple",
"model": "iPhone12,8",
"deviceId": "8441429492857328"
}
}
header = {
'Host': 'yomi.fawcar.com.cn',
'APP-Version': '4.1.0',
'Content-Type': 'application/json',
'Accept': '*/*',
'Connection': 'keep-alive',
'Accept-Language': 'zh-Hans-CN;q=1',
'Accept-Encoding': 'gzip, deflate, br'
}
response = requests.post(url=url, headers=header, data=json.dumps(param)).json()
print(f'第{index}个账号 登录成功')
return response
# if response["status"] == "000000":
# return f'第{index}个账号 签到成功,返回:{response["data"]}\n'
# return f'第{index}个账号 签到失败,返回:{response["data"]}\n'
except Exception as e:
return f'第{index}个账号 登录异常 {e}'
def get_nonce():
"""
生成一个指定长度的随机字符串
"""
randomlength = 16
random_str = ''
base_str = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
length = len(base_str) - 1
for i in range(randomlength):
random_str += base_str[random.randint(0, length)]
# print(random_str)
return random_str
def genHeader(data):
return {
'Host': 'yomi.fawcar.com.cn',
'APP-Version': '4.1.0',
'User-Aid': f'{data["aid"]}',
'User-Id': f'{data["userId"]}',
'Device-Type': 'iPhone12,8',
'Accept-Language': 'zh-Hans-CN;q=1',
'Accept-Encoding': 'gzip, deflate, br',
'Accept': '*/*',
'User-Agent': 'BTYomi_iOS_dis/4.1.0 (iPhone; iOS 15.5; Scale/2.00)',
'Connection': 'keep-alive',
'V-Origin': 'APP',
'Id-Token': f'{data["id_token"]}',
'User-Code': f'{data["userCode"]}'
}
def integral(data, header, index):
try:
print(f'第{index}个账号 开始获取积分')
url = f'https://abjfapi.yuanchixinxi.com/api/sign/user'
response = requests.post(url=url, headers=header, data=json.dumps({"sign": 1, "integral": 1, "all": 1})).json()
result = response["data"]
integral = result['integral']
today_integral = result['today_integral']
print(f'第{index}个账号 开始获取积分: 总积分[{integral}],今日新增积分[{today_integral}]')
return f'第{index}个账号 开始获取积分: 总积分[{integral}],今日新增积分[{today_integral}]'
except Exception as e:
return f'第{index}个账号 签到异常 {e}'
def signIn(data, header, index):
try:
print(f'第{index}个账号 开始签到')
url = f'https://abjfapi.yuanchixinxi.com/api/sign/integral'
response = requests.post(url=url, headers=header, data=json.dumps({})).json()
print(f'第{index}个账号 签到返回: {response}')
if response["status"] == 200:
return f'第{index}个账号 签到成功,返回:{response["msg"]}\n'
return f'第{index}个账号 签到失败,返回:{response["msg"]}\n'
except Exception as e:
return f'第{index}个账号 签到异常 {e}'
'''
抽奖
'''
def lottery(data, header, index):
try:
print(f'第{index}个账号 开始抽奖')
url = f'https://abjfapi.yuanchixinxi.com/api/v2/lottery'
response = requests.post(url=url, headers=header, data=json.dumps({"id": 2, "type": "1"})).json()
print(f'第{index}个账号 抽奖返回: {response}')
if response["status"] == 200:
return f'第{index}个账号 抽奖成功,返回:{response["data"]["prompt"]}\n'
return f'第{index}个账号 抽奖失败,返回:{response["msg"]}\n'
except Exception as e:
return f'第{index}个账号 抽奖异常 {e}'
'''
阅读
'''
def getArticles(commentList, header, index):
try:
print(f'第{index}个账号 开始获取文章列表')
url = f'https://yomi.fawcar.com.cn/btyomi/circle/app/v1/circle/getArticles?acttype=BTWTYPE&page=1&pageSize=10'
response = requests.get(url=url, headers=header).json()
msg = ""
i = 1
if response["code"] == '000000':
for n, item in enumerate(response["data"]):
comment = commentList[random.randint(0, len(commentList))]
url = f'https://yomi.fawcar.com.cn/serverApi/circle/app/v1/circle/addComment'
param = {"artcleid": f"{item['pkey']}", "commentUserId": "", "content": f"{comment}", "imgurl": ""}
if (i > 5):
return msg
portHeader = header
portHeader['Content-Type'] = "application/json"
response = requests.post(url=url, headers=portHeader, data=json.dumps(param)).json()
if response["code"] == '000000':
print(f'第{index}个账号 评论成功,返回:{response}')
msg += f'第{index}个账号 评论成功,返回:{response}\n'
else:
print(f'第{index}个账号 评论失败,返回:{response}')
msg += f'第{index}个账号 评论失败,返回:{response}\n'
i += 1
sleepmoment(30)
msg += f'第{index}个账号 获取文章列表失败,返回:{response}\n'
return msg
except Exception as e:
return f'第{index}个账号 获取文章列表异常 {e}'
'''
加入腾分圈
'''
def join(header, index):
try:
print(f'第{index}个账号 开始加入腾分圈')
url = f'https://yomi.fawcar.com.cn/btyomi/circle/app/v1/circle/getMycircleByUserId'
response = requests.get(url=url, headers=header).json()
if response["code"] == '000000':
print(f'第{index}个账号 评论成功')
return f'第{index}个账号 评论成功,\n'
else:
print(f'第{index}个账号 评论失败,返回:{response}')
return f'第{index}个账号 评论失败,返回:{response}\n'
sleepmoment(30)
except Exception as e:
return f'第{index}个账号 分享异常 {e}'
'''
分享
'''
def share(header, index):
try:
print(f'第{index}个账号 开始分享')
url = f'https://yomi.fawcar.com.cn/btyomi/member/app/v1/member/finishTask?changeDesc=%E8%BD%AC%E5%8F%91%E5%86%85%E5%AE%B9%E8%87%B3%E6%9C%8B%E5%8F%8B%E5%9C%88&money=&tacticsCode=PR-BT-Circle_friends_2&taskId=20'
response = requests.get(url=url, headers=header).json()
if response["code"] == '000000':
print(f'第{index}个账号 分享成功')
return f'第{index}个账号 分享成功,\n'
else:
print(f'第{index}个账号 分享失败,返回:{response}')
return f'第{index}个账号 分享失败,返回:{response}\n'
sleepmoment(30)
except Exception as e:
return f'第{index}个账号 分享异常 {e}'
'''
答题
'''
def question(data, header, index):
try:
print(f'第{index}个账号 开始答题')
url = f'https://abjfapi.yuanchixinxi.com/api/question/list'
response = requests.get(url=url, headers=header).json()
data = response["data"]
eid = data["e_id"]
list = data["list"]
answer_list = []
for item in list:
answer = {"question_id": item["id"], "answer": item["answer"]}
answer_list.append(answer)
sleepmoment(4)
answer_data = {"e_id": eid, "list": answer_list}
url = 'https://abjfapi.yuanchixinxi.com/api/question/submit'
response = requests.post(url=url, headers=header, data=json.dumps(answer_data)).json()
print(f'第{index}个账号 答题返回: {response}')
if response["status"] == 200:
return f'第{index}个账号 答题成功\n'
return f'第{index}个账号 答题失败\n'
except Exception as e:
return f'第{index}个账号 答题异常 {e}'
def webhook(message, webhookToken):
url = f'https://www.pushplus.plus/send'
headers = {
'Content-Type': 'application/json'
}
data = {
"token": webhookToken,
"title": "一汽奔腾",
"content": message,
"template": "json"
}
response = requests.post(url=url, data=json.dumps(data), headers=headers).json()
print(f"推送成功")
def genEnvs():
cks = os.environ['benteng']
cks = cks.split('@')
tokenArr = []
for ck in cks:
tokenArr.append(ck)
return tokenArr
def sleepmoment(num):
random_seconds = random.randint(1, num)
print(f'休眠{random_seconds}秒')
time.sleep(random_seconds)
if __name__ == '__main__':
print('开始执行...')
sleepmoment(60)
tokenArray = genEnvs()
length = len(tokenArray)
print(f'读取到{length}个账号')
webhookToken = os.environ['PUSH_PLUS_TOKEN']
msg = ""
commentList = ["一汽奔腾,奔腾不息!", "萌宠驾到,福利加码!", "悦己奔腾,福利加码!", "奔腾小马,来自一汽!",
"生活不是赶路,是感受风!"]
for index, ck in enumerate(tokenArray):
loginRes = login(ck, index + 1)
if loginRes["code"] != "000000":
continue
data = loginRes["data"]
header = genHeader(data)
msg += getArticles(commentList, header, index + 1)
sleepmoment(30)
msg += join(header, index + 1)
sleepmoment(30)
msg += share(header, index + 1)
sleepmoment(30)
# msg += signIn(ck, header, index + 1)
# sleepmoment(30)
# msg += lottery(ck, header, index + 1)
# sleepmoment(30)
# msg += question(ck, header, index + 1)
# sleepmoment(30)
# msg += share(ck, header, index + 1)
# sleepmoment(30)
# msg += integral(ck, header, index + 1)
# sleepmoment(30)
webhook(msg, webhookToken)
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

Releases

No release

Contributors

All

Language(Optional)

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/syjava/sign_script.git
git@gitee.com:syjava/sign_script.git
syjava
sign_script
sign_script
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /