-
Notifications
You must be signed in to change notification settings - Fork 3
/
ck_didissz.py
141 lines (132 loc) · 9.39 KB
/
ck_didissz.py
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
# -*- coding: utf-8 -*-
# @url: https://raw.githubusercontent.com/yxnwh/kevinxf/main/xF_DiDi_ssz.py
# @author: zyf1118
"""
cron: 23 8,14 * * *
new Env('滴滴刷刷赚签到');
"""
import requests
import json, sys, os, re
import time, datetime,random
from sendNotify import send
from utils import get_data
requests.packages.urllib3.disable_warnings ()
wsgsig=['dd03-vx9tq2onDp0IZqcYVoABxTjsa%2BXNwlstUQ6fOSmVa%2BX%2BZhfRmNkDw6zkAz0%2BZA8rsJ2%2BzMKjCoJLpecxVoEAOMK%2FBzf2SAJmXo6ax6Nre%2BnNYVNkX72aP6KjAJE',
'dd03-67TGcdCHNXqCW0FVDMhX%2B%2F%2B650AFtbkyCIqj4r3350AEWfAm9TIW%2B9cKMnqEWXIwEPUQLAXc%2BWT0%2FiFqd1%2Fn%2Be36LslfUXIyD61n%2BAgNL096XnZxBMZUNl%2BN%2BXO',
'dd03-rxqml47pGugrvrGTzy%2FbOp8ud3nWyknnyQTDxoGxd3nXv%2FDzSNEfP8%2BSFQgXvBJlYJP3Q%2BvlFR3UTdGPxKw9RJGuE3%2BtZa8rPod9xp3uF3KrvEbhPolCP3KkEQ9',
'dd03-%2FbmamzeJR3QXGQJTThyOOv18ZuJqDzvOpFvUyJM1ZuJrGv%2BqxrbhQvEIOJQrGJGQPVzxPRA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dxONxlnc0%2BaNWavjG6HIYqGHFK14i9ukG6HHxUiAgphNWrjVgTOHxevJDR5CVhXrfSVKRAnf0QMHUURrg1x6OF%2BcE3H4iaujgYkaOFpcbQA8WrnqgHY',
'dd03-qRg6qKKGw8DUhpRWx14yy%2BGcozttku3szw3OOycdoztshyoQT1jxw%2B3Fz%2BDsh%2BXqZ57hz8NBzoNrX3RwPYNpxuNERz8tUztXwOsOxQbCzuf%2FV3nWx1sSy%2BJGx%2BE',
'dd03-zzyKkOo5PQ82t3sQsSuQOLnIvJz7W%2BchqOjyw6mNvJz8tKXZiL3ROSz8Qu88tuojWHnXRwR5QRb5lpspswWSQSJNQJc4tzultPnYx5R3QzKGrzzrswzuw2v8zQd',
'dd03-XGGZ8J%2FbhAtQdOYFue33BNV0tqDTaxI7YaKLgzOAtqDSdZxfQls2DNrai9tSdHk5yh%2BeA7ldiaopC6YAue4JB7SA%2FAtkf1rLulKLfyqCWVnldOTKul4KgvYC%2F9S',
'dd03-DOgz5gRWq%2FAYTS%2F26v82Acsji9qzOZBC5z3Jdsjki9qyTxlJN4j8AcuVtqAyTLwA387cDDoXsrMxv2%2F5KKfKAfX%2Fs9HyTIYG8NK0BtnjrV5uZ5LDJvfKAWWUrq5',
'dd03-kQNDYoKdpT7kl4cdP27UVJJBxMyj%2FNsaRxDm%2F4cGxMyilJf2Z2QtUQ3gSx7ilv8cT60pXuNdSwchtoc%2BPINqUJcETYN%2Fr7DdOSbqU3JgTO%2BqrRJEQP%2B%2FV%2BbfSTd',
'dd03-RnANOxOD1Z3H9sJdnUHQlIrfJ2u%2Ben09kqMvqH%2FaJ2uN9jj1WEUokZZA4P3N9CubiAIsnPrD4OgMGgmNmd5plZPCN2NIF0zGlUBwqLxCNPNHaitCnE6xlZqa2ZA'
]
class DIDIssz:
def __init__(self, check_items):
self.check_items = check_items
def get_xpsid(self):
try:
url = f'https://v.didi.cn/p/7mPlO68'
heards = {
"user-agent": f"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 didi.passenger/6.2.4 FusionKit/1.2.20 OffMode/0",
}
response = requests.head (url=url, headers=heards, verify=False) # 获取响应请求头
res = response.headers['Location'] # 获取响应请求头
r = re.compile (r'root_xpsid=(.*?)&channel_id')
xpsid = r.findall (res)[0].split("&")[0]
return xpsid
except Exception as e:
print (e)
#查看福利金
@staticmethod
def get_fulijin(token,wsgsig):
try:
wsgsig1 = wsgsig[random.randint (0, 25)]
nowtime = int (round (time.time () * 1000))
info_url = f'https://rewards.xiaojukeji.com/loyalty_credit/bonus/getWelfareUsage4Wallet?wsgsig={wsgsig1}&token={token}&city_id=21'
info_headers = {
"user-agent": f"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 didi.passenger/6.2.4 FusionKit/1.2.20 OffMode/0",
"Referer": "https://page.udache.com/",
"origin": "https://page.udache.com",
"content-type": "application/json",
"host": "rewards.xiaojukeji.com",
}
response = requests.get (url=info_url, headers=info_headers, verify=False)
result = response.json()
print(result)
balance = result['data']['balance']
res = f"现总共有{balance}福利金"
return res
except Exception as e:
print(e)
#执行积分签到
@staticmethod
def do_sign(token,xpsid,wsgsig):
try:
uid = ''.join (random.sample ('01234657890123456789', 15)) #281474990465673
imei = ''.join (random.sample ('123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 32))
wsgsig1 = wsgsig[random.randint (0, 25)]
do_sign_url = f'https://bosp-api.xiaojukeji.com/gulfstream/hubble/open/signin/submit?wsgsig={wsgsig1}'
data = r'{"xbiz":"240200","prod_key":"ut-discover","xpsid":"' + f"{xpsid}" + r'","dchn":"7mPlO68","xoid":"9921f9b4-e3f1-444f-8409-dec4e9af99e4","uid":"' + f'{uid}' + r'","xenv":"passenger","xspm_from":"","xpsid_root":"' + f"{xpsid}" + r'","xpsid_from":"","xpsid_share":"","token":"' + f"{token}" + r'","lat":"23.0164990234375","lng":"113.81229031032986","city_id":21,"env":"{\"newTicket\":\"' + f"{token}" + r'\",\"latitude\":\"23.0164990234375\",\"longitude\":\"113.81229031032986\",\"cityId\":\"21\",\"userAgent\":\"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 didi.passenger/6.2.4 FusionKit/1.2.20 OffMode/0\",\"appVersion\":\"6.2.4\",\"wifi\":\"1\",\"model\":\"iPhone 11\",\"ddfp\":\"'+ f'{imei}' + r'\",\"fromChannel\":\"1\",\"newAppid\":\"10000\",\"isHitButton\":false,\"isOpenWeb\":true,\"timeCost\":36}","openid":"","platform":"na","res_params":"{\"resource_names\":\"didipas_find_feed\",\"appversion\":\"6.2.4\",\"channel_id\":\"\",\"platform_type\":1}"}'
do_sign_heards = {
"user-agent": f"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 didi.passenger/6.2.4 FusionKit/1.2.20 OffMode/0",
"Referer": "https://page.udache.com/",
"origin": "https://page.udache.com",
"content-type": "application/json",
"host":"bosp-api.xiaojukeji.com",
}
response = requests.post(url=do_sign_url,data=data,headers=do_sign_heards,verify=False)
do_sign_ = response.json()
print("do_sign_#积分签到")
print(do_sign_)
code = do_sign_['errno'] #本次签到获得的积分
if code == 200100:
res = f"今日刷刷赚已签到,无需重复签到"
elif code == 0:
#prize_status = do_sign_['data']['prize_status'] #5天签到周期内签到第几天
content = do_sign_['data']['content']
content = content[6:]
res = f"今日签到成功,获得{content}"
else:
res = code
return res
except Exception as e:
print(e)
def main(self):
msg_all = ""
i = 1
for check_item in self.check_items:
token = check_item.get("token")
xpsid = self.get_xpsid()
msg = (
f"账号 {i}\n------ 滴滴刷刷赚开始------\n"
+ self.do_sign(token=token,xpsid=xpsid,wsgsig=wsgsig)
+ "\n"
+ self.get_fulijin(token=token,wsgsig=wsgsig)
+ "\n------ 滴滴刷刷赚结束------"
)
i += 1
msg_all += msg + "\n\n"
return msg_all
if __name__ == "__main__":
data = get_data()
_check_items = data.get("DIDI", [])
res = DIDIssz(check_items=_check_items).main()
send("滴滴刷刷赚", res)