This commit is contained in:
Faker 2022-10-23 23:24:02 +08:00
parent 582e3a07c5
commit c37d2c1443
6 changed files with 333 additions and 3654 deletions

File diff suppressed because one or more lines are too long

7
jd_dfw.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -9,14 +9,12 @@
一天只能帮助3个人多出的助力码无效
==========================Quantumultx=========================
[task_local]
#jd免费水果
1 1 1 1 1 jd_fruit_task.js
export DO_TEN_WATER_AGAIN="" 默认再次浇水
*/
const $ = new Env('东东农场日常任务-手动执行');
const $ = new Env('东东农场日常任务');
let cookiesArr = [],
cookie = '',
jdFruitShareArr = [],
@ -929,7 +927,39 @@ async function getFullCollectionReward() {
})
})
}
function beanTaskList() {
return new Promise(resolve => {
const options = {
"url": "https://api.m.jd.com/client.action?functionId=beanTaskList",
"body": "body=%7B%22viewChannel%22%3A%22AppHome%22%7D&build=167853&client=apple&clientVersion=10.2.0&d_brand=apple&d_model=iPhone11%2C8&ef=1&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A/3Zt8xYR%2Bd3&ep=%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22screen%22%3A%22ENS4AtO3EJS%3D%22%2C%22osVersion%22%3A%22CJGkDy4n%22%2C%22openudid%22%3A%22ENq3CzTwENGmYtc3ENSnYtC0DWTwCNdwZNcnZtYmEWU2ZwYnCwY0Cm%3D%3D%22%2C%22area%22%3A%22CJvpCJYmCV81CNS1EP82Ctq1EK%3D%3D%22%2C%22uuid%22%3A%22aQf1ZRdxb2r4ovZ1EJZhcxYlVNZSZz09%22%7D%2C%22ts%22%3A1637625634%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D&ext=%7B%22prstate%22%3A%220%22%7D&isBackground=N&joycious=117&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&partner=apple&rfs=0000&scope=11&sign=778b3d3d83e0d3f45508a958f306abda&st=1637627411874&sv=101&uemps=0-0&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJ1DpIH6AlcMry0eQsMwEN/GgP2FpcEJvoNVODK8ho6G6xfFEYSmOOdwauVOUqIQFPdxhcdWdM05U%2BMN5h6umteQ78SpJGXOymjKiTiGjvSOiTpoqO8k%2BT6stsfe0WS9QQ41HfWeVF6cdpDTzsmufz0XDdJ6CcltPUazK5UqRSuo0UyDMBmw/oWg%3D%3D",
"headers": {
"Cookie": cookie,
"Host": "api.m.jd.com",
"Accept": "*/*",
"Connection": "keep-alive",
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
"Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9",
"Accept-Encoding": "gzip,deflate,br",
"Content-Type": "application/x-www-form-urlencoded"
}
}
$.post(options, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
console.log(`${$.name} beanTaskList API请求失败请检查网路重试`)
} else {
// console.log('data-----beanTaskList', data)
data = $.toObj(data);
}
} catch (e) {
$.logErr(e, resp)
} finally {
resolve();
}
})
})
}
/**
* 领取10次浇水奖励API
*/

164
jd_plus2bean.js Normal file

File diff suppressed because one or more lines are too long

127
jd_pzhb_notify.py Normal file
View File

@ -0,0 +1,127 @@
# -*- coding:utf-8 -*-
"""
cron: 10 10 10 10 * jd_pzhb_notify.py
new Env('膨胀红包通知')
updatetime:2022/10/22
by dylan
"""
import requests
import json
import time
import os
import re
import sys
import random
import string
import urllib
def ramUA():
global uuid,addressid,iosVer,iosV,clientVersion,iPhone,area,ADID
uuid=''.join(random.sample(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','a','b','c','z'], 40))
addressid = ''.join(random.sample('1234567898647', 10))
iosVer = ''.join(random.sample(["15.1.1","14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1"], 1))
iosV = iosVer.replace('.', '_')
clientVersion=''.join(random.sample(["10.3.0", "10.2.7", "10.2.4"], 1))
iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1))
area=''.join(random.sample('0123456789', 2)) + '_' + ''.join(random.sample('0123456789', 4)) + '_' + ''.join(random.sample('0123456789', 5)) + '_' + ''.join(random.sample('0123456789', 4))
ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12))
UserAgent=''
if not UserAgent:
return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1'
else:
return UserAgent
def printf(text):
print(text)
sys.stdout.flush()
def load_send():
global send
cur_path = os.path.abspath(os.path.dirname(__file__))
sys.path.append(cur_path)
if os.path.exists(cur_path + "/sendNotify.py"):
try:
from sendNotify import send
except:
send=False
print("加载通知服务失败~")
else:
send=False
print("加载通知服务失败~")
load_send()
def get_remarkinfo():
url='http://127.0.0.1:5600/api/envs'
try:
with open(os.getcwd().replace('scripts','config')+'/auth.json', 'r') as f:
token=json.loads(f.read())['token']
headers={
'Accept':'application/json',
'authorization':'Bearer '+token,
}
response=requests.get(url=url,headers=headers)
for i in range(len(json.loads(response.text)['data'])):
if json.loads(response.text)['data'][i]['name']=='JD_COOKIE':
try:
if json.loads(response.text)['data'][i]['remarks'].find('@@')==-1:
remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].replace('remark=','').replace(';','')
else:
remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].split("@@")[0].replace('remark=','').replace(';','')
except:
pass
except:
printf('读取auth.json文件出错跳过获取备注\n')
def getinfo(ck):
global sendnotifycation
global inflateMaxAward
inflateMaxAward=0
url='https://api.m.jd.com/client.action?functionId=promote_pk_getAmountForecast'
headers={
'content-type':'application/x-www-form-urlencoded',
'accept':'application/json, text/plain, */*',
'accept-language':'zh-cn',
'accept-encoding':'gzip, deflate, br',
'origin':'https://wbbny.m.jd.com',
'user-agent':UserAgent,
'referer':'https://wbbny.m.jd.com/',
'cookie':ck
}
data='functionId=promote_pk_getAmountForecast&client=m&clientVersion=-1&appid=signed_wh5&body={}'
response=requests.post(url=url,headers=headers,data=data)
try:
printf('可膨胀金额:'+json.loads(response.text)['data']['result']['inflateMaxAward']+'\n\n')
if(float(json.loads(response.text)['data']['result']['inflateMaxAward'])>=10):
inflateMaxAward=float(json.loads(response.text)['data']['result']['inflateMaxAward'])
except Exception as e:
printf('获取失败黑号或者没有参加5人以上的队伍\n\n')
if __name__ == '__main__':
remarkinfos={}
get_remarkinfo()#获取备注
msg=''
sendnoty='true'
try:
cks = os.environ["JD_COOKIE"].split("&")#获取cookie
except:
f = open("/jd/config/config.sh", "r", encoding='utf-8')
cks = re.findall(r'Cookie[0-9]*="(pt_key=.*?;pt_pin=.*?;)"', f.read())
f.close()
for ck in cks:
UserAgent=ramUA()
ptpin = re.findall(r"pt_pin=(.*?);", ck)[0]
try:
if remarkinfos[ptpin]!='':
printf("--账号:" + remarkinfos[ptpin] + "--")
else:
printf("--无备注账号:" + urllib.parse.unquote(ptpin) + "--")
except:
printf("--账号:" + urllib.parse.unquote(ptpin) + "--")
getinfo(ck)
if inflateMaxAward != 0:
msg+=remarkinfos[ptpin] + ' 的膨胀红包最大金额为 '+str(inflateMaxAward)+'\n'
if sendnoty:
try:
send('穿越寻宝膨胀红包',msg)
except:
send('穿越寻宝膨胀红包','错误,请查看运行日志!')

File diff suppressed because one or more lines are too long