Commit 4be2a7e1 authored by wang's avatar wang

更换环境

parent 48909dae
No preview for this file type
......@@ -14,6 +14,7 @@ import tls_client
from loguru import logger
from env_captcha import PxEnv
from src.utils import PxUtils
ctx = execjs.compile('''const Ev = (t, e, n) => {
var r = ie(encode(n), 10), o = [], a = -1;
......@@ -229,8 +230,8 @@ class PxBypass():
prox = f'http://user-uni001-region-us-sessid-{random.randint(1000, 5000)}-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
# prox = 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:9000'
prox = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
prox = 'http://127.0.0.1:8890'
# prox = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
prox = 'http://127.0.0.1:7890'
self.session.proxies = {
'http': prox,
'https': prox,
......@@ -253,8 +254,8 @@ class PxBypass():
data_str = data
self.log.info(f'data_str {data_str}')
# self.log.info(f"gen Payload {self.uuid}, {self.ts}")
payload = ctx.call('encodePayload', data_str, self.uuid, self.ts)
# payload = PxUtils().encode_payload(payload=data_str, uuid=self.uuid, ts=self.ts)
# payload = ctx.call('encodePayload', data_str, self.uuid, self.ts)
payload = PxUtils().encode_payload(payload=data_str, uuid=self.uuid, ts=self.ts)
# self.log.info(f'payload {payload}')
pc = self._gen_pc(data_str, f'{self.uuid}:{self.tag}:{self.ft}')
body = {
......@@ -415,6 +416,7 @@ class PxBypass():
Ws = 0
s = Gs
h = get_timestamp()
# h = 1701250281709
d = bs + 1
m = int(h - Ws + (d - bs) / 1e4)
......@@ -459,8 +461,6 @@ class PxBypass():
self.performanceNow = random.randint(5000, 6600)
self.px12280 = self.startTs2 + self.performanceNow
self.uuid = self._uuid()
# "[{"t":"PX12095","d":{"PX11645":self.target_url,"PX12207":0,"PX12458":"MacIntel","PX11902":0,"PX11560":3781,"PX12248":3600,
# "PX11385":1698649702900,"PX12280":1698649702913,"PX11496":"1ce53d20-76f3-11ee-8971-a3e00c89b2ff","PX12564":null,"PX12565":-1,"PX11379":false}}]"
data = [{"t": "PX12095",
"d": {"PX11645": self.target_url, "PX12207": 0, "PX12458": "MacIntel", "PX11902": 0,
"PX11560": self.performanceNow, "PX12248": 3600, "PX11385": t1, "PX12280": t2,
......@@ -640,6 +640,7 @@ class PxBypass():
if 'ob' in resp:
cookies = self.encrypt(base64.b64decode(resp['ob'].encode()), self._decode_resp()).decode()
cks = cookies.split('~~~~')
self.log.info(f'len:: {len(cks)}')
self.log.info(json.dumps(cks, indent=True))
for i in cks:
tmp = i.split('|')
......@@ -748,7 +749,7 @@ class PxBypass():
if __name__ == '__main__':
url = "https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true"
url = "https://www.flyfrontier.com"
url = "https://www.flyfrontier.com/"
while True:
try:
px = PxBypass(url)
......@@ -757,7 +758,8 @@ if __name__ == '__main__':
t2 = '1b024930-8e95-11ee-ae67-53932ce066fc:v8.7.2:317'
# print(px._gen_pc(t1, t2))
px.run()
# print(px._uuid())
# while True:
# print(px._uuid())
# except KeyError:
# pass
except:
......
......@@ -89,8 +89,8 @@ class PxUtils():
if __name__ == '__main__':
p = PxUtils()
payload = '[{"t":"PX12095","d":{"PX11645":"https://www.flyfrontier.com/","PX12207":0,"PX12458":"MacIntel","PX11902":0,"PX11560":4769,"PX12248":3600,"PX11385":1700553697276,"PX12280":1700553697286,"PX11496":"31fafcb0-8844-11ee-8d49-97ed9bc8f96f","PX12564":null,"PX12565":-1,"PX11379":false}}]'
uuid = '31fafcb0-8844-11ee-8d49-97ed9bc8f96f'
payload = '[{"t":"PX12095","d":{"PX11645":"https://www.flyfrontier.com/","PX12207":0,"PX12458":"MacIntel","PX11902":0,"PX11560":3551,"PX12248":3600,"PX11385":1701250613545,"PX12280":1701250613554,"PX11496":"d4726a80-8e9a-11ee-b89f-0f4cdfae8973","PX12564":null,"PX12565":-1,"PX11379":false}}]'
uuid = 'd4726a80-8e9a-11ee-b89f-0f4cdfae8973'
print(p.encode_payload(payload, uuid))
t = 'url, sid, vid, ts, num1, num2, str1, uuid, startTs, startTs2, performanceNow, px11280'
for i in t.split(', '):
......
......@@ -4763,6 +4763,7 @@ function genUuid(t, e, n, r) {
var u = e || [];
var l = void 0 !== (t = t || {}).clockseq ? t.clockseq : vr;
var f = void 0 !== t.msecs ? t.msecs : xt();
// f = 1701250281709
var s = void 0 !== t.nsecs ? t.nsecs : pr + 1;
var h = f - dr + (s - pr) / 1e4;
if (h < 0 && void 0 === t.clockseq && (l = l + 1 & 16383), (h < 0 || f > dr) && void 0 === t.nsecs && (s = 0), s >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
......@@ -5675,13 +5676,13 @@ function genPayload4(url, sid, vid, ts, num1, num2, str1, uuid, startTs, startTs
}
// startTs2 PX11280
console.log(genPayload2('https://www.flyfrontier.com/',
sid, vid, ts, num1, num2, str1, uuid
, 1700552863875, 1700464712550
, 1700552863903, 1700552863903,true
)
)
// console.log(genPayload2('https://www.flyfrontier.com/',
// sid, vid, ts, num1, num2, str1, uuid
//
// , 1700552863875, 1700464712550
// , 1700552863903, 1700552863903,true
// )
// )
// console.log(JSON.stringify(data))
......@@ -5698,12 +5699,13 @@ console.log(genPayload2('https://www.flyfrontier.com/',
//
//
// log}))
console.log(getPX12573(
1700202494,
"7cc4340e-8512-11ee-bb46-ed9f28b5fd16",
"716c90f0-8512-11ee-8c96-410f8e8f9c35"
))
// console.log(getPX12573(
// 1700202494,
// "7cc4340e-8512-11ee-bb46-ed9f28b5fd16",
// "716c90f0-8512-11ee-8c96-410f8e8f9c35"
// ))
while (true){
console.log(genUuid())
console.log(JSON.stringify(ENV))
\ No newline at end of file
}
......@@ -9,7 +9,8 @@ headers = {"authority": "booking.flyfrontier.com",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-language": "en-US,en;q=0.9",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
"cookie": 'dtCookie=v_4_srv_3_sn_F607F0716D6DB3D488DB450A52BDA2AE_perc_100000_ol_0_mul_1_app-3Ac2511286146686c7_0; _gcl_au=1.1.1044529785.1701249644; _gid=GA1.2.220719328.1701249662; wisepops_visits=%5B%222023-11-29T09%3A20%3A44.489Z%22%5D; _rdt_uuid=1701249661893.b6548479-23b4-4459-b4a5-80688293205e; pxcts=9d7abb09-8e98-11ee-bc03-1c5ca66fd046; _pxvid=9d7aafee-8e98-11ee-bc03-6108f57dddeb; _fbp=fb.1.1701249673500.1588343604; _tt_enable_cookie=1; _ttp=PgoxsyKz04A_qhqzORW8fzV1OGn; _up=1.2.552442425.1701249674; _px2=eyJ1IjoiOTJkYzJjMjAtOGU5OC0xMWVlLTgxYWEtNWYzMjUyMzRmYWYzIiwidiI6IjlkN2FhZmVlLThlOTgtMTFlZS1iYzAzLTYxMDhmNTdkZGRlYiIsInQiOjYyMDIzMzg4MDAwNywiaCI6IjM3NTI5ZDg0MTFjZjgwM2JmZmYwZWM5OTEyZWE2ZWQyNDliZTIwZTYxZDVhMzUxZTk0NTI1YjNhNTkxNGE3MWYifQ==; wisepops=%7B%22csd%22%3A1%2C%22popups%22%3A%7B%22429858%22%3A%7B%22dc%22%3A1%2C%22d%22%3A1701249673841%7D%7D%2C%22sub%22%3A0%2C%22ucrn%22%3A6%2C%22cid%22%3A%2278471%22%2C%22v%22%3A4%2C%22bandit%22%3A%7B%22recos%22%3A%7B%7D%7D%7D; wisepops_session=%7B%22arrivalOnSite%22%3A%222023-11-29T09%3A20%3A44.489Z%22%2C%22mtime%22%3A1701249673842%2C%22pageviews%22%3A1%2C%22popups%22%3A%7B%22429858%22%3A0%7D%2C%22bars%22%3A%7B%7D%2C%22sticky%22%3A%7B%7D%2C%22countdowns%22%3A%7B%7D%2C%22src%22%3Anull%2C%22utm%22%3A%7B%7D%2C%22testIp%22%3Anull%7D; _ga=GA1.2.2094546832.1701249662; _gat_UA-2678252-1=1; rxVisitor=1701249723058B7D3TFIPGPB5POR9565TOB6RNRCBP5G4; _uetsid=9d4824e08e9811eea913bdfbcb587400; _uetvid=9d4851908e9811eea7dc6be0f6d43714; dtSa=true%7CKD%7C-1%7CPage%3A%20Select%7C-%7C1701249728458%7C249723057_829%7Chttps%3A%2F%2Fbooking.flyfrontier.com%2FFlight%2FSelect%7C%7C%7C%7C; _ga_P2WLKWBNNW=GS1.1.1701249661.1.1.1701249728.54.0.0; rxvt=1701251528597|1701249723059; dtPC=3$249723057_829h14vQFAOBWFKGLVRACUCMARRRPHHSVPWFCCP-0e0'
"cookie": 'dtCookie=v_4_srv_5_sn_2619F60EB152C95727681EF2AFAD18B5_perc_100000_ol_0_mul_1_app-3Ac2511286146686c7_0; _gcl_au=1.1.1548048007.1701250141; _gid=GA1.2.679668969.1701250148; _gat_UA-2678252-1=1; wisepops_visits=%5B%222023-11-29T09%3A29%3A01.252Z%22%5D; _ga_P2WLKWBNNW=GS1.1.1701250147.1.0.1701250147.60.0.0; _ga=GA1.1.1331543506.1701250148; _rdt_uuid=1701250147717.3ff3c559-4599-46f4-9946-fdff0c1b67ee; _uetsid=beccdde08e9911ee9fab1b71fd391102; _uetvid=beccdb808e9911ee928a212c2b407207; pxcts=bf0c750b-8e99-11ee-9bf5-8f3a2b7d1aaf; _pxvid=bf0c5e31-8e99-11ee-9bf5-78d93789c0aa; _fbp=fb.1.1701250152980.1170150933; _tt_enable_cookie=1; _ttp=_E97JXlPkI1tJdMfiCxM3vUhNhx; _px2=eyJ1IjoiYmFmMTk4YzAtOGU5OS0xMWVlLTllNGUtZmYyZjdkZmUyZmIyIiwidiI6ImJmMGM1ZTMxLThlOTktMTFlZS05YmY1LTc4ZDkzNzg5YzBhYSIsInQiOjYyMDIzMzg4MDAwNywiaCI6IjE3NTI2ODFhYjc4ZGY1ZjE3ZjcwMWIwZDhjMTg4ZTY4YjMwMzkyMDRlZTYwNDI1ZmViMjlhMzA4MWU3YzE1MTIifQ==; _up=1.2.884860042.1701250153; wisepops=%7B%22csd%22%3A1%2C%22popups%22%3A%7B%22429858%22%3A%7B%22dc%22%3A1%2C%22d%22%3A1701250153378%7D%7D%2C%22sub%22%3A0%2C%22ucrn%22%3A97%2C%22cid%22%3A%2278471%22%2C%22v%22%3A4%2C%22bandit%22%3A%7B%22recos%22%3A%7B%7D%7D%7D; wisepops_session=%7B%22arrivalOnSite%22%3A%222023-11-29T09%3A29%3A01.252Z%22%2C%22mtime%22%3A1701250153378%2C%22pageviews%22%3A1%2C%22popups%22%3A%7B%22429858%22%3A0%7D%2C%22bars%22%3A%7B%7D%2C%22sticky%22%3A%7B%7D%2C%22countdowns%22%3A%7B%7D%2C%22src%22%3Anull%2C%22utm%22%3A%7B%7D%2C%22testIp%22%3Anull%7D'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment