Commit a778e9c5 authored by wang's avatar wang

nk test

parent 075e9dbb
...@@ -241,6 +241,9 @@ for (let i = 0; i < 1; i++) { ...@@ -241,6 +241,9 @@ for (let i = 0; i < 1; i++) {
} }
// 字符串还原铭文 // 字符串还原铭文
var o = {}; var o = {};
var a = function () { var a = function () {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -175,7 +175,7 @@ const resolveSequence = ...@@ -175,7 +175,7 @@ const resolveSequence =
} }
} }
traverse(ast, resolveSequence); // traverse(ast, resolveSequence);
const removeDeadCode = { const removeDeadCode = {
...@@ -224,7 +224,7 @@ const removeDeadCode = { ...@@ -224,7 +224,7 @@ const removeDeadCode = {
}, },
} }
traverse(ast, removeDeadCode); //PS:因为有赋值语句和定义语句同时存在,因此该插件可能需要运行多次才能删除干净。 // traverse(ast, removeDeadCode); //PS:因为有赋值语句和定义语句同时存在,因此该插件可能需要运行多次才能删除干净。
const simplifyLiteral = { const simplifyLiteral = {
...@@ -372,7 +372,7 @@ const restoreVarDeclarator = { ...@@ -372,7 +372,7 @@ const restoreVarDeclarator = {
} }
}, },
} }
traverse(ast, restoreVarDeclarator) // traverse(ast, restoreVarDeclarator)
//还原object //还原object
function isBaseLiteral(node) { function isBaseLiteral(node) {
......
...@@ -8,8 +8,8 @@ import * as fs from "fs"; ...@@ -8,8 +8,8 @@ import * as fs from "fs";
const plt = process.platform; const plt = process.platform;
let ENVS = JSON.parse(fs.readFileSync('./env.json', 'utf-8').toString()) let ENVS = JSON.parse(fs.readFileSync('./env.json', 'utf-8').toString())
let keys = Object.keys(ENVS); let keys = Object.keys(ENVS);
const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true"; // const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true";
// const uri = 'mongodb://root:123456@192.168.50.110:27017/' const uri = 'mongodb://root:123456@192.168.50.110:27017/'
const client = new MongoClient(uri); const client = new MongoClient(uri);
log4js.levels.INFO.colour = 'white'; log4js.levels.INFO.colour = 'white';
...@@ -106,11 +106,11 @@ class PxBypass { ...@@ -106,11 +106,11 @@ class PxBypass {
// prox = `http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:${randint(10000, 13500)}` // prox = `http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:${randint(10000, 13500)}`
this.tlsUrl = 'http://52.52.23.116/tls/forward' this.tlsUrl = 'http://52.52.23.116/tls/forward'
if (this.is_local) { if (this.is_local) {
// this.tlsUrl = 'http://127.0.0.1:58000/tls/forward' this.tlsUrl = 'http://127.0.0.1:58000/tls/forward'
// this.tlsUrl = 'http://192.168.50.197:58000/tls/forward' // this.tlsUrl = 'http://192.168.50.197:58000/tls/forward'
this.prox = 'http://127.0.0.1:7890' this.prox = 'http://127.0.0.1:7890'
// this.prox = 'http://brd-customer-hl_70986309-zone-web_unlocker1-country-us:4dn0oh24j9mp@brd.superproxy.io:22225' // this.prox = 'http://brd-customer-hl_70986309-zone-web_unlocker1-country-us:4dn0oh24j9mp@brd.superproxy.io:22225'
this.prox = 'http://brd-customer-hl_70986309-zone-isp-session-0.0982634536710345:ozfawewfxj8y@brd.superproxy.io:22225' // this.prox = 'http://brd-customer-hl_70986309-zone-isp-session-0.0982634536710345:ozfawewfxj8y@brd.superproxy.io:22225'
} }
...@@ -4909,18 +4909,18 @@ class PxBypass { ...@@ -4909,18 +4909,18 @@ class PxBypass {
this.log.info('ua', this.ua) this.log.info('ua', this.ua)
if (!this.is_local) { if (!this.is_local) {
let proxyRes = await axios({ let proxyRes = await axios({
method: 'post', method: 'post',
url: 'http://ymx-lcc.unififi.com/proxy/get-proxy', url: 'http://ymx-lcc.unififi.com/proxy/get-proxy',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: JSON.stringify({ data: JSON.stringify({
'name': 'F9', 'name': 'F9',
'type': 'shopping' 'type': 'shopping'
})
}) })
}) this.prox = proxyRes.data.url;
this.prox = proxyRes.data.url;
} }
this.log.info(`proxy ${this.prox}`) this.log.info(`proxy ${this.prox}`)
...@@ -4944,30 +4944,6 @@ class PxBypass { ...@@ -4944,30 +4944,6 @@ class PxBypass {
// Execute query // Execute query
const movie = await movies.aggregate([ const movie = await movies.aggregate([
{$match: query}, {$match: query},
// {
// $project: {
// 'env.windowparams': 1,
// 'env.screenparams': 1,
// 'env.navigatorparams': 1,
// 'env.featurepolicy': 1,
// 'env.plugins': 1,
// 'env.mimetypes': 1,
// 'env.glres': 1,
// 'env.jpg': 1,
// 'env.jpg2': 1,
// 'env.useragentdata': 1,
// 'env.consoleprops': 1,
// 'env.webglprops': 1,
// 'env.windowprops': 1,
// 'env.locationprops': 1,
// 'env.mathprops': 1,
// 'env.funcs': 1,
// 'env.funcs2': 1,
// 'env.documentfunc': 1,
// 'env.bodyfunc': 1,
// 'env.navigatorfunc': 1
// }
// },
{$sample: {size: 1}} {$sample: {size: 1}}
]) ])
let res = await movie.toArray() let res = await movie.toArray()
...@@ -5050,7 +5026,7 @@ class PxBypass { ...@@ -5050,7 +5026,7 @@ class PxBypass {
debug: true, debug: true,
proxy: this.prox, proxy: this.prox,
id: (new Date().getTime()) + '', id: (new Date().getTime()) + '',
random_tls: true, random_tls: false,
}), { }), {
timeout: 5000, timeout: 5000,
}); });
...@@ -5322,7 +5298,7 @@ class PxBypass { ...@@ -5322,7 +5298,7 @@ class PxBypass {
"sec-fetch-site": "same-site", "sec-fetch-site": "same-site",
"sec-fetch-user": "?1", "sec-fetch-user": "?1",
"upgrade-insecure-requests": "1", "upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
} }
headers['cookie'] = cks; headers['cookie'] = cks;
...@@ -5334,7 +5310,7 @@ class PxBypass { ...@@ -5334,7 +5310,7 @@ class PxBypass {
cookie: cks, cookie: cks,
method: "GET", method: "GET",
proxy: this.prox, proxy: this.prox,
random_tls: true, random_tls: false,
})); }));
if (res.data.status_code === 200) { if (res.data.status_code === 200) {
...@@ -5365,6 +5341,34 @@ class PxBypass { ...@@ -5365,6 +5341,34 @@ class PxBypass {
return false return false
} }
async init() {
this.log.info("init")
let res = await axios.post(this.tlsUrl, JSON.stringify({
url: 'https://www.flyfrontier.com/',
headers: {
"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,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6",
"cache-control": "no-cache",
"pragma": "no-cache",
"priority": "u=0, i",
"sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "same-site",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
},
allow_redirects: true,
debug: true,
method: "GET",
proxy: this.prox,
random_tls: false,
}));
console.log(res.data)
}
} }
async function run() { async function run() {
...@@ -5386,6 +5390,8 @@ async function run() { ...@@ -5386,6 +5390,8 @@ async function run() {
try { try {
let px = new PxBypass(true) let px = new PxBypass(true)
await px.init()
await px.initMongo() await px.initMongo()
await px.initMongo2() await px.initMongo2()
await px.step1() await px.step1()
......
...@@ -10,7 +10,8 @@ headers = { ...@@ -10,7 +10,8 @@ headers = {
"authority": "www.flyfrontier.com", "accept": "application/json, text/plain, */*", "accept-language": "en-US"} "authority": "www.flyfrontier.com", "accept": "application/json, text/plain, */*", "accept-language": "en-US"}
url = "https://booking.flyfrontier.com/Flight/InternalSelect?o1=BNA&d1=ATL&dd1=Apr%2027,%202024&ADT=1&mon=true&promo=" url = "https://booking.flyfrontier.com/Flight/InternalSelect?o1=BNA&d1=ATL&dd1=Apr%2027,%202024&ADT=1&mon=true&promo="
cks = 'cts=ed2e8f20-2eec-11ef-b613-4578615eec93; _pxvid=ed2e83e1-2eec-11ef-b613-609efd4705b5; _px2=eyJ1IjoiZWEwMDQzMjAtMmVlYy0xMWVmLTk2NjAtZjc4ZWE1ZmUyYTViIiwidiI6ImVkMmU4M2UxLTJlZWMtMTFlZi1iNjEzLTYwOWVmZDQ3MDViNSIsInQiOjE3MTg4NzgzNzkxODIsImgiOiJjYmJmNTZmYzIxN2FhMzMzNzRjMjA2ZjdkZjBhZWM4Yzg5MDI3ZGQwMTEzNjRjNjUyZDI1YzNlZDNjZTNkODFkIn0=' cks = "_pin_unauth=dWlkPU1UazVORGhsT0RFdFpXVm1aUzAwTWpZMUxXRTRabUl0WXpRNE0yTTVZamN4TmpWaA; _pxhd=6987a35b22308ab2d880577523a8618a7a67ddbf794d1c5f129ab7670e4794d6:7dee9538-1f10-11ef-8dfe-cccba3e35e09; dotrez=\\u0021l7UW70KMFhJPWTheETst66jrHkkuvxv06I7wpbUi35sdRSn6XITBM/I8FAF/tP+7IGflxwf/vanOpA==; __RequestVerificationToken=rOf7cEp_k8u0neraqTcctD8fSQIHknrn_hIsC55Qa42GeMQna545LVa96ZM3dzyD3LyNIhu-f_1nEU0DCE0V0_jElpfeIk6K9RyFSr_Fy0X41F4I0VRmllhDHJrgf2Ud_BeFQg2; ASP.NET_SessionId=uspjlcqvm051vci2qxdxdsa3; _fbp=fb.1.1717392295007.598017164; _ga=GA1.1.1241519695.1717392295; _ga_P2WLKWBNNW=GS1.1.1718892958.6.1.1718895206.60.0.0; _ga_XXXX=GS1.1.1718892957.5.1.1718895205.0.0.1743233216; _gcl_au=1.1.58764005.1717392295; _gid=GA1.2.1291449389.1718868119; _pin_unauth=dWlkPU1UazVORGhsT0RFdFpXVm1aUzAwTWpZMUxXRTRabUl0WXpRNE0yTTVZamN4TmpWaA; _px2=eyJ1IjoiZDhkNDA2NDAtMmYxNC0xMWVmLTg3YTktNTM3ODI5YzJjNzVjIiwidiI6IjljMzQ4YjJlLTIxNjktMTFlZi05YjFlLTAwNjNkMjJlZjU4YSIsInQiOjYyMDIzMzg4MDAwNywiaCI6IjBlZmZiOTI5Y2Y3ZTliYmIwYmY2NmZlY2QyZWNmMzE0Y2VlODNhMjk1ZjQ4NDNmNzZhY2NiY2Y2YmMzNDRmOTQifQ==; _pxvid=9c348b2e-2169-11ef-9b1e-0063d22ef58a; _rdt_uuid=1717392298400.1cfa304a-88a7-49b4-a0d0-5abd2639dd7b; _tt_enable_cookie=1; _ttp=fCed3r1bIROAD1MoXaM7YzC-Wcw; _up=1.2.1773743971.1717392296; cjConsent=MHxOfDB8Tnww; cjLiveRampLastCall=2024-06-20T14:15:59.861Z; cjUser=2fedcdc1-f7d1-43a3-a5ff-cca256ebd3b7; dtCookie=v_4_srv_2_sn_3F545D6310C1314EA25780B0A85AA98E_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_0_rcs-3Acss_0; ORA_FPC=id=b2909c1d-97b9-4dde-9dec-ead5c247f99d; pxcts=9d891099-2f0f-11ef-b632-def6af3102b4; wisepops=%7B%22popups%22%3A%7B%22483108%22%3A%7B%22dc%22%3A2%2C%22d%22%3A1718868125364%2C%22cl%22%3A1%7D%7D%2C%22sub%22%3A0%2C%22ucrn%22%3A64%2C%22cid%22%3A%2278471%22%2C%22v%22%3A4%2C%22bandit%22%3A%7B%22recos%22%3A%7B%7D%7D%7D; wisepops_visitor=%7B%22P9wqzAW4cp%22%3A%225054ed3f-a1ee-4caa-898f-e793ad3abb32%22%7D; wisepops_visits=%5B%222024-06-20T07%3A21%3A58.264Z%22%2C%222024-06-03T05%3A24%3A54.715Z%22%5D; WTPERSIST="
...@@ -36,10 +37,10 @@ for i in range(20): ...@@ -36,10 +37,10 @@ for i in range(20):
json={ json={
'url': 'https://booking.flyfrontier.com/Flight/InternalSelect?o1=BNA&d1=ATL&dd1=Apr%2027,%202024&ADT=1&mon=true&promo=', 'url': 'https://booking.flyfrontier.com/Flight/InternalSelect?o1=BNA&d1=ATL&dd1=Apr%2027,%202024&ADT=1&mon=true&promo=',
'headers': { 'headers': {
"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": "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,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6", "accept-language": "en,en-US;q=0.9,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6",
"cache-control": "no-cache", "cache-control": "no-cache",
"pragma": "no-cache", "pragma": "no-cache",
"priority": "u=0, i", "priority": "u=0, i",
"sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"", "sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"",
"sec-ch-ua-mobile": "?0", "sec-ch-ua-mobile": "?0",
...@@ -51,8 +52,9 @@ for i in range(20): ...@@ -51,8 +52,9 @@ for i in range(20):
"upgrade-insecure-requests": "1", "upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"cookie": cks "cookie": cks,
},
},
'allow_redirects': True, 'allow_redirects': True,
'debug': True, 'debug': True,
'method': "GET", 'method': "GET",
......
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