facebook爬虫,js逆向,主要是想抓点赞人员, variables
一直没有跟到在哪里加密的,有有经验的大神来解惑吗?正在苦哈哈的dom断点的点,点了半天还没进入正题,崩溃
__a: 1
__req: 1g
__hs: 20040.HYP:comet_pkg.2.1..0.1
dpr: 1
__ccg: EXCELLENT
__rev: 1018159628
__s: t9822v:7w6exi:8wgxvb
__hsi: 7436661648060314615
__dyn:
__csr:
__comet_req: 15
fb_dtsg: NAcMML_ILB0XtQKeePA9kMYOTJlUW-7xY9TX_JGtpNtDyeYlIFOpunQ:14:1731467865
jazoest: 25458
lsd: DIKcVNU91ngK762vlpJsff
__spin_r: 1018159628
__spin_b: trunk
__spin_t: 1731482718
fb_api_caller_class: RelayModern
fb_api_req_friendly_name: SearchCometResultsInitialResultsParallelFetchQuery
variables: {"params":{"callsite":"COMET_GLOBAL_SEARCH","experience":{"client_defined_experiences":["ADS_PARALLEL_FETCH"],"encoded_server_defined_params":null,"fbid":null,"type":"GLOBAL_SEARCH"},"serp_session_id":"a6c4f488-8fe4-45a6-8de8-8abc8793c80d","text":"robot li","typeahead_session_id":"0.4908169080821918"}}
server_timestamps: true
doc_id: 7614658521900929
常规做法xhr断点一步步跟栈,跟丢了,封装的太多层,一个栈就跳出来,下一个栈就生成,没有找到过渡位置,思来想去肯定是我自己跟丢了,hook不到只能从最基础的dom一步步跟,暂时还没找到加密位置,有有经验的老哥传授解惑吗?
11-14
今天新进展,找到一个类似webpack的加载函数,暂时还没研究清楚怎么用。
(function(a) {
if (a.require != null)
return;
var b = null
, c = null
, d = []
, e = {}
, f = {}
, g = 0
, h = 0
, i = 0
, j = 0
, k = 0
, l = 1
, m = 2
, n = 4
, o = 8
, p = 16
, aa = 32
, ba = 64
, q = 128
, ca = {}
, r = {}
, s = Object.prototype.hasOwnProperty
, t = Object.prototype.toString;
function u(a) {
a = Array.prototype.slice.call(a);
var b = {}, c, d, f, g;
while (a.length) {
d = a.shift();
if (b[d])
continue;
b[d] = !0;
f = e[d];
if (!f || V(f))
continue;
if (f.dependencies)
for (c = 0; c < f.dependencies.length; c++)
g = f.dependencies[c],
V(g) || a.push(g.id)
}
for (d in b)
s.call(b, d) && a.push(d);
b = [];
for (c = 0; c < a.length; c++) {
d = a[c];
var h = d;
f = e[d];
d = f ? f.dependencies : null;
if (!f || !d)
h += " is not defined";
else if (V(f))
h += " is ready";
else {
f = [];
for (var i = 0; i < d.length; i++)
g = d[i],
V(g) || f.push(g.id);
h += " is waiting for " + f.join(", ")
}
b.push(h)
}
return b.join("\n")
}
function v(b) {
var a = new Error(b);
a.name = "ModuleError";
a.messageFormat = b;
for (var c = arguments.length, d = new Array(c > 1 ? c - 1 : 0), e = 1; e < c; e++)
d[e - 1] = arguments[e];
a.messageParams = d.map(function(a) {
return String(a)
});
a.taalOpcodes = [2, 2];
return a
}
$ = a.Env || {};
var w = !!$.gk_require_when_ready_in_order, da = !!$.clear_js_factory_after_used, x = !!$.profile_require_factories, y = a.performance || {}, z;
if (y.now && y.timing && y.timing.navigationStart) {
var A = y.timing.navigationStart;
z = function() {
return y.now() + A
}
} else
z = function() {
return Date.now()
}
;
var B = 0;
function C(a) {
B++;
var b = e[a];
(!b || b.exports == null && !b.factoryFinished) && (H(a),
b = e[a]);
b && b.refcount-- === 1 && (e[a] = null);
return b
}
function D(a) {
return a.defaultExport !== r ? a.defaultExport : a.exports
}
function E(a) {
a = C(a);
if (a)
return D(a)
}
function F(a) {
a = C(a);
if (a)
return a.defaultExport !== r ? a.defaultExport : null
}
function G(a) {
a = C(a);
if (a)
return a.exports
}
function ea(a) {
a.factoryLength === -1 && (a.factoryLength = a.factory.length);
return a.factoryLength
}
function H(d) {
var g = a.ErrorGuard;
if (g && !g.inGuard())
return g.applyWithGuard(H, null, [d]);
g = e[d];
if (!g) {
var h = 'Requiring unknown module "%s"';
throw v(h, d)
}
a.__onBeforeModuleFactory == null ? void 0 : a.__onBeforeModuleFactory(g);
var i, j;
if (g.hasError)
if (g.error == null)
throw v('Requiring module "%s" which threw an exception', d);
else {
h = I(g.error);
J(h, {
messageFormat: 'Requiring module "%s" which threw an exception',
messageParams: [d]
});
throw h
}
if (!V(g))
throw v('Requiring module "%s" with unresolved dependencies: %s', d, u([d]));
L(g);
h = g.exports = {};
var k = g.factory
, l = g.dependencies;
if (t.call(k) === "[object Function]" && l != null) {
var n = l.length, p, q;
try {
try {
va(g)
} catch (a) {
K(a, d)
}
var r = []
, w = n;
if (g.special & o) {
var y = g.special & aa ? c : b;
r = y.slice(0);
r[y.length - 2] = g;
r[y.length - 1] = h;
w += r.length
}
if (g.special & m) {
y = ea(g);
w = Math.min(n + r.length, y)
}
for (h = 0; h < n; h++) {
y = l[h];
r.length < w && r.push(E.call(null, y.id))
}
var A;
x && (A = z());
f[g.id].factoryRun = !0;
try {
y = g.context != null ? g.context : a;
p = k.apply(y, r)
} catch (a) {
K(a, d)
} finally {
if (x) {
w = z();
l = f[g.id];
l.factoryTime = w - (A || 0);
l.factoryEnd = w;
l.factoryStart = A;
if (k.__SMmeta)
for (n in k.__SMmeta)
Object.prototype.hasOwnProperty.call(k.__SMmeta, n) && (l[n] = k.__SMmeta[n])
}
}
} catch (a) {
g.hasError = !0;
g.error = a;
g.exports = null;
throw a
} finally {}
p && (g.exports = p);
var B;
g.special & ba ? g.exports != null && s.call(g.exports, "default") && (g.defaultExport = B = g.exports["default"]) : g.defaultExport = B = g.exports;
if (typeof B === "function") {
h = B.__superConstructor__;
if (!B.displayName || h && h.displayName === B.displayName)
try {
B.displayName = (B.name || "(anonymous)") + " [from " + d + "]"
} catch (a) {}
}
g.factoryFinished = !0;
da && (g.factory = null,
k = void 0)
} else
g.exports = k;
y = "__isRequired__" + d;
r = e[y];
r && !V(r) && T(y, ca);
a.__onAfterModuleFactory == null ? void 0 : a.__onAfterModuleFactory(g)
}
function I(b) {
if (a.getErrorSafe != null)
return a.getErrorSafe(b);
return b != null && typeof b === "object" && typeof b.message === "string" ? b : v("Non-error thrown: %s", String(b))
}
function J(b, c) {
var d = a.ErrorSerializer;
d && d.aggregateError(b, c)
}
function K(a, b) {
a = I(a);
J(a, {
messageFormat: 'Module "%s"',
messageParams: [b],
forcedKey: b.startsWith("__") ? null : b
});
throw a
}
function fa() {
return B
}
function ga() {
var a = {};
for (var b in f)
Object.prototype.hasOwnProperty.call(f, b) && (a[b] = f[b]);
return a
}
function L(a) {
if (a.nonJSDeps)
return;
a.nonJSDeps = !0;
a.dependencies && a.dependencies.forEach(L)
}
var M = !!(a != null && a.document != null && "createElement"in a.document)
, N = typeof WorkerGlobalScope === "function";
M = M || N;
var O = $.use_fbt_virtual_modules === !0 && M
, ha = "$fbt_virtual"
, P = {}
, Q = null
, R = 6e4;
function ia(a) {
!(a in e) && !(a in P) && (P[a] = z()),
Q || (Q = setTimeout(Z()(S, "_checkFbtVirtualModuleTimeout"), R))
}
function S() {
Q = null;
var a = z()
, b = Object.keys(P).filter(function(b) {
var c = a - P[b] > R;
c && delete P[b];
return c
});
Object.keys(P).length > 0 && (Q = setTimeout(Z()(S, "_checkFbtVirtualModuleTimeout"), R));
b.length > 0 && U.apply(null, [["FBLogger"], function(a) {
a("binary_transparency", "vmod_timeout").warn("The following virtual modules are taking over %sms to be defined: %s...", R, b.join(",").slice(0, 300))
}
])
}
function ja(a, b, c) {
if (O && c != null && c & q) {
c = a + ha;
b.push(c);
ia(c)
}
}
function T(b, c, e, g, h, i, l) {
c === void 0 ? (c = [],
e = b,
b = na()) : e === void 0 && (e = c,
t.call(b) === "[object Array]" ? (c = b,
b = na(c.join(","))) : c = []);
var m = {
cancel: ma.bind(this, b)
}
, n = ka(b);
if (!c && !e && i) {
n.refcount += i;
return m
}
O && (b in P && delete P[b],
Array.isArray(c) && ja(b, c, g));
f[b] = {
id: b,
dependencies: c,
meta: l,
category: g,
defined: x ? z() : null,
factoryTime: null,
factoryStart: null,
factoryEnd: null,
factoryRun: !1
};
if (n.dependencies && n.reload !== !0) {
b.indexOf(":") != -1 ? k++ : j++;
return m
}
i && (n.refcount += i);
l = c.map(ka);
n.factory = e;
n.dependencies = l;
n.context = h;
n.special = g;
(n.nonJSDeps || ua(n)) && (n.nonJSDeps = !1,
L(n));
W(n);
if (d.length > 0) {
var o = d;
d = [];
b = a.ScheduleJSWork ? a.ScheduleJSWork : za;
b(function() {
if (w) {
for (var a = 0; a < o.length; a++)
E.call(null, o[a].id);
o.length = 0
} else
while (o.length > 0)
E.call(null, o.pop().id)
})()
}
return m
}
function ka(a) {
var b = e[a];
if (b)
return b;
b = new la(a,0);
e[a] = b;
return b
}
function la(a, b, c) {
this.id = a,
this.refcount = b,
this.exports = c || null,
this.defaultExport = c || r,
this.factory = void 0,
this.factoryLength = -1,
this.factoryFinished = !1,
this.dependencies = void 0,
this.depPosition = 0,
this.context = void 0,
this.special = 0,
this.hasError = !1,
this.error = null,
this.ranRecursiveSideEffects = !1,
this.sideEffectDependencyException = null,
this.nextDepWaitingHead = null,
this.nextDepWaitingNext = null,
this.tarjanGeneration = -1,
this.tarjanLow = 0,
this.tarjanIndex = 0,
this.tarjanOnStack = !1,
this.nonJSDeps = !1
}
function ma(a) {
if (!e[a])
return;
var b = e[a];
e[a] = null;
if (b.dependencies)
for (a = 0; a < b.dependencies.length; a++) {
var c = b.dependencies[a];
c.refcount-- === 1 && ma(c.id)
}
}
function U(a, b, c) {
var d = "__requireLazy__x__" + g++;
return T("__requireLazy__" + d, a, Z()(b, "requireLazy", {
propagationType: 0
}), l | p, c, 1)
}
function na(a) {
return "__mod__" + (a != null ? a + "__" : "") + g++
}
function oa(a, b, c) {
c.tarjanGeneration != h && (c.tarjanGeneration = h,
c.tarjanLow = c.tarjanIndex = i++,
c.tarjanOnStack = !0,
b.push(c));
if (c.dependencies != null)
for (var d = c.depPosition; d < c.dependencies.length; d++) {
var e = c.dependencies[d];
e.tarjanGeneration != h ? (oa(a, b, e),
c.tarjanLow = Math.min(c.tarjanLow, e.tarjanLow)) : e.tarjanOnStack && (c.tarjanLow = Math.min(c.tarjanLow, e.tarjanIndex))
}
if (c.tarjanLow == c.tarjanIndex) {
e = [];
do {
d = b.pop();
d.tarjanOnStack = !1;
e.push(d);
if (c == b[0] && d != c && d.dependencies != null)
for (var f = d.depPosition; f < d.dependencies.length; f++) {
var g = d.dependencies[f];
!V(g) && a.indexOf(g) == -1 && b.indexOf(g) == -1 && e.indexOf(g) == -1 && a.push(g)
}
} while (d != c)
}
}
function pa(a) {
var b = a.dependencies;
if (!b)
throw v("Called _replaceCycleLinkWithSCCDeps on an undefined module");
h++;
oa(b, [], a);
a.depPosition++;
W(a)
}
function qa(a, b) {
var c = b;
while (!0) {
if (c.dependencies && c.depPosition != c.dependencies.length)
c = c.dependencies[c.depPosition];
else
break;
if (c == a) {
pa(a);
return
}
}
a.nextDepWaitingNext = b.nextDepWaitingHead;
b.nextDepWaitingHead = a
}
function V(a) {
return a.dependencies != null && a.depPosition >= a.dependencies.length
}
function ra(a) {
a.depPosition++,
W(a)
}
function sa(a) {
var b = a.nextDepWaitingHead;
a.nextDepWaitingHead = null;
while (b != null) {
var c = b;
c.nonJSDeps && L(a);
b = c.nextDepWaitingNext;
c.nextDepWaitingNext = null;
var d = !e[c.id];
d || ra(c)
}
}
function ta(a) {
return a.special & l
}
function ua(a) {
return a.special & p
}
function W(a) {
while (a.dependencies != null && a.depPosition < a.dependencies.length) {
var b = a.dependencies[a.depPosition]
, c = V(b);
if (!c && a != b) {
qa(a, b);
return
}
a.depPosition++
}
ta(a) && d.push(a);
a.nextDepWaitingHead !== null && sa(a)
}
function va(a) {
if (a.sideEffectDependencyException != null)
throw a.sideEffectDependencyException;
if (a.ranRecursiveSideEffects)
return;
a.ranRecursiveSideEffects = !0;
var b = a.dependencies;
if (b)
for (var c = 0; c < b.length; c++) {
var d = b[c];
try {
va(d)
} catch (b) {
a.sideEffectDependencyException = b;
throw b
}
if (d.special & n)
try {
E.call(null, d.id)
} catch (b) {
a.sideEffectDependencyException = b;
throw b
}
}
}
function X(a, b) {
e[a] = new la(a,0,b),
f[a] = {
id: a,
dependencies: [],
category: 0,
factoryLengthAccessTime: null,
factoryTime: null,
factoryStart: null,
factoryEnd: null,
factoryRun: !1
}
}
X("module", 0);
X("exports", 0);
X("define", T);
X("global", a);
X("require", E);
X("requireInterop", E);
X("importDefault", F);
X("importNamespace", G);
X("requireDynamic", wa);
X("requireLazy", U);
X("requireWeak", Y);
X("ifRequired", xa);
X("ifRequireable", ya);
b = [E.call(null, "global"), E.call(null, "require"), E.call(null, "requireDynamic"), E.call(null, "requireLazy"), E.call(null, "requireInterop"), null];
c = [E.call(null, "global"), E.call(null, "require"), E.call(null, "importDefault"), E.call(null, "importNamespace"), E.call(null, "requireLazy"), E.call(null, "requireInterop"), null];
T.amd = {};
a.define = T;
a.require = E;
a.requireInterop = E;
a.importDefault = F;
a.importNamespace = G;
a.requireDynamic = wa;
a.requireLazy = U;
a.__onBeforeModuleFactory = null;
a.__onAfterModuleFactory = null;
function wa(a, b) {
throw new ReferenceError("requireDynamic is not defined")
}
function Y(a, b) {
xa.call(null, a, function(a) {
b(a)
}, function() {
T("__requireWeak__" + a + "__" + g++, ["__isRequired__" + a], Z()(function() {
return b(D(e[a]))
}, "requireWeak"), l, null, 1)
})
}
function xa(a, b, c) {
a = e[a];
if (a && a.factoryFinished) {
if (typeof b === "function")
return b(D(a))
} else if (typeof c === "function")
return c()
}
function ya(a, b, c) {
var d = e[a];
if (d && d.nonJSDeps && V(d)) {
if (typeof b === "function")
return b(E.call(null, a))
} else if (typeof c === "function")
return c()
}
N = {
getDupCount: function() {
return [j, k]
},
getModules: function() {
var a = {};
for (var b in e)
e[b] && Object.prototype.hasOwnProperty.call(e, b) && (a[b] = e[b]);
return a
},
modulesMap: e,
debugUnresolvedDependencies: u
};
function za(a) {
return a
}
function Z() {
var b = a.TimeSlice && a.TimeSlice.guard ? a.TimeSlice.guard : za;
return function() {
return b.apply(void 0, arguments)
}
}
X("__getTotalRequireCalls", fa);
X("__getModuleTimeDetails", ga);
X("__debug", N);
a.__d = function(a, b, c, d) {
Z()(function() {
T(a, b, c, (d || m) | o, null, null, null)
}, "define " + a, {
root: !0
})()
}
;
function $(a, b) {
return !0
}
if (a.__d_stub) {
for ($ = 0; $ < a.__d_stub.length; $++)
a.__d.apply(null, a.__d_stub[$]);
delete a.__d_stub
}
if (a.__rl_stub) {
for (M = 0; M < a.__rl_stub.length; M++)
U.apply(null, a.__rl_stub[M]);
delete a.__rl_stub
}
Y = function() {}
;
a.$RefreshReg$ = Y;
a.$RefreshSig$ = function() {
return function(a) {
return a
}
}
}
)(typeof this !== "undefined" ? this : typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {});
后面的模块都通过__d(xxx)来加载,但是依旧没有找到加密流程,补环境也无从下手。头大