Skip to content

Commit

Permalink
Add decoded output file
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 1, 2024
1 parent 9857288 commit 76acb33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 66 deletions.
2 changes: 1 addition & 1 deletion output.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Sat Nov 30 2024 05:45:56 GMT+0000 (Coordinated Universal Time)
//Sun Dec 01 2024 01:21:03 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const _0x49dfef = _0x5370a4("电信营业厅");
Expand Down
66 changes: 1 addition & 65 deletions output.py
Original file line number Diff line number Diff line change
@@ -1,65 +1 @@
#2024-11-30 05:45:47
import requests
import os
import time
import random
import hashlib
class yuanshen():
def __init__(self,cookie):
self.cookie=cookie
self.h={"Host":"app.zhuanbang.net","accept":"application/json, image/webp","user-agent":"Mozilla/5.0 (Linux; Android 12; M2104K10AC Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.104 Mobile Safari/537.36 HuoNiuFusion/1.25.0_231652","x-requested-with":"XMLHttpRequest","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://app.zhuanbang.net/assist/activity/47","accept-language":"zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7","accept-encoding":"gzip","Cookie":f"NiuToken={self.cookie}"}
def sign_(self):
d=f"{self.csrftoken}#{self.sessionId}#{self.time}"
byte_string=d.encode('utf-8')
sha1=hashlib.sha1()
sha1.update(byte_string)
sign=sha1.hexdigest()
return sign
def video(self,key):
i=0
while True:
i+=1
url=f"https://app.zhuanbang.net/{key}/launch?_random={int(time.time() * 1000)}&type=slide"
r=requests.get(url,headers=self.h).json()
if r['code']==0:
print(f"第[{i}]个红包获取信息成功")
self.csrftoken=r['data']['extArgs']['csrfToken']
self.sessionId=r['data']['extArgs']['sessionId']
self.time=int(time.time())
url=f"https://app.zhuanbang.net/{key}/award/grant?_t={self.time}"
data={"csrfToken":f"{self.csrftoken}","deviceId":f"{self.sessionId}","timestamp":f"{self.time}","sign":f"{self.sign_()}"}
r=requests.post(url,headers=self.h,data=data).json()
if r['code']==0:
print(f"第[{i}]个红包领取成功,获得[{r['data']['awardMoney']}]元")
else:
print(f"第[{i}]个红包领取失败---[{r['msg']}]")
break
else:
print(f"第[{i}]个获取红包信息失败---[{r['msg']}]")
break
if i>=21:
break
time.sleep(random.randint(20,48))
def main(self):
print("===========开始执行快手刷视频===========")
self.video("kwai_video")
print("===========快手刷视频执行完毕===========")
print("===========开始执行抖音刷视频===========")
self.video("pangle_video")
print("===========抖音刷视频执行完毕===========")
if __name__=='__main__':
cookie=''
if not cookie:
cookie=os.getenv("yuanshen_zb")
if not cookie:
print("⛔️请设置环境变量:yuanshen_zb")
exit()
cookies=cookie.split("@")
print(f"一共获取到{len(cookies)}个账号")
i=1
for cookie in cookies:
print(f"\n--------开始第{i}个账号--------")
main=yuanshen(cookie)
main.main()
print(f"--------第{i}个账号执行完毕--------")
i+=1
#2024-12-01 01:20:54

0 comments on commit 76acb33

Please sign in to comment.