Commit ac890656 authored by wang's avatar wang

开始按压验证码

parent 1d0a419b
......@@ -3887,6 +3887,7 @@ try {
f(n = {}, "PX12210", t);
f(n, "PX12343", e);
var a = n;
console.log('PX12040.add', a)
Po["push"](a);
}
}
......@@ -4267,14 +4268,28 @@ try {
var r = n - ff;
Jc = "mousemove";
(function (t, e) {
t && t["movementX"] && t["movementY"] && (Mf["length"] < 10 && Mf["push"](+t["movementX"]["toFixed"](2) + "," + +t["movementY"]["toFixed"](2) + "," + Ee(e)), gf["length"] < 50 && gf["push"](function (t) {
if (
t && t["movementX"] && t["movementY"] )
{
if (Mf["length"] < 10){
console.log('PX11393.add', t["movementX"]["toFixed"](2), t["movementY"]["toFixed"](2))
Mf["push"](+t["movementX"]["toFixed"](2) + "," + +t["movementY"]["toFixed"](2) + "," + Ee(e));
if (gf["length"] < 50){
gf["push"](function (t) {
var r = +((t["touches"] || t["changedTouches"]) && (t["touches"] || t["changedTouches"])[0] ? ((t["touches"] || t["changedTouches"]) && (t["touches"] || t["changedTouches"])[0])["clientX"] : t["clientX"])["toFixed"](0);
var i = +((t["touches"] || t["changedTouches"]) && (t["touches"] || t["changedTouches"])[0] ? ((t["touches"] || t["changedTouches"]) && (t["touches"] || t["changedTouches"])[0])["clientY"] : t["clientY"])["toFixed"](0);
var a = function (t) {
return +(t["timestamp"] || t["timeStamp"] || 0)["toFixed"](0);
}(t);
console.log('PX11698.add', r,i,a)
return ""["concat"](r, ",")["concat"](i, ",")["concat"](a);
}(t)));
}(t))
}
}
}
})(t, n);
if (r > 50) {
var i;
......@@ -4321,6 +4336,7 @@ try {
var r = Ot();
"mousemove" !== e && e !== jt && (t["PX11699"] = Ee(r));
var i = ht(t);
console.log('PX12040.add', Kc)
(af += 1.4 * i["length"]) >= 15e3 ? (Kc && tf["push"](Kc), Tf("PX11859")) : (tf["push"](t), tf["length"] >= 50 && (Kc && tf["push"](Kc), Tf("PX12002")));
}
}
......
......@@ -1968,6 +1968,11 @@ try {
z["PX12040"] = function () {
var u = v,
n = {};
console.log('PX12040.Un', Un);
console.log('PX12040.an', an);
console.log('PX12040.Wn', Wn);
console.log('PX12040.kn', kn);
console.log('PX12040.Xn', Xn);
return Un["length"] > 0 && (Un["splice"](In), n["PX12097"] = Un), an["length"] > 0 && (an["splice"](In), n["PX11926"] = an), Wn["length"] > 0 && (Wn["splice"](In), n["PX11749"] = Wn), kn["length"] > 0 && (n["PX11698"] = D(kn)["slice"](0, ln)), Xn["length"] > 0 && (n["PX11433"] = D(Xn)["slice"](0, ln)), n;
}();
z["PX12160"] = Tn;
......
......@@ -480,6 +480,6 @@ function genPayload(uuid, vid, hash, hash2, hashv, token, ci, init_time) {
// console.log(createPX11393())
// console.log(createPX11698())
console.log(JSON.stringify(genPayload('5af66531-7040-1031-a4fe-f4f13a20ca16', '8a1cf585-731d-11ee-a049-4540749b826f', 'e489057d4871bdb110166705657e4c9df363995fabd20e45ccc1d1937400', '6bb20b8e2f18a4e623671f46447476f4fc4b69adcd5f9743c8eaa72f623d2875', '18', '23d4886f5746682304c4bb56cc4741f6260c78f48924ffdb988454b469bd0cff47b4c0b7cf548728e4ba57210ecbd16569ce6e877d8258a72aed61c5bd0a689d', '89?8', 1698228126238)[2]))
// console.log(JSON.stringify(genPayload('5af66531-7040-1031-a4fe-f4f13a20ca16', '8a1cf585-731d-11ee-a049-4540749b826f', 'e489057d4871bdb110166705657e4c9df363995fabd20e45ccc1d1937400', '6bb20b8e2f18a4e623671f46447476f4fc4b69adcd5f9743c8eaa72f623d2875', '18', '23d4886f5746682304c4bb56cc4741f6260c78f48924ffdb988454b469bd0cff47b4c0b7cf548728e4ba57210ecbd16569ce6e877d8258a72aed61c5bd0a689d', '89?8', 1698228126238)[2]))
console.log(createPX1132("ac9e3049cb2f7f391f38d2426d3e07be19cd069a490b05aea023f2cc5681", "6bb20b8e2f18a4e623671f46447476f4fc4b69adcd5f9743c8eaa72f623d2875", "18"))
\ No newline at end of file
console.log(createPX1132("22b0f3c54180124fd02b1bcce129b9992f252bc858988104f0632a9640099", "5393fe46579bdd80d081f53b9bb41917d06401059d4db662cafd3aa36748aa2b", "12"))
\ No newline at end of file
......@@ -10,18 +10,18 @@
<body>
<script>
window._pxVid = '';
window._pxUuid = '9d34ee9d-8ce8-11ee-bd03-c34b343d7e39';
window._pxUuid = '81da0909-8d01-11ee-a0dc-c1014f687990';
window._pxAppId = 'PXVb73hTEg';
window._pxHostUrl = 'https://collector-PXVb73hTEg.perimeterx.net';
window._pxCustomLogo = '';
window._pxJsClientSrc = '//client.perimeterx.net/PXVb73hTEg/main.min.js';
window._pxFirstPartyEnabled = 'false';
var script = document.createElement('script');
script.src = '//captcha.perimeterx.net/PXVb73hTEg/captcha.js?a=c&u=9d34ee9d-8ce8-11ee-bd03-c34b343d7e39&v=&m=0';
script.src = '//captcha.perimeterx.net/PXVb73hTEg/captcha.js?a=c&u=81da0909-8d01-11ee-a0dc-c1014f687990&v=&m=0';
document.head.appendChild(script);
script.onerror = function () {
script = document.createElement('script');
script.src = 'https://captcha.px-cloud.net/PXVb73hTEg/captcha.js?a=c&u=9d34ee9d-8ce8-11ee-bd03-c34b343d7e39&v=&m=0';
script.src = 'https://captcha.px-cloud.net/PXVb73hTEg/captcha.js?a=c&u=81da0909-8d01-11ee-a0dc-c1014f687990&v=&m=0';
script.onerror = window._pxDisplayErrorMessage;
document.head.appendChild(script);
};
......
......@@ -12,7 +12,7 @@ import requests
import tls_client
from loguru import logger
from env import PxEnv
from env_captcha import PxEnv
from utils import PxUtils
......@@ -33,6 +33,8 @@ def unsinged_right_shift(x, y):
class PxCaptchaBypass():
ci = ''
uuid = ''
# PX11431 o111ooo1
ts: str = ''
cs: str = ''
......@@ -67,7 +69,7 @@ class PxCaptchaBypass():
prox = 'http://user-uni001-region-us-sessid-1111-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:7890'
prox = 'http://127.0.0.1:8890'
session.proxies = {
'http': prox,
'https': prox,
......@@ -151,7 +153,7 @@ class PxCaptchaBypass():
self.seq = 0
self.rsc = 1
self._step_1()
self.seq += 1
# self.seq += 1
# self._step_11()
# time.sleep(1.5)
......@@ -203,8 +205,8 @@ class PxCaptchaBypass():
self.vid = vid_list[0]
self.uuid = re.findall("window\._pxUuid = '([0-9a-z\-]+)';", res.text)[0]
with open('../index.html', 'w') as f:
f.write(res.text)
# with open('../index.html', 'w') as f:
# f.write(res.text)
def _uuid(self):
# return str(uuid.uuid4())
......@@ -395,9 +397,9 @@ class PxCaptchaBypass():
print(response)
if response['status_code'] == 302:
print(response['text'])
else:
with open('index.html', 'w') as f:
f.write(response['text'])
# else:
# with open('index.html', 'w') as f:
# f.write(response['text'])
print(response['status_code'])
def _step_2(self, nn):
......@@ -432,14 +434,18 @@ class PxCaptchaBypass():
self.do_collector(data)
def update_sid_vid(self, data: dict):
if self.session.cookies.get_dict().get('_pxhd', None) != None:
data.update({
'pxhd': self.session.cookies.get_dict().get('_pxhd', None)
})
# if self.session.cookies.get_dict().get('_pxhd', None) != None:
# data.update({
# 'pxhd': self.session.cookies.get_dict().get('_pxhd', None)
# })
if self.vid != "":
data.update({
'vid': self.vid
})
if self.ci != "":
data.update({
'ci': self.ci
})
if self.cs != "":
data.update({
'cs': self.cs
......@@ -464,8 +470,10 @@ class PxCaptchaBypass():
# self.str1, self.uuid,self.startTs, self.startTs2, self.performanceNow, self.px12280)
p = PxEnv(self.target_url, self.sid, self.vid, self.ts, self.num1, self.num2,
self.str1, self.uuid,
self.startTs, self.startTs2, self.performanceNow, self.px12280)
data = [p.get_px12123(), p.get_px11891(), p.get_px11547()]
self.startTs, self.startTs2, self.performanceNow, self.px12280,
self.ci, self.token, self.token2,
self.hash, self.hash2, self.hashv)
data = [p.get_px12123(), p.get_px11891(), p.get_px11547(), p.get_px561(), p.get_px11547()]
self.do_collector(data)
def parse_resp(self, resp):
......@@ -475,6 +483,18 @@ class PxCaptchaBypass():
self.log.info(json.dumps(cks, indent=True))
for i in cks:
tmp = i.split('|')
if tmp[0] == 'o1oo11':
# "o1oo11|1|22b0f3c54180124fd02b1bcce129b9992f252bc858988104f0632a9640099
# |5393fe46579bdd80d081f53b9bb41917d06401059d4db662cafd3aa36748aa2b
# |12|false"
self.hash = tmp[2]
self.hash2 = tmp[3]
self.hashv = tmp[4]
if tmp[0] == '11oo1o':
self.ci = tmp[2]
self.token = tmp[4].split('_')[0]
self.token2 = tmp[4].split('_')[1]
if tmp[0] == 'o111ooo1':
self.ts = tmp[1]
if tmp[0] == 'o111oooo':
......
......@@ -7,7 +7,10 @@ import math
import random
import time
from datetime import datetime
from path import getRandomPath
import execjs
ctx1 = execjs.compile(open('./src.js','r').read())
def left_shift(based, counter):
# a << 5
......@@ -72,9 +75,15 @@ def randomFloat(a, b):
class PxEnv():
def __init__(self, url, sid, vid, ts, num1, num2, str1, uuid, startTs, startTs2, performanceNow, px11280,
px755='', token=''):
px755='', token='', token2='',
hash='',hash2='',hashv=''):
# o1oo11
self.hash = hash
self.hash2 = hash2
self.hashv = hashv
# 11oo1o
self.token = token
self.token2 = token2
self.px755 = px755
self.ua = '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';
......@@ -97,6 +106,8 @@ class PxEnv():
usedJSHeapSize=math.floor(randomFloat(0.65, 0.9) * totalJSHeapSize),
jsHeapSizeLimit=4294705152
)
self.mouses = []
self.createMouse()
@property
def memory(self):
......@@ -127,13 +138,72 @@ class PxEnv():
"PX11385": self.startTs,
"PX12280": self.px11280,
"PX11496": self.uuid,
"PX11663": "9f762773",
"PX12347": "dae10548",
"PX12389": "",
"PX11883": "a3d12c4",
"PX11959": "82002457",
"PX12483": "a3d12c4",
"PX12477":True,
"PX11847":True,
"PX12588":"unknown",
"PX12555": {
"plugext": {
"0": {
"f": "internal-pdf-viewer",
"n": "PDF Viewer"
},
"1": {
"f": "internal-pdf-viewer",
"n": "Chrome PDF Viewer"
},
"2": {
"f": "internal-pdf-viewer",
"n": "Chromium PDF Viewer"
},
"3": {
"f": "internal-pdf-viewer",
"n": "Microsoft Edge PDF Viewer"
},
"4": {
"f": "internal-pdf-viewer",
"n": "WebKit built-in PDF"
}
},
"plugins_len": 5
},
"PX12583": {
"smd": {
"ok": True,
"ex": False
}
},
"PX12582": 3,
"PX12587": False,
"PX12036": True,
"PX12356": True,
"PX11522": True,
"PX12204": True,
"PX12408": [
],
"PX12053": True,
"PX12029": False,
"PX11503": True,
"PX11570": True,
"PX11406": True,
"PX12449": True,
"PX11636": False,
"PX11650": True,
"PX12330": "109|66|66|70|80",
"PX11705": random.choice([571, 1182]),
"PX11938": True, "PX11602": True, "PX12021": "False", "PX12421": "False", "PX12124": 1,
"PX11705": 111,
"PX11938": True, "PX11602": True, "PX12021": "false", "PX12421": "false", "PX12124": 1,
"PX11609": 1,
"PX12291": "", "PX11881": ["app", "csi", "loadTimes"], "PX12207": 0, "PX11538": 2,
"PX11984": "TypeError: Cannot read properties of None (reading '0')\n at he (https://client.px-cloud.net/PXVb73hTEg/main.min.js:1136:13)\n at Zo (https://client.px-cloud.net/PXVb73hTEg/main.min.js:3320:22)\n at Eo (https://client.px-cloud.net/PXVb73hTEg/main.min.js:2892:23)\n at https://client.px-cloud.net/PXVb73hTEg/main.min.js:3265:9",
"PX11645": "https://www.flyfrontier.com", "PX11597": [], "PX12023": "", "PX11337": False,
"PX11645": "https://booking.flyfrontier.com/Flight/Select", "PX11597": [],
"PX12023": "https%3A%2F%2Fbooking.flyfrontier.com%2FFlight%2FSelect", "PX11337": False,
"PX12544": True, "PX12589": "succeeded", "PX11524": True,
"PX11843": 1920,
"PX11781": 1080,
......@@ -165,7 +235,8 @@ class PxEnv():
"PX12579": {"support": True,
"status": {"effectiveType": "3g", "rtt": 400, "downlink": 1.5, "saveData": False}},
"PX12508": [{"brand": "Google Chrome", "version": "117"}, {"brand": "Not;A=Brand", "version": "8"},
{"brand": "Chromium", "version": "117"}], "PX12549": True, "PX11539": "831efc5e",
{"brand": "Chromium", "version": "117"}], "PX12549": True,
"PX11539": "64556c77",
"PX11528": "", "PX12271": "10207b2f", "PX11849": "10207b2f", "PX12464": "90e65465",
"PX11356": True,
"PX12426": True, "PX11791": True, "PX11517": True, "PX12520": True,
......@@ -181,8 +252,7 @@ class PxEnv():
"PX11452": "7c5f9724",
"PX12218": "65d826e0", "PX12481": "a9269e00", "PX11780": "50a5ec55", "PX12551": "https:",
"PX12553": "Asia/Shanghai", "PX12567": "w3c", "PX12576": "screen",
"PX12554": "function getOwnPropertyDescriptors() { [native code] }",
"PX12577": "function query() { [native code] }", "PX12594": False, "PX12566": False,
"PX12594": False, "PX12566": False,
"PX12571": "74d9c66", "PX12581": "default", "PX11303": False, "PX11515": False, "PX12133": False,
"PX12340": False, "PX11738": False, "PX11723": False, "PX11389": False, "PX11839": False,
"PX11460": False, "PX12102": False, "PX11378": False, "PX12317": False, "PX12564": None,
......@@ -195,7 +265,7 @@ class PxEnv():
return data
def getPX12573(self, a, b, c):
t = a - 22790 + ord(b[31])
t = a * 2866 + ord(b[2])
return createPx1(t)
def createPX2(self, e, t):
......@@ -228,6 +298,7 @@ class PxEnv():
"PX11496": self.uuid,
"PX12564": None,
"PX12565": -1,
"PX11719": True,
# "PX11379": False,
# "PX11645": url
}
......@@ -262,6 +333,7 @@ class PxEnv():
def get_px11547(self):
px11547_d = {
# todo
"PX12492": "c505c10e26a1b7a7741437db9f82916b",
"PX12570": "78f763eab3a2082c63c66cf47f9e05a0",
"PX11352": "e089aa3d700a35da7244dd4da7a68f9c",
......@@ -366,8 +438,10 @@ class PxEnv():
"PX12572": "7ec700f02277463745cc71774c12c8aa",
"PX11477": "126.8696939282454",
"PX12109": "b908567e93d9ed24c036da7986349e97",
# todo
"PX12362": "5a86e326549d99b7d916101a127153a1",
"PX12491": "be9996f96141c689cda7a1e4e1c28787",
# todo end
"PX12130": [
"Sha256",
"_init",
......@@ -469,6 +543,7 @@ class PxEnv():
"PX12501": self.md5(self.vid),
"PX11902": 2,
"PX11560": self.performanceNow,
"PX11719": True,
"PX12280": self.px11280,
"PX11496": self.uuid,
"PX12564": None,
......@@ -515,12 +590,9 @@ class PxEnv():
"PX11875": self.uuid,
"PX11844": 0,
"PX12465": True,
"PX11393": "2,1,5598|1,-1,5812|3,-4,5816|3,-1,5831",
"PX11393": self.createPX11393(),
"PX12470": int(time.time() * 1000),
"PX11698": [
"768,513,8249",
"771,509,8468"
],
"PX11698": self.createPX11698(),
# p["body"]["offsetWidth"]xp["body"]["offsetHeight"]
"PX11679": "1904x0",
"PX11902": 7,
......@@ -534,6 +606,10 @@ class PxEnv():
}
def get_px561(self):
ctx1.call('call_12590_12610',self.uuid, self.hash, self.hash2, self.hashv)
px1132 = ''
px12590 = ''
px12610 = ''
return {
"t": "PX561",
"d": {
......@@ -544,7 +620,6 @@ class PxEnv():
"PX12099": "4YCJ4YGQ4YCa4YCG4YCf4YCe4YGQ4YGI4YGD4YGe4YGQ4YCa4YCX4YCT4YCW4YGQ4YGI4YGD4YGe4YGQ4YCf4YCX4YCG4YCT4YGQ4YGI4YGB4YGe4YGQ4YCG4YCb4YCG4YCe4YCX4YGQ4YGI4YGD4YGe4YGQ4YCB4YCR4YCA4YCb4YCC4YCG4YGQ4YGI4YGG4YGe4YGQ4YCB4YCG4YCL4YCe4YCX4YGQ4YGI4YGB4YGe4YGQ4YCQ4YCd4YCW4YCL4YGQ4YGI4YGD4YGe4YGQ4YCW4YCb4YCE4YGQ4YGI4YGA4YGG4YGe4YGQ4YCQ4YCA4YGQ4YGI4YGD4YGe4YGQ4YCT4YGQ4YGI4YGD4YGe4YGQ4YCQ4YCH4YCG4YCG4YCd4YCc4YGQ4YGI4YGB4YGe4YGQ4YCB4YCC4YCT4YCc4YGQ4YGI4YGE4YGe4YGQ4YCB4YCE4YCV4YGQ4YGI4YGD4YGe4YGQ4YCV4YGQ4YGI4YGB4YGe4YGQ4YCC4YCT4YCG4YCa4YGQ4YGI4YGG4YGe4YGQ4YCU4YCd4YCA4YCf4YGQ4YGI4YGD4YGe4YGQ4YCb4YCc4YCC4YCH4YCG4YGQ4YGI4YGG4YGe4YGQ4YCe4YCT4YCQ4YCX4YCe4YGQ4YGI4YGG4YGe4YGQ4YCa4YGG4YGQ4YGI4YGD4YGe4YGQ4YCG4YCX4YCK4YCG4YCT4YCA4YCX4YCT4YGQ4YGI4YGD4YCP",
"PX11699": self.performanceNow,
"PX1133": 594.2000000476837,
"PX1132": "313a60aa8127f6aa55a7e16abb033abc7cc7f2110914ba8947b4edb3d6d09122",
"PX12126": True,
"PX11657": 1,
"PX12501": self.md5(self.vid),
......@@ -609,41 +684,7 @@ class PxEnv():
"PX12270": "true"
}
],
"PX11698": [
"766,512,6335",
"766,512,6357",
"768,513,6372",
"768,513,6384",
"767,514,6400",
"771,509,6581",
"774,507,6596",
"784,507,6611",
"801,505,6629",
"820,503,6644",
"839,501,6656",
"858,499,6674",
"878,499,6687",
"895,499,6704",
"912,499,6719",
"925,499,6735",
"936,498,6748",
"947,496,6774",
"951,495,6784",
"956,492,6803",
"959,491,6817",
"960,490,6832",
"961,489,6847",
"962,488,6861",
"962,488,6876",
"962,488,6907",
"963,488,6922",
"963,487,6937",
"964,486,6977",
"966,484,6978",
"966,483,6993",
"967,482,7008",
"968,481,7158"
],
"PX11698": self.createPX11698(all=True),
"PX12160": [
"#px-captcha",
""
......@@ -682,8 +723,10 @@ class PxEnv():
"PX11735": True,
"PX11874": "en-US",
"PX12205": self.token,
# todo
"PX11357": 5053,
"PX12563": "130b70fd5052decdbd8bbf221736a5ff9b10017912a9217d1a80eb2e88f051a0",
# todo challengeTime sha256
"PX12563": "51db060f8b387c240edbcff07da87103e9af772f8533f456663d9a565e0b8274",
"PX11321": 11171,
"PX11351": False,
"PX11919": False,
......@@ -706,8 +749,11 @@ class PxEnv():
"PX12537": 5,
"PX12544": True,
"PX12589": "succeeded",
"PX12590": "e9d4735339614efcab53d40d03b3e2f08ea9534084e646c897808312cfa39bd81662465543537ac45c00c0174c70a18317f7e4c5801c23f19",
"PX12610": "PGJQWUwlWFofT!M(DSgdyAASnNBaSNtITEVMHIHVxgfDUAMehR%DU)@ERdeTAh!cBFZUkNbZBcBIQ(mUUkXSkkdNDh$AzlpeCYwS@sJSlkCMHxRdh(SR!AQe)UOYDYs",
# todo 返回值不同
"PX12590": px12590,
# createPX1132
"PX1132": px1132,
"PX12610": px12610,
"PX12504": 11179,
"PX12547": False,
"PX11902": 5,
......@@ -719,14 +765,59 @@ class PxEnv():
}
}
def createPX11393(self):
# "-9,-6,2889|-8,-6,2903|-7,-7,2926|-6,-6,2931|-5,-5,2946|-8,-7,2962|-6,-7,2976|-13,-12,3006|-5,-2,3035|-8,-8,3039"
res = []
t = random.randint(2260,3360)
for i in range(random.randint(3,10)):
x = random.randint(-20,-2)
y = random.randint(-20,-2)
res.append(f'{x},{y},{t}')
t += random.randint(4,8)
return '|'.join(res)
def createPX11698(self, all=False):
# [
# "814,595,3644"
# "799,582,3678"
# "788,571,3702"
# "774,557,3732"
# "756,543,3792"
# ]
lens = len(self.mouses)if all else random.randint(3,5)
t = random.randint(3260,3560)
res = []
for i in self.mouses[:lens]:
x,y = i
res.append(f'{x},{y},{t}')
t += random.randint(25, 45)
return res
def createMouse(self):
paths = getRandomPath(50)
t = random.randint(3260, 3560)
res = []
for i in range(random.choice([40, 50])):
x = int(paths[i]['x'])
y = int(paths[i]['y'])
res.append((x, y))
t += random.randint(25, 45)
self.mouses = res
if __name__ == '__main__':
a2 = "B1kHB1kHFF4JX1kODVAKRVBQXF1FWVkNDUUKXVpfRQteDVFRDFhcXF8MWBRbWV1bXlhYWBQcGh0NFhYWFllZWQcHWRQLCxReWBQ9Wi4cMj4mGAwvPVE8Ly5cJx9VVRYWFhYHWVlZBwcHWRRZX1hYXV1cWlpZXVpdFhYWFllZB1lZWRQMWw5bX19fCQldXlALWw1eUFoJX1kOX1tbUQ4JXwwJXgpYX1wMXApQDVwLXQsKDFtQDVpfXl4LCllRXAtQWlpcFhYWFgdZWQdZWQcHFF4JX1pYCloORVBQXF1FWVkNDUUKXVpQRQ5fCl8ODA5ZDFwOWxQcGh0NFhYWFlkHBwcHWRQLBA1eChpRXA9eBgFYWVoDXAAAWBYWFhYHWVkHWVkUXglfWlhQXFBFUFBcXUVZWQ0NRQpdWlBFDl8KXw4MDlkMXA5bFhYWFgdZB1lZWRQLHRYWFhZZWVkHWQcUWVBYXF9QWlhfW11bXF1dWFhbWlwWFhYWB1lZWQcHBwcUWV1ZWw=="
if __name__ == '__main__':
a2 = "WQcHBwdZFAsEAV0OWFobCxwGAVhZX14LWVgPFhYWFgdZWQdZWQcHFFBdWF4KDVENRVAMWFlFWVkNDUUJCgwJRV4LCVBQX1xQC1xQCxQcGh0NFhYWFllZB1lZWRRQW11bDltZCV5ZX1xaXl9eCQtYDl1RW1pRDl5cDl5QXw4LW1FfClgLXwxQWVtbDFBeX11RXFlfCVsKClkNUF9eFhYWFgdZWVkHBwcHFF9aX1kWFhYWWVlZBwdZFAsLFF5YFD1aLhwyPiYYDC89UTwvLlwnH1VVFhYWFgdZWVkHBwdZFFlfWFlYX1xQWV5ZXlgWFhYWWVlZB1kHFFlbWFFcXFFaWl5ZXF1ZUVxYWl9ZFhYWFlkHWQcHWRQLCwtSWBYWFhZZWVkHB1kUDhgUXlgUWRYWFhYHWQcHWQcUUF1YXgkJXQ1FUAxYWUVZWQ0NRQkKDAlFWlpdDFENDlxaC1xYFFtZXVteWFhYFBwaHQ0WFhYWB1kHB1lZFFkUXQ5bClBfDFBRWFFZWVkKCQ5YXVlfXw4NCgsLDA5dWFFbUVxcXgxRWAkNWVoKWwxZDgkNCg5RDAsKWF8LXBRRWVEMWV1RXlhcWV1aCg5eDlteCl1cCl8LC18KDlxeCQpaCVtYW1BRUFlfXV9dXlAKClpcUVhbCgsOCQpfXQpfFFlaFA4JBBsNFhYWFllZBwdZBxRZFFBdWAleCVhYRVAMWFlFWVkNDUUJCwkMRV1dUFAKW1hfC1gMCxRQWllYFApaW1hcXwlRDQsKDA0KWAleDlgLUFtfC1kKCQ4NXVxYDVBbXFheXFgJWFwJW1xaCVwLWAkKXVxdXllaClFfUVFdXQpfC18OCQxYDVpZXwlcWlAJXVtaDF9fXVpYC11dCgtbXw5RXF4KCV5aDVkNC1heWQtQC14KDFwMClBcX15cN1dSVlMUWBQmKRYWFhYHWVkHWVkUUF1YXgpQCg1FUAxYWUVZWQ0NRQkKDAlFXgsJUFBfXFALXFALFhYWFllZWQcHWRQaDhReWBRZFhYWFgdZB1lZWRQLHQ=="
b2 = base64.b64decode(a2.encode())
for i in bytes(encrypt(b2, 872 % 128)).decode().split('~~~~'):
print('o11o111o' in i, i)
tmp = i.split('|')
if tmp[0] == '11oo1o':
px755 = tmp[2]
token = tmp[4].split('_')[0]
token2 = tmp[4].split('_')[1]
if tmp[0] == 'o111ooo1':
ts = tmp[1]
if tmp[0] == 'o111oooo':
......@@ -745,10 +836,12 @@ if __name__ == '__main__':
cs = tmp[1]
if tmp[0] == 'o11o11oo':
cts = tmp[1]
uuid = '31fafcb0-8844-11ee-8d49-97ed9bc8f96f'
uuid = '81da0909-8d01-11ee-a0dc-c1014f687990'
px = PxEnv('https://www.flyfrontier.com/',
sid, vid, ts, num1, num2, str1, uuid
, 1700552863875, 1700464712550
, 1700552863903, 1700552863903)
print(px.get_px11590())
, 1700552863903, 1700552863903, px755=px755, token=token,token2=token2)
print(json.dumps(px.get_px12419()))
print(json.dumps([px.get_px11590()]))
import math
import random
import numpy as np
from typing import Union, Optional, Dict, List
import bezier
import math
import random
from typing import Tuple, List, Optional
class Vector:
def __init__(self, x: float, y: float):
self.x = x
self.y = y
def __repr__(self):
return "x: {}, y: {}".format(self.x, self.y)
origin = Vector(0, 0)
def sub(a: Vector, b: Vector) -> Vector:
return Vector(a.x - b.x, a.y - b.y)
def div(a: Vector, b: float) -> Vector:
return Vector(a.x / b, a.y / b)
def mult(a: Vector, b: float) -> Vector:
return Vector(a.x * b, a.y * b)
def add(a: Vector, b: Vector) -> Vector:
return Vector(a.x + b.x, a.y + b.y)
def direction(a: Vector, b: Vector) -> Vector:
return sub(b, a)
def perpendicular(a: Vector) -> Vector:
return Vector(a.y, -1 * a.x)
def magnitude(a: Vector) -> Vector:
return math.sqrt(a.x**2 + a.y**2)
def unit(a: Vector) -> Vector:
return div(a, magnitude(a))
def setMagnitude(a: Vector, amount: float) -> Vector:
return mult(unit(a), amount)
def randomVectorOnLine(a: Vector, b: Vector) -> Vector:
vec = direction(a, b)
multiplier = random.random()
return add(a, mult(vec, multiplier))
def randomNormalLine(a: Vector, b: Vector, range_: float) -> Tuple[Vector, Vector]:
randMid = randomVectorOnLine(a, b)
normalV = setMagnitude(perpendicular(direction(a, randMid)), range_)
return randMid, normalV
def generateBezierAnchors(a: Vector, b: Vector, spread: float) -> List[Vector]:
side = 1 if round(random.random()) == 1 else -1
def calc() -> Vector:
randMid, normalV = randomNormalLine(a, b, spread)
choice = mult(normalV, side)
return randomVectorOnLine(randMid, add(randMid, choice))
return sorted([calc(), calc()], key=lambda vec: vec.x)
def clamp(target: float, min_: float, max_: float) -> float:
return min(max_, max(min_, target))
def overshoot(coordinate: Vector, radius: float) -> Vector:
a = random.random() * 2 * math.pi
rad = radius * math.sqrt(random.random())
vector = Vector(rad * math.cos(a), rad * math.sin(a))
return add(coordinate, vector)
def bezierCurve(
start: Vector, finish: Vector, overrideSpread: Optional[float]
) -> bezier.curve.Curve:
min_ = 2
max_ = 200
vec = direction(start, finish)
length = magnitude(vec)
spread = clamp(length, min_, max_)
anchors = generateBezierAnchors(
start, finish, overrideSpread if overrideSpread is not None else spread
)
all_vectors = [start] + anchors + [finish]
nodes = [
[el.x for el in all_vectors],
[el.y for el in all_vectors],
]
return bezier.curve.Curve.from_nodes(nodes)
def fitts(distance: float, width: float) -> float:
a = 0
b = 2
id_ = math.log2(distance / width + 1)
return a + b * id_
def path(
start: Vector, end: Union[Dict, Vector], spreadOverride: Optional[float] = None
) -> List[Vector]:
defaultWidth = 100
minSteps = 25
if isinstance(end, dict):
width = end["width"]
end = Vector(end["x"], end["y"])
else:
width = defaultWidth
curve = bezierCurve(start, end, spreadOverride)
length = curve.length * 0.8
baseTime = random.random() * minSteps
steps = int(
math.ceil((math.log2(fitts(length, width) + 1) + baseTime) * 3)
* (8 + random.random())
)
s_vals = np.linspace(0.0, 1.0, steps)
points = curve.evaluate_multi(s_vals)
vectors = []
for i in range(steps):
vectors.append(Vector(points[0][i], points[1][i]))
return clampPositive(vectors)
def clampPositive(vectors: List[Vector]) -> List[Vector]:
clamp0 = lambda elem: max(0, elem)
return [Vector(clamp0(el.x), clamp0(el.y)) for el in vectors]
overshootThreshold = 500
def should_overshoot(a: Vector, b: Vector) -> bool:
return magnitude(direction(a, b)) > overshootThreshold
def get_path(start: Dict, end: Dict) -> List[Dict]:
vectors = path(Vector(**start), Vector(**end))
return [el.__dict__ for el in vectors]
def get_random_box_point(
box: Dict, padding_percentage: Optional[float] = None
) -> Vector:
"""Get a random point on a box"""
paddingWidth = paddingHeight = 0
if (
padding_percentage is not None
and padding_percentage > 0
and padding_percentage < 100
):
paddingWidth = box["width"] * padding_percentage / 100
paddingHeight = box["height"] * padding_percentage / 100
return Vector(
box["x"] + (paddingWidth / 2) + random.random() * (box["width"] - paddingWidth),
box["y"]
+ (paddingHeight / 2)
+ random.random() * (box["height"] - paddingHeight),
)
# start = {
# "x": 220,
# "y": 402,
# }
# end = {
# "x": 902,
# "y": 1032,
# }
def getRandomPath(num=100):
while True:
startX = random.randint(100, 1200)
startY = random.randint(100, 1000)
endX = random.randint(100, 1200)
endY = random.randint(100, 1000)
route = get_path({"x": startX, "y": startY}, {"x": endX, "y": endY})
if len(route) < num:
continue
return route[:num]
if __name__ == "__main__":
print(getRandomPath())
This source diff could not be displayed because it is too large. You can view the blob instead.
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