Commit 612edbd7 authored by wang's avatar wang

日志管理

parent 99a00431
......@@ -10,18 +10,18 @@
<body>
<script>
window._pxVid = '';
window._pxUuid = 'afb0a6c4-926d-11ee-af61-d93b244f6790';
window._pxUuid = '438d10e4-9273-11ee-ad9d-d43c17640b00';
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=afb0a6c4-926d-11ee-af61-d93b244f6790&v=&m=0';
script.src = '//captcha.perimeterx.net/PXVb73hTEg/captcha.js?a=c&u=438d10e4-9273-11ee-ad9d-d43c17640b00&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=afb0a6c4-926d-11ee-af61-d93b244f6790&v=&m=0';
script.src = 'https://captcha.px-cloud.net/PXVb73hTEg/captcha.js?a=c&u=438d10e4-9273-11ee-ad9d-d43c17640b00&v=&m=0';
script.onerror = window._pxDisplayErrorMessage;
document.head.appendChild(script);
};
......
......@@ -2,6 +2,7 @@ import {randint, randomFloat, sha256} from './utils.js'
import {createPx2, getNoPX, getPaths, getPX12573} from './pxenvutils.js'
import md5 from "md5";
import {call_12590_12610} from "./pxwasm.js";
import * as fs from "fs";
export class PxEnv {
......@@ -4718,6 +4719,10 @@ export class PxEnv {
"navigatorfunc": [1, 1, 1, 1, 1, 1]
}
if (env){
this.ENV = env
}
this.screen = this.ENV.screenparams;
this.navigator = this.ENV.navigatorparams;
this.window = this.ENV.windowparams;
......@@ -5191,7 +5196,6 @@ export class PxEnv {
"PX11496": this.uuid,
"PX12564": null,
"PX12565": -1,
"PX11379": false,
"PX11719": true,
"PX12307": "PX11745",
"PX11668": "pxhc",
......@@ -5411,9 +5415,10 @@ export class PxEnv {
"PX11313": touchScreenY,
"PX11772": downTime,
"PX11529": 9232191,
"PX11555": 4294705152,
"PX11833": 16707175,
"PX11529": this.memory().usedJSHeapSize,// usedJSHeapSize
// "PX11529": 74208842,// usedJSHeapSize
"PX11555": this.memory().jsHeapSizeLimit,// jsHeapSizeLimit
"PX11833": this.memory().totalJSHeapSize,// totalJSHeapSize
// # 松开的
"PX12024": touchX,
"PX11759": touchY,
......
import log4js from 'log4js'
import qs from 'qs'
import {genPayload2, genPayload4} from "./step2.js"
import {genPc, genUuid, randint, ie} from "./utils.js"
import {genPc, genUuid, ie, randint} from "./utils.js"
import axios from "axios";
import {encodePayload} from './encodepayload.js'
import {PxEnv} from './px.js'
import * as fs from "fs";
log4js.configure({
......@@ -29,32 +23,46 @@ log4js.configure({
});
async function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
class PxBypass {
tag = "v8.7.2"
ft = "317"
appId = "PXVb73hTEg"
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'
pxHeaders = {
"authority": "collector-pxvb73hteg.px-cloud.net",
"accept": "*/*",
"accept-language": "en-US,en;q=0.9",
"cache-control": "no-cache",
"content-type": "application/x-www-form-urlencoded",
"origin": "https://www.flyfrontier.com",
"pragma": "no-cache",
"user-agent": this.ua
}
pxUrl = `https://collector-${this.appId}.px-cloud.net/api/v2/collector`
tlsUrl = 'http://52.52.23.116/tls/forward'
prox = `http://user-uni001-region-us-sessid-${randint(1000, 5000)}-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600`
prox = `http://uni00001_custom_zone_US_sid_67336718_time_5:q39CEBTs5A@us.foxyip.com:7778`
// prox = `http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:${randint(10000, 13500)}`
// prox = 'http://127.0.0.1:8890'
prox = `http://uni00001_custom_zone_US_sid_${randint(67336718, 67336728)}_time_5:q39CEBTs5A@us.foxyip.com:7778`
prox = `http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:${randint(10000, 13500)}`
// prox = 'http://127.0.0.1:7890'
// tlsUrl = 'http://127.0.0.1:58000/tls/forward'
constructor(options) {
// let env = fs.readFileSync('./env.json', 'utf-8')
// env = JSON.parse(env);
// let keys = Object.keys(env)
// let selectId = keys[randint(0, keys.length - 1)]
// this.env = env[selectId]
// this.ua = this.env.navigatorparams.useragent
this.pxHeaders = {
"authority": "collector-pxvb73hteg.px-cloud.net",
"accept": "*/*",
"accept-language": "en-US,en;q=0.9",
"cache-control": "no-cache",
"content-type": "application/x-www-form-urlencoded",
"origin": "https://www.flyfrontier.com",
"pragma": "no-cache",
"user-agent": this.ua
}
this.log = log4js.getLogger('px')
this.url = 'https://www.flyfrontier.com/'
......@@ -77,13 +85,8 @@ class PxBypass {
this.cookies = {}
}
async sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async add_headers() {
let cks = Object.keys(this.cookies).map((v, k) => `${v}=${this.cookies[v]}`).join('; ')
......@@ -113,7 +116,7 @@ class PxBypass {
if (typeof data === 'object') {
data = JSON.stringify(data)
}
this.log.info(data)
// this.log.info(data)
let payload = encodePayload(data, this.uuid, this.ts)
let pc = genPc(data, `${this.uuid}:${this.tag}:${this.ft}`)
let body = {
......@@ -249,10 +252,10 @@ class PxBypass {
}]
let res = await this.do_collector(data)
this.seq++;
this.pxenv = new PxEnv('', this.url, this.sid, this.vid, this.ts, this.num1, this.num2,
this.str1, this.uuid,
this.startTs, this.startTs2, this.performanceNow, this.px12280)
this.pxenv = new PxEnv(this.env, this.url, this.sid, this.vid, this.ts, this.num1, this.num2,
this.str1, this.uuid,
this.startTs, this.startTs2, this.performanceNow, this.px12280)
}
......@@ -326,16 +329,29 @@ class PxBypass {
}
async function run() {
// while (true) {
let px = new PxBypass()
await px.step1()
// await px.test()
await px.step2()
await px.sleep(1500)
// await sleep(1500)
await px.step3()
// await sleep(1500)
await px.step4()
await px.sleep(1500)
// await sleep(1500)
await px.test()
// }
}
......
......@@ -5,23 +5,16 @@ import tls_client
session = tls_client.Session(client_identifier='chrome_112')
prox = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{random.randint(10000, 13500)}'
prox = 'http://uni00001_custom_zone_US_sid_67336720_time_5:q39CEBTs5A@us.foxyip.com:7778'
# prox = 'http://user-uni001-region-us-sessid-1111-sesstime-5-keep-true:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
cks = '_px2=eyJ1IjoiOGRjYjQ3NjAt1ODljYi011xMWVlLTkwMmUtODE4MTcxMjRjOTBlIiwidiI6IjhlOGIyMGMzLTg5Y2ItMTFlZS05YWI1LTAwMjc4Njk4ZmY1ZiIsInQiOjYyMDIzMzg4MDAwNCwiaCI6Ijk4NjYzMWNkZDBmNTBjMWE5NjZjYjgwOGNlNzFjYTJkMWNkYzc2MjdjYTc4MTBlZDVhODdmN2FiMzYzOGU1OTgifQ=='
# cks = ''
url = 'https://booking.flyfrontier.com/Flight/InternalSelect?o1=DEN&d1=LAS&dd1=2023-11-30&ADT=1&umnr=false&mon=true'
response = requests.post('http://52.52.23.116/tls/forward',
json=dict(url=url, headers={
......@@ -41,11 +34,11 @@ response = requests.post('http://52.52.23.116/tls/forward',
"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": cks
}, method="GET", proxy=prox, debug=True
,allow_redirects=True
, allow_redirects=True
))
response = response.json()
print(response)
print(response['status_code'])
print(response['text'])
with open('index.html', 'w') as f:
f.write(response['text'])
\ No newline at end of file
f.write(response['text'])
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