mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-04 23:03:48 +08:00
猿人学第16题-调试跳转-指纹-window删除陷阱
This commit is contained in:
parent
4b02fccece
commit
1b4712db63
@ -138,10 +138,10 @@
|
||||
})();
|
||||
```
|
||||
|
||||
## hook setInterval debugger
|
||||
## hook setInterval debugger console
|
||||
```javascript
|
||||
// ==UserScript==
|
||||
// @name hook setInterval debugger
|
||||
// @name hook setInterval debugger console
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 0.1
|
||||
// @description pass
|
||||
@ -162,6 +162,10 @@
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(a.toString().indexOf("console.clear")!=-1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
new_setInterval(a,b);
|
||||
}
|
||||
})();
|
||||
|
@ -1,12 +1,51 @@
|
||||
# 猿人学第16题-调试跳转-指纹-window删除陷阱
|
||||
|
||||
打开f12发现直接跳转到首页
|
||||
老版本反爬
|
||||
|
||||
https://blog.csdn.net/sonichty/article/details/106337097
|
||||
打开f12发现直接跳转到首页
|
||||
|
||||
添加新书签,网址为以下JS:
|
||||
|
||||
javascript:window.addEventListener('beforeunload', function (e) { e.preventDefault();e.returnValue = '' });
|
||||
https://blog.csdn.net/sonichty/article/details/106337097
|
||||
|
||||
添加新书签,网址为以下JS:
|
||||
|
||||
javascript:window.addEventListener('beforeunload', function (e) { e.preventDefault();e.returnValue = '' });
|
||||
|
||||
新反爬是控制台无限输出
|
||||
|
||||

|
||||
|
||||
油猴插件解决问题
|
||||
```javascript
|
||||
// ==UserScript==
|
||||
// @name hook setInterval debugger console
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 0.1
|
||||
// @description pass
|
||||
// @author ayf
|
||||
// @run-at document-start
|
||||
// @match *://*/*
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
var new_setInterval=setInterval;
|
||||
window.setInterval=function(a,b){
|
||||
if(a.toString().indexOf("debugger")!=-1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(a.toString().indexOf("console.log")!=-1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(a.toString().indexOf("console.clear")!=-1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
new_setInterval(a,b);
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
网页加载完后,点击这个书签注入JS
|
||||
|
||||
@ -18,7 +57,7 @@
|
||||
|
||||
m 就是一个变量值,这里直接控制台调试
|
||||
|
||||

|
||||

|
||||
|
||||
开始打断点
|
||||
|
||||
|
51
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/ast.js
Normal file
51
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/ast.js
Normal file
@ -0,0 +1,51 @@
|
||||
const fs = require('fs');
|
||||
const parser = require("@babel/parser");
|
||||
const traverse = require("@babel/traverse").default;
|
||||
const types = require("@babel/types");
|
||||
const generator = require("@babel/generator").default;
|
||||
|
||||
process.argv.length > 2 ? encodeFile = process.argv[2] : encodeFile = "./encode.js";
|
||||
process.argv.length > 3 ? decodeFile = process.argv[3] : decodeFile = "./decodeResult.js";
|
||||
|
||||
let sourceCode = fs.readFileSync(encodeFile, {encoding: "utf-8"});
|
||||
let ast = parser.parse(sourceCode);
|
||||
|
||||
_0x34e7 = ["AqLWq", "0zyxwvutsr", "TKgNw", "eMnqD", "thjIz", "btoa", "MNPQRSTWXY", "oPsqh", "niIlq",
|
||||
"evetF", "LVZVH", "fYWEX", "kmnprstwxy", "aYkvo", "tsrqpomnlk", "HfLqY", "aQCDK", "lGBLj", "test",
|
||||
"3210zyxwvu", "QWK2Fi", 'return /" ', "hsJtK", "jdwcO", "SlFsj", "OWUOc", "LCaAn", "[^ ]+)+)+[",
|
||||
"FAVYf", "2Fi+987654", "floor", "join", "EuwBW", "OXYrZ", "charCodeAt", "SkkHG", "iYuJr", "GwoYF",
|
||||
"kPdGe", "cVCcp", "INQRH", "INVALID_CH", "charAt", "push", "apply", "lalCJ", "kTcRS", '+ this + "',
|
||||
"ykpOn", "gLnjm", "gmBaq", "kukBH", "dvEWE", "SFKLi", "^([^ ]+( +", "qpomnlkjih", "^ ]}", "pHtmC",
|
||||
"length", "split", "ABHICESQWK", "FKByN", "U987654321", "lmHcG", "dICfr", "Szksx", "Bgrij", "iwnNJ",
|
||||
"jihgfdecba", "GfTek", "gfdecbaZXY", "constructo", "QIoXW", "jLRMs"
|
||||
];
|
||||
l = function (e, t) {
|
||||
return _0x34e7[e -= 188]
|
||||
};
|
||||
|
||||
const callToLiteral =
|
||||
{
|
||||
CallExpression(path) {
|
||||
let {callee, arguments} = path.node;
|
||||
if (!types.isIdentifier(callee) || arguments.length != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
let name = callee.name;
|
||||
|
||||
if (!['e', 't', 'o', 'u'].includes(name) || !types.isNumericLiteral(arguments[0])) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let value = l(arguments[0].value);
|
||||
path.replaceWith(types.valueToNode(value));
|
||||
}
|
||||
};
|
||||
|
||||
traverse(ast, callToLiteral);
|
||||
|
||||
|
||||
let {code} = generator(ast, opts = {jsescOption: {"minimal": true}});
|
||||
|
||||
fs.writeFile(decodeFile, code, (err) => {
|
||||
});
|
62
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/decodeResult.js
Normal file
62
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/decodeResult.js
Normal file
@ -0,0 +1,62 @@
|
||||
function bbb(e) {
|
||||
var t = u,
|
||||
r = {};
|
||||
r.TGmSp = "^ ]}" + "ARACTER_ERR", r["gmBaq"] = "iYuJr" + "U987654321" + "/", r["lGBLj"] = "^([^ ]+( +" + "charAt" + "constructo", r.aYkvo = function (e) {
|
||||
return e();
|
||||
}, r["Bgrij"] = function (e, t) {
|
||||
return e % t;
|
||||
}, r.evetF = function (e, t) {
|
||||
return e >> t;
|
||||
}, r.GfTek = "niIlq", r["QIoXW"] = function (e, t) {
|
||||
return e << t;
|
||||
}, r["INVALID_CH"] = function (e, t) {
|
||||
return e | t;
|
||||
}, r["^([^ ]+( +"] = function (e, t) {
|
||||
return e << t;
|
||||
}, r["INQRH"] = function (e, t) {
|
||||
return e & t;
|
||||
}, r["3210zyxwvu"] = function (e, t) {
|
||||
return e << t;
|
||||
}, r["tsrqpomnlk"] = function (e, t) {
|
||||
return e & t;
|
||||
}, r.jdwcO = function (e, t) {
|
||||
return e === t;
|
||||
}, r.kPdGe = "push", r["oPsqh"] = "OWUOc", r["aYkvo"] = function (e, t) {
|
||||
return e & t;
|
||||
}, r["test"] = function (e, t) {
|
||||
return e == t;
|
||||
}, r["join"] = function (e, t) {
|
||||
return e + t;
|
||||
}, r["EuwBW"] = function (e, t) {
|
||||
return e(t);
|
||||
};
|
||||
var i = r;
|
||||
if (/([^\u0000-\u00ff])/.test(e)) throw new Error(i.TGmSp);
|
||||
for (var o, a, s, l = 0, c = []; l < e["jLRMs"];) {
|
||||
switch (a = e["gLnjm"](l), s = i.kukBH(l, 6)) {
|
||||
case 0:
|
||||
delete window, delete document, c["length"](f["pHtmC"](i["SlFsj"](a, 2)));
|
||||
break;
|
||||
case 1:
|
||||
try {
|
||||
"WhHMm" === i["LVZVH"] || n.g && c["length"](f["pHtmC"](i.pHtmC(2 & o, 3) | i.evetF(a, 4)));
|
||||
} catch (e) {
|
||||
c["length"](f["pHtmC"](i["INVALID_CH"](i.cVCcp(3 & o, 4), a >> 4)));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
c["length"](f["pHtmC"](i["INVALID_CH"](i["^([^ ]+( +"](15 & o, 2), i.evetF(a, 6)))), c["length"](f["pHtmC"](i["INQRH"](a, 63)));
|
||||
break;
|
||||
case 3:
|
||||
c["length"](f["pHtmC"](i["SlFsj"](a, 3)));
|
||||
break;
|
||||
case 4:
|
||||
c.push(f["pHtmC"](i["INVALID_CH"](i["3210zyxwvu"](i.OWUOc(o, 4), 6), i["SlFsj"](a, 6))));
|
||||
break;
|
||||
case 5:
|
||||
c["length"](f["pHtmC"](i["INVALID_CH"](i["3210zyxwvu"](i["tsrqpomnlk"](o, 15), 4), a >> 8))), c.push(f.charAt(i["tsrqpomnlk"](a, 63)));
|
||||
}
|
||||
o = a, l++;
|
||||
}
|
||||
return 0 == s ? i["kPdGe"](i["SFKLi"], i["oPsqh"]) || (c["length"](f["pHtmC"](i["aYkvo"](o, 3) << 4)), c.push("FM")) : i.eMnqD(s, 1) && (c["length"](f["pHtmC"]((15 & o) << 2)), c["length"]("K")), i["join"](i.aQCDK(d(15), window.md5(c["kTcRS"](""))), i["EuwBW"](d, 10));
|
||||
}
|
105
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/encode.js
Normal file
105
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/encode.js
Normal file
@ -0,0 +1,105 @@
|
||||
function bbb(e) {
|
||||
var t = u
|
||||
, r = {};
|
||||
r.TGmSp = t(244) + "ARACTER_ERR",
|
||||
r[t(238)] = t(224) + t(250) + "/",
|
||||
r[t(205)] = "^([^ ]+( +" + t(230) + t(259),
|
||||
r.aYkvo = function (e) {
|
||||
return e()
|
||||
}
|
||||
,
|
||||
r[t(254)] = function (e, t) {
|
||||
return e % t
|
||||
}
|
||||
,
|
||||
r.evetF = function (e, t) {
|
||||
return e >> t
|
||||
}
|
||||
,
|
||||
r.GfTek = t(196),
|
||||
r[t(260)] = function (e, t) {
|
||||
return e << t
|
||||
}
|
||||
,
|
||||
r[t(229)] = function (e, t) {
|
||||
return e | t
|
||||
}
|
||||
,
|
||||
r[t(242)] = function (e, t) {
|
||||
return e << t
|
||||
}
|
||||
,
|
||||
r[t(228)] = function (e, t) {
|
||||
return e & t
|
||||
}
|
||||
,
|
||||
r[t(207)] = function (e, t) {
|
||||
return e << t
|
||||
}
|
||||
,
|
||||
r[t(202)] = function (e, t) {
|
||||
return e & t
|
||||
}
|
||||
,
|
||||
r.jdwcO = function (e, t) {
|
||||
return e === t
|
||||
}
|
||||
,
|
||||
r.kPdGe = t(231),
|
||||
r[t(195)] = t(213),
|
||||
r[t(201)] = function (e, t) {
|
||||
return e & t
|
||||
}
|
||||
,
|
||||
r[t(206)] = function (e, t) {
|
||||
return e == t
|
||||
}
|
||||
,
|
||||
r[t(219)] = function (e, t) {
|
||||
return e + t
|
||||
}
|
||||
,
|
||||
r[t(220)] = function (e, t) {
|
||||
return e(t)
|
||||
}
|
||||
;
|
||||
var i = r;
|
||||
if (/([^\u0000-\u00ff])/.test(e))
|
||||
throw new Error(i.TGmSp);
|
||||
for (var o, a, s, l = 0, c = []; l < e[t(261)];) {
|
||||
switch (a = e[t(237)](l),
|
||||
s = i.kukBH(l, 6)) {
|
||||
case 0:
|
||||
delete window,
|
||||
delete document,
|
||||
c[t(246)](f[t(245)](i[t(212)](a, 2)));
|
||||
break;
|
||||
case 1:
|
||||
try {
|
||||
"WhHMm" === i[t(198)] || n.g && c[t(246)](f[t(245)](i.pHtmC(2 & o, 3) | i.evetF(a, 4)))
|
||||
} catch (e) {
|
||||
c[t(246)](f[t(245)](i[t(229)](i.cVCcp(3 & o, 4), a >> 4)))
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
c[t(246)](f[t(245)](i[t(229)](i[t(242)](15 & o, 2), i.evetF(a, 6)))),
|
||||
c[t(246)](f[t(245)](i[t(228)](a, 63)));
|
||||
break;
|
||||
case 3:
|
||||
c[t(246)](f[t(245)](i[t(212)](a, 3)));
|
||||
break;
|
||||
case 4:
|
||||
c.push(f[t(245)](i[t(229)](i[t(207)](i.OWUOc(o, 4), 6), i[t(212)](a, 6))));
|
||||
break;
|
||||
case 5:
|
||||
c[t(246)](f[t(245)](i[t(229)](i[t(207)](i[t(202)](o, 15), 4), a >> 8))),
|
||||
c.push(f.charAt(i[t(202)](a, 63)))
|
||||
}
|
||||
o = a,
|
||||
l++
|
||||
}
|
||||
return 0 == s ? i[t(226)](i[t(241)], i[t(195)]) || (c[t(246)](f[t(245)](i[t(201)](o, 3) << 4)),
|
||||
c.push("FM")) : i.eMnqD(s, 1) && (c[t(246)](f[t(245)]((15 & o) << 2)),
|
||||
c[t(246)]("K")),
|
||||
i[t(219)](i.aQCDK(d(15), window.md5(c[t(234)](""))), i[t(220)](d, 10))
|
||||
}
|
BIN
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/img/1.png
Normal file
BIN
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/img/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/img/2.png
Normal file
BIN
猿人学Web端爬虫攻防刷题平台/猿人学第16题-调试跳转-指纹-window删除陷阱/img/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in New Issue
Block a user