Commit 495eadd8 authored by wang's avatar wang

按压验证码

parent 45b6f0eb
......@@ -5,7 +5,7 @@ import axios from "axios";
import {encodePayload} from './encodepayload.js'
import {PxEnv} from './px.js'
import {getPayload} from "./all.js";
import * as fs from "fs";
log4js.configure({
appenders: {
......@@ -30,16 +30,6 @@ class PxBypass {
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'
// ua = "Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile 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/assets/js/bundle`
tlsUrl = 'http://52.52.23.116/tls/forward'
......@@ -54,6 +44,30 @@ class PxBypass {
this.log = log4js.getLogger('px')
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.log.info('select env', selectId)
this.env = env[selectId]
this.ua = this.env.navigatorparams.useragent
this.log.info('ua', this.ua)
this.log.info(`proxy ${this.prox}`)
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.url = 'https://booking.flyfrontier.com/Flight/Select';
this.log.level = 'debug'
......
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