绕过 console-ban
绕过 console-ban
console-ban 项目介绍
console-ban 是一个高效且轻量级的 JavaScript 库,其核心功能是有效阻止用户通过浏览器的开发者工具(例如按 F12 键或审查元素功能)访问你的网站资源。这一设计旨在减少非法爬虫活动,并降低潜在的安全威胁。该库通过提供一种简洁易行的方式,实现当用户尝试打开控制台时,能够触发重定向、重写文档内容或执行自定义行为,从而确保网站资源的完整性和安全性。
console-ban.min.js 源代码
/*!
* console-ban v4.1.0
* (c) 2020-2022 fz6m
* Released under the MIT License.
*/
! function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self)
.ConsoleBan = {})
}(this, (function(e) {
"use strict";
var t = function() {
return t = Object.assign || function(e) {
for (var t, i = 1, n = arguments.length; i < n; i++)
for (var o in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e
}, t.apply(this, arguments)
},
i = {
clear: !0,
debug: !0,
debugTime: 3e3
},
n = 2,
o = function(e) {
return ~navigator.userAgent.toLowerCase()
.indexOf(e)
},
r = function(e, t) {
t !== n ? location.href = e : location.replace(e)
},
c = 0,
a = 0,
f = function(e) {
var t = 0,
i = 1 << c++;
return function() {
(!a || a & i) && 2 === ++t && (a |= i, e(), t = 1)
}
},
l = function(e) {
var t = /./;
t.toString = f(e);
var i = function() {
return t
};
i.toString = f(e);
var n = new Date;
n.toString = f(e), console.log("%c", i, i(), n);
var o, r, c = f(e);
o = c, r = new Error, Object.defineProperty(r, "message", {
get: function() {
o()
}
}), console.log(r)
},
u = function() {
function e(e) {
var n = t(t({}, i), e),
o = n.clear,
r = n.debug,
c = n.debugTime,
a = n.callback,
f = n.redirect,
l = n.write;
this._debug = r, this._debugTime = c, this._clear = o, this._callback = a, this._redirect = f, this._write = l
}
return e.prototype.clear = function() {
this._clear && (console.clear = function() {})
}, e.prototype.debug = function() {
if (this._debug) {
var e = new Function("debugger");
setInterval(e, this._debugTime)
}
}, e.prototype.redirect = function(e) {
var t = this._redirect;
if (t)
if (0 !== t.indexOf("http")) {
var i, n = location.pathname + location.search;
if (((i = t) ? "/" !== i[0] ? "/".concat(i) : i : "/") !== n) r(t, e)
} else location.href !== t && r(t, e)
}, e.prototype.callback = function() {
if ((this._callback || this._redirect || this._write) && window) {
var e, t = this.fire.bind(this),
i = window.chrome || o("chrome"),
r = o("firefox");
if (!i) return r ? ((e = /./)
.toString = t, void console.log(e)) : void
function(e) {
var t = new Image;
Object.defineProperty(t, "id", {
get: function() {
e(n)
}
}), console.log(t)
}(t);
l(t)
}
}, e.prototype.write = function() {
var e = this._write;
e && (document.body.innerHTML = "string" == typeof e ? e : e.innerHTML)
}, e.prototype.fire = function(e) {
this._callback ? this._callback.call(null) : (this.redirect(e), this._redirect || this.write())
}, e.prototype.ban = function() {
this.callback(), this.clear(), this.debug()
}, e
}();
e.init = function(e) {
new u(e)
.ban()
}, Object.defineProperty(e, "__esModule", {
value: !0
})
}));
绕过 console-ban 方法
运行工具
fiddler

打开
After Responses模式

访问被测网站

在
fiddler里找到console-ban.min.js请求

修改
Raw中的代码, 并点击Run to Completion, 代码如下

!function(e, t) {
var u = function() {
function e(e) {
this.ban = function() {
};
}
return e;
}();
e.init = function(e) {
};
}(this, (function(e) {
"use strict";
}));
- 打开被测网站的控制台

绕过 console-ban的更多相关文章
- Scrapy 爬虫 使用指南 完全教程
scrapy note command 全局命令: startproject :在 project_name 文件夹下创建一个名为 project_name 的Scrapy项目. scrapy sta ...
- Scrapy 爬虫
Scrapy 爬虫 使用指南 完全教程 scrapy note command 全局命令: startproject :在 project_name 文件夹下创建一个名为 project_name ...
- Huawei AP3030DN固件升级
进入uboot: 上电,当出现Press f of F stop Auto-Boot in 3 seconds: 0 时按键盘上的F键 Password for uboot cmd line : 密码 ...
- 爬虫:Scrapy17 - Common Practices
在脚本中运行 Scrapy 除了常用的 scrapy crawl 来启动 Scrapy,也可以使用 API 在脚本中启动 Scrapy. 需要注意的是,Scrapy 是在 Twisted 异步网络库上 ...
- Scrapy系列教程(6)------怎样避免被禁
避免被禁止(ban) 有些网站实现了特定的机制,以一定规则来避免被爬虫爬取. 与这些规则打交道并不easy,须要技巧,有时候也须要些特别的基础. 假设有疑问请考虑联系 商业支持 . 以下是些处理这些网 ...
- 从偶然的机会发现一个mysql特性到wooyun waf绕过题
从偶然的机会发现一个mysql特性到wooyun waf绕过题 MayIKissYou | 2015-06-19 12:00 最近在测试的时候,偶然的机会发现了一个mysql的特性, 为啥是偶然的机会 ...
- 【QQ技术】群文件报毒怎样下载?~ 变相绕过QQ复杂检验过程
刚才又人问我,要是群文件被鉴定为病毒那怎么下载? 我简单说一下吧: 其实qq客户端过滤比较严的,而web段却还是老一套,很多人说出现这个情况其实是腾讯已经把他库里面的文件删了,其实不然 如果源删了,那 ...
- Js 关于console 在IE 下的兼容问题
程序员在开发代码的过程中,使用console作为调试代码过程的一种手段. 发布到测试生产环境,发现IE8 出现加载错误.使用开发者工具调试,发现可以绕过问题. 通过网络搜索和在项目中进行修正. 以下办 ...
- 浅析console和浏览器命令行API
一.console对象: F12或者Control+Shift+i(Win)/ Alt+Command+i(Mac)打开浏览器自带的开发工具,选择顶部tab中的最后一项console,这样你就可以尽情 ...
- 在iOS应用程序中使用Frida绕过越狱检测
阿里聚安全在之前的三篇博客中介绍了利用Frida攻击Android应用程序,整个过程仿佛让开发者开启上帝视角,在本篇博客中,我们将会介绍在iOS应用程序中使用Frida绕过越狱检测.即使 ...
随机推荐
- Spring开闭原则的表现-BeanPostProcessor的扩展点-1
上接Spring事务处理时自我调用的解决方案及一些实现方式的风险继续分析,在分析上篇的问题之前,我们需要了解下BeanPostProcessor概念和Spring容器创建Bean的流程. 一.Bean ...
- Android运行时请求权限封装
@ 目录 1 介绍 2 测试用例设计 3 实现 4 用例测试 5 总结 本文目的:"借助透明Activity封装一个易于调用的权限请求模块" 1 介绍 Android权限的校验和申 ...
- Electron包下载经常失败或太慢问题
前情 Electron是很好的桌面端开发框架,公司有个桌面端项目就是基于Electron开发的. 坑 在项目初始化的时候,需要通过npm install安装项目需要依赖的模块,但是经常报Electro ...
- GPU 驱动漏洞:窥探驱动漏洞利用的技术奥秘
GPU 驱动漏洞:窥探驱动漏洞利用的技术奥秘 本文尝试以 GPU 漏洞为引介绍围绕 GPU 驱动这一攻击面,安全研究人员对内核漏洞利用技术做的一些探索. 背景介绍 目前移动 SOC 平台上由多个硬件模 ...
- CVE-2023-3609 Linux 内核 UAF 漏洞分析与漏洞利用
漏洞分析 通过分析补丁和漏洞描述可以知道漏洞是位于 u32_set_parms 函数里面,代码如下: static int u32_set_parms(struct net *net, struct ...
- 2.猿人学爬虫攻防第二题 JS 混淆 动态cookie
题目链接:请点击 抓取到发布日热度的值,计算所有值的加和 1.分析网页 由于是动态Cookie,为了避免其他Cookie的影响,所以使用浏览器的无痕模式进行调试,按f12并选中[Preserve lo ...
- .NET Aspire 外部参数 (External parameters)
.NET Aspire 外部参数 (External parameters) https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/ ...
- DSB的数字正交解调
1.DSB调制过程 DSB信号是一种双边带调幅调制信号,又叫双边带调幅,通过改变载波的振幅来实现基带数据的传输. 其函数表达式如下: \[s(t) = m(t)*cos(2\pi ft + \va ...
- 解决:pip is configured with locations that require TLS/SSL
解决: mkdir -p ~/.pipvim ~/.pip/pip.conf然后输入内容: [global]index-url = http://mirrors.aliyun.com/pypi/sim ...
- 解决springboot配置@ControllerAdvice不能捕获NoHandlerFoundException问题
使用springboot开发一个RESTful API服务,配置了@ControllerAdvice,其它类型异常都能正常捕获,就是不能捕获NoHandlerFoundException, 安装以往使 ...