Commit f2052e63 authored by wangmingming's avatar wangmingming

111

parent c3f5ac69
var Dl = "payload=";
var Gl = "appId=";
var Ql = "tag=";
var kl = "uuid=";
var Xl = "xuuid=";
var Yl = "ft=";
var Hl = "seq=";
var Ll = "cs=";
var Zl = "pc=";
var jl = "sid=";
var zl = "vid=";
var Jl = "jsc=";
var Kl = "ci=";
var ql = "pxhd=";
var $l = "en=";
var ts = "rsc=";
var es = "cts=";
var ns = "/api/v2/collector";
var rs = "application/x-www-form-urlencoded";
var is = "NTA";
var tu = "_pxAction";
var eu = "_pxMobile";
var nu = "_pxMonitorAbr";
......@@ -33,7 +53,49 @@ function Vc() {
return t;
}
let Bu = undefined;
function xs(t) {
let Us = {
"Dakc": [
"https://collector-PXVb73hTEg.px-cloud.net/b/c",
"https://collector-PXVb73hTEg.px-cloud.net/api/v2/collector",
"https://collector-PXVb73hTEg.px-cloud.net/b/s",
"https://collector-PXVb73hTEg.px-cdn.net/b/c",
"https://collector-PXVb73hTEg.px-cdn.net/api/v2/collector",
"https://collector-PXVb73hTEg.px-cdn.net/b/s",
"https://collector-PXVb73hTEg.pxchk.net/b/c",
"https://collector-PXVb73hTEg.pxchk.net/api/v2/collector",
"https://collector-PXVb73hTEg.pxchk.net/b/s"
],
"aI36": 0,
"Ek9V": 4,
"1nzv": "PXVb73hTEg",
"Y03R": "v8.7.2",
"gt7B": "317",
"channels": {
"xhrSuccess": [
{
"once": false
}
],
"xhrResponse": [
{
"once": false
}
],
"xhrFailure": [
{
"once": false
}
]
},
"params": null
}
let In = "Y03R";
let Un = "1nzv";
let _n = 'diTK';
let xn = 'ekDu';
export function getPayload(uuid, vid, sid, ci, t) {
let vh = null;
// console.log('now', le(), JSON.stringify(t))
......@@ -53,12 +115,10 @@ function xs(t) {
// var A = $u();
var A = p.cs;
var V = se(ht(t), function (t, e) {
return [uuid, t, e][Fl({
"O": 443
}["O"])](":");
return [uuid, t, e]['join'](":");
}(Us[In], Us[Sn]));
var b = {
"vid": Nt(),
"vid": vid,
"tag": Us[In],
"appID": Us[Un],
"cu": uuid,
......@@ -66,8 +126,8 @@ function xs(t) {
"pc": V
};
var w = bl(t, b);
console.log("ts", fl())
console.log('res', w)
// console.log("ts", fl())
// console.log('res', w)
var E = [Dl + w, Gl + Us[Un], Ql + Us[In], kl + uuid, Yl + Us[Sn], Hl + ls++, $l + is];
var T = zu();
T && E["push"](Xl + T);
......@@ -75,11 +135,11 @@ function xs(t) {
V && E["push"](Zl + V);
var O = Us[_n]();
var U = Ol(fl());
(O || U) && E["push"](jl + (O || dl()) + U);
(O || U) && E["push"](jl + (O || sid) + U);
var I = Us[xn]();
Nt() && E["push"](zl + Nt());
vid && E["push"](zl + vid);
mu && E["push"](Jl + mu);
var S = yc;
var S = ci;
S && E["push"](Kl + S);
Ru || (Ru = Df(cu));
var C = Ru;
......
This diff is collapsed.
......@@ -4,6 +4,7 @@ import {genPc, genUuid, ie, randint, ht} from "./utils.js"
import axios from "axios";
import {encodePayload} from './encodepayload.js'
import {PxEnv} from './px.js'
import {getPayload} from "./all.js";
log4js.configure({
......@@ -117,31 +118,34 @@ class PxBypass {
data[0]["d"]["PX11645"] = this.url;
}
try {
if (typeof data === 'object') {
data = ht(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 = {
"appId": this.appId,
"tag": this.tag,
"uuid": this.uuid,
"ft": this.ft,
"seq": this.seq,
"en": "NTA",
"pc": pc,
"rsc": this.rsc,
"payload": payload,
}
body = this.updateBody(body);
// if (typeof data === 'object') {
// data = ht(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 = {
// "appId": this.appId,
// "tag": this.tag,
// "uuid": this.uuid,
// "ft": this.ft,
// "seq": this.seq,
// "en": "NTA",
// "pc": pc,
// "rsc": this.rsc,
// "payload": payload,
// }
// body = this.updateBody(body);
let body = getPayload(this.uuid, this.vid, this.sid, this.px755, this.ts, this.cts, data)
// this.log.info(body)
let res = await axios.post(this.tlsUrl, JSON.stringify({
url: this.pxUrl,
method: "POST",
data: qs.stringify(body),
// data: qs.stringify(body),
data: body.join('&'),
headers: this.pxHeaders,
allow_redirects: true,
debug: true,
......
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