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 tu = "_pxAction";
var eu = "_pxMobile"; var eu = "_pxMobile";
var nu = "_pxMonitorAbr"; var nu = "_pxMonitorAbr";
...@@ -33,7 +53,49 @@ function Vc() { ...@@ -33,7 +53,49 @@ function Vc() {
return t; return t;
} }
let Bu = undefined; 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; let vh = null;
// console.log('now', le(), JSON.stringify(t)) // console.log('now', le(), JSON.stringify(t))
...@@ -53,12 +115,10 @@ function xs(t) { ...@@ -53,12 +115,10 @@ function xs(t) {
// var A = $u(); // var A = $u();
var A = p.cs; var A = p.cs;
var V = se(ht(t), function (t, e) { var V = se(ht(t), function (t, e) {
return [uuid, t, e][Fl({ return [uuid, t, e]['join'](":");
"O": 443
}["O"])](":");
}(Us[In], Us[Sn])); }(Us[In], Us[Sn]));
var b = { var b = {
"vid": Nt(), "vid": vid,
"tag": Us[In], "tag": Us[In],
"appID": Us[Un], "appID": Us[Un],
"cu": uuid, "cu": uuid,
...@@ -66,8 +126,8 @@ function xs(t) { ...@@ -66,8 +126,8 @@ function xs(t) {
"pc": V "pc": V
}; };
var w = bl(t, b); var w = bl(t, b);
console.log("ts", fl()) // console.log("ts", fl())
console.log('res', w) // console.log('res', w)
var E = [Dl + w, Gl + Us[Un], Ql + Us[In], kl + uuid, Yl + Us[Sn], Hl + ls++, $l + is]; var E = [Dl + w, Gl + Us[Un], Ql + Us[In], kl + uuid, Yl + Us[Sn], Hl + ls++, $l + is];
var T = zu(); var T = zu();
T && E["push"](Xl + T); T && E["push"](Xl + T);
...@@ -75,11 +135,11 @@ function xs(t) { ...@@ -75,11 +135,11 @@ function xs(t) {
V && E["push"](Zl + V); V && E["push"](Zl + V);
var O = Us[_n](); var O = Us[_n]();
var U = Ol(fl()); var U = Ol(fl());
(O || U) && E["push"](jl + (O || dl()) + U); (O || U) && E["push"](jl + (O || sid) + U);
var I = Us[xn](); var I = Us[xn]();
Nt() && E["push"](zl + Nt()); vid && E["push"](zl + vid);
mu && E["push"](Jl + mu); mu && E["push"](Jl + mu);
var S = yc; var S = ci;
S && E["push"](Kl + S); S && E["push"](Kl + S);
Ru || (Ru = Df(cu)); Ru || (Ru = Df(cu));
var C = Ru; var C = Ru;
......
This diff is collapsed.
...@@ -4,6 +4,7 @@ import {genPc, genUuid, ie, randint, ht} from "./utils.js" ...@@ -4,6 +4,7 @@ import {genPc, genUuid, ie, randint, ht} from "./utils.js"
import axios from "axios"; import axios from "axios";
import {encodePayload} from './encodepayload.js' import {encodePayload} from './encodepayload.js'
import {PxEnv} from './px.js' import {PxEnv} from './px.js'
import {getPayload} from "./all.js";
log4js.configure({ log4js.configure({
...@@ -117,31 +118,34 @@ class PxBypass { ...@@ -117,31 +118,34 @@ class PxBypass {
data[0]["d"]["PX11645"] = this.url; data[0]["d"]["PX11645"] = this.url;
} }
try { try {
if (typeof data === 'object') { // if (typeof data === 'object') {
data = ht(data) // data = ht(data)
} // }
this.log.info(data) // this.log.info(data)
let payload = encodePayload(data, this.uuid, this.ts) // let payload = encodePayload(data, this.uuid, this.ts)
let pc = genPc(data, `${this.uuid}:${this.tag}:${this.ft}`) // let pc = genPc(data, `${this.uuid}:${this.tag}:${this.ft}`)
let body = { // let body = {
"appId": this.appId, // "appId": this.appId,
"tag": this.tag, // "tag": this.tag,
"uuid": this.uuid, // "uuid": this.uuid,
"ft": this.ft, // "ft": this.ft,
"seq": this.seq, // "seq": this.seq,
"en": "NTA", // "en": "NTA",
"pc": pc, // "pc": pc,
"rsc": this.rsc, // "rsc": this.rsc,
"payload": payload, // "payload": payload,
} // }
body = this.updateBody(body); // body = this.updateBody(body);
let body = getPayload(this.uuid, this.vid, this.sid, this.px755, this.ts, this.cts, data)
// this.log.info(body) // this.log.info(body)
let res = await axios.post(this.tlsUrl, JSON.stringify({ let res = await axios.post(this.tlsUrl, JSON.stringify({
url: this.pxUrl, url: this.pxUrl,
method: "POST", method: "POST",
data: qs.stringify(body), // data: qs.stringify(body),
data: body.join('&'),
headers: this.pxHeaders, headers: this.pxHeaders,
allow_redirects: true, allow_redirects: true,
debug: 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