通过 Ot.a.getAntiContent()得到的这个值,(a = e.sent)&&(r.antiContent = a)执行这段的时候就已经获得了这个anticontent了.但是跟这这个追进去得到的是一个Promise对象,单步就会一直进入到漫长的pengding状态中…
this.request = function() {
var e, t = (e = c.a.mark(function e(t) {
var n, o, a, i, s, l;
return c.a.wrap(function(e) {
for (; ; )
switch (e.prev = e.next) {
case 0:
return n = t.requestContext,
o = void 0 === n ? {} : n,
e.next = 4,
Ot.a.getAntiContent();
case 4:
(a = e.sent) && (r.antiContent = a);
case 6:
return r.formatRequestParams(),
e.prev = 7,
e.next = 10,
Object(wt.a)({
req: o.__req,
path: "search",
params: r.requestModelParams
}).get();
case 10:
if (e.t0 = e.sent,
e.t0) {
e.next = 13;
break
}
e.t0 = {};
case 13:
return i = e.t0,
s = kt(i, {
sort: r.sortType,
page: r.searchPageIndex
}) || {},
l = r.successLoggerParams(i),
r.trackingSearchEvent(l),
s.loadSearchResultTracking = l,
s.firstFilter = r.requestModelParams.filter || "",
r.flip = i.flip,
r.updateFlip(i.flip),
r.searchPageIndex++,
Ot.a.clearCache(),
e.abrupt("return", s);
case 26:
return e.prev = 26,
e.t1 = e.catch(7),
e.abrupt("return", Object(St.a)(e.t1));
case 29:
case "end":
return e.stop()
}
}, e, null, [[7, 26]])
})
先看看这个:
{
key: "initRiskController",
value: function() {
this.riskControlCrawler || (this.riskControlCrawler = new n.a({
serverTime: this.serverTime,
_2827c887a48a351a: !1
}),
this.riskControlCrawler.init())
}
}
爬虫控制风险,看名字就知道不简单,这里先做了一次初始化,初始化的时候记录了一个serverTime的时间戳,而且以后的每一次下拉页面都有拿时间作比较.等等…
看一下是js头部:
(window.webpackJsonp = window.webpackJsonp || []).push([[11], {
100: function(e, t, r) {
e.exports = {
container: "_1y-VhIOC",
title: "rvmJzAGI",
list: "_8KUXGnrb",
item: "_2oaWTr_0",
mallItem: "_1cIPk2r5"
}
},
又是webpack打包!!!
不过还是得硬上啊!
然后就打算把所有的包都打开,放到一起运行,结果…电脑先破溃了!!
没有办法,我们还是要一个文件一个文件的看看:
研究了一下,发现是这样的代码:
187: function(e, t, r) {
(function(e) {
var r, n, o, a;
function i(e) {
return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e
}
: function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
}
)(e)
}
"undefined" != typeof self && self,
a = function() {
return function(e) {
var t = {};
function r(n) {
if (t[n])
return t[n].exports;
var o = t[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(o.exports, o, o.exports, r),
o.l = !0,
o.exports
}
return r.m = e,
r.c = t,
r.d = function(e, t, n) {
r.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: n
})
}
,
r.r = function(e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(e, "__esModule", {
value: !0
})
}
,
r.t = function(e, t) {
if (1 & t && (e = r(e)),
8 & t)
return e;
if (4 & t && "object" == i(e) && e && e.__esModule)
return e;
var n = Object.create(null);
if (r.r(n),
Object.defineProperty(n, "default", {
enumerable: !0,
value: e
}),
2 & t && "string" != typeof e)
for (var o in e)
r.d(n, o, function(t) {
return e[t]
}
.bind(null, o));
return n
}
,
r.n = function(e) {
var t = e && e.__esModule ? function() {
return e.default
}
: function() {
return e
}
;
return r.d(t, "a", t),
t
}
,
r.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
,
r.p = "",
r(r.s = 5)
内层又进行一次打包!!!
感觉要吐血了!!! 都快要放弃了!
不要紧,慢慢看,那么容易就让你搞到数据,那还怎么玩!
this.riskControlCrawler || (this.riskControlCrawler = new n.a({
serverTime: this.serverTime,
_2827c887a48a351a: !1
}),
this.riskControlCrawler.init())
}
首先初始化了一个加密对象跟着这个对象进去,发现了一堆混淆了的代码,这个ee就是关键的加密代码了:
没有关系我们把它全部把下来,但是发现还是需要好多的依赖包比如这些:
看到这里完全是一团乱麻,有2个思路
1.每次把需要的代码就把对应的依赖包找到,改写成单独的文件,使用require()加载进来
2.一次运行到位,加载所有的包
我采用第二种办法,首先把整个代码call一遍,不管有多少依赖包,全部都加载到位,在关键的地方强制截断,强制弹出anticontent
aaa=new ee({
serverTime: 1556530561960,
_2827c887a48a351a: !1
})
aaa.init() //初始化
anticontent = aaa.messagePackSync({
touchEventData: !0,
clickEventData: !0,
focusblurEventData: !0,
changeEventData: !0,
locationInfo: !0,
referrer: !0,
browserSize: !0,
browserInfo: !0,
token: !0,
fingerprint: !0
})
console.log(anticontent)
测试后能正常获取数据。
评论 (0)