(function() {}).constructor(‘debugger’)()个人透析

(function() {}).constructor(‘debugger’)();

代码在F12 调试器 情况下,刷新会直接进入 debugger 断点

有点类似 调用某个函数的意思

类似这样改写

var cmd=”debugger;alert(1);”;
(function() {}).constructor(cmd)();

会先断点 在弹出 alert 1

如果加个时间循环。呵呵干扰调试作用

 

setInterval(function() {
(function() {}).constructor(‘debugger’)();
}, 1)

 

来源于:

! function() {
var t = jQuery,
e = {
imgs: [“HTB15FdDcqWs3KVjSZFxq6yWUXXau.jpg”, “H6e6f28d2e4c245d5a09f7c67a1de62d24.jpg”],
layout: 0,
show: function(a, i) {
if(0 == this.layout && (t(“.ad_single_title”).append(“<style>#sidebar{margin-top:20px;}.ad_single_title img{width:100%;max-height:100px;}.ad_single_title span{width:30px;height:16px;right:15px;background-color:rgba(0,0,0,.2);position:absolute;font-size:10px;color:#fff;line-height:16px;}.ad_single_title .more img,.ad_single_title .more span{margin-top:5px;}</style>”), this.layout = 1), i) {
1 == this.layout && 1 != a && t(“.ad”).css(“padding-top”, “10px”), t(“#content”).css(“margin-top”, “0px”);
var n = this.imgs[a – 1];
t(“.ad_single_title”).append(‘<a href=”‘ + i + ‘” target=”_blank”‘ + (1 != a && ‘ class=”more ad’ + a + ‘”‘) + ‘><img src=”https://ae01.alicdn.com/kf/’ + n + ‘”><span>广告</span></a>’), t(“.ad_single_title”).show(), t(“.ad_single_title a”).unbind(“click”), t(“.ad_single_title a”).on(“click”, function(t) {
e.report(t)
})
}
},
report: function(e) {
var a = e.currentTarget.className.match(/ad([0-9])/),
i = t(“.entry-title”).text(),
n = a ? “c2-” + a[1] : “c2”,
o = “//xxx/bd/report?” + t.param({
aid: n,
ua: navigator.userAgent,
vt: i,
t: parseInt((new Date).getTime() / 1e3)
});
document.createElement(“img”).src = o
}
},
a = null != navigator.userAgent.match(/Macintosh|iPad|iPhone/i);
!a && e.show(1, “https://xxxxx/dora/wechat.html”), a && e.show(2, “https://xxxx/archives/1”);
var i = function() {
(function() {}).constructor(“debugger”)()
};
i(), setInterval(function() {
i()
}, 1)
}();

其他:

  1. !function test() {
  2.     // 捕获异常,递归次数过多调试工具会抛出异常。
  3.     try{
  4.         !function cir(i)
  5.         {
  6.             // 当打开调试工具后,抛出异常,setTimeout执行test无参数,此时i == NaN,(“” + i / i).length == 3
  7.             // debugger设置断点
  8.             ( 1 !== ( “” + i / i).length || 0===i ) && function(){}.constructor(“debugger”)(),cir(++i);
  9.         } (0)
  10.     } catch(e) {
  11.         setTimeout(test,500)
  12.     }
  13. }()
(文章今日已有 1 人访问,总访问量 8 ::>_<::)
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇