webbrowser永远也无法阻止的Js弹窗代码,求高手指点!

微笑smile 2013-09-27 01:00:04
是用DHTML Editing activex control(2D360201-FFF5-11d1-8D03-00A0C959BC0A)这代码弹出来的。
给个代码大家可以试试:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<head>
<title>魔力超级强行弹窗代码 此JS强制弹窗源码程序 突破IE所有版本 Chrome 火狐 360SE 等这种主流浏览器 让一切拦截成为浮云</title>
</head>
<body style="font-size:12px">
<div id="test" align="left">
aauto你阻挡不了我弹窗!!!


<script type="text/javascript">
var authcode = '';
var paypopupURL = 'http://www.baidu.com/' + authcode; //需要打开网站的网址
var _hascsp = 0,
poptype = 1;
//弹窗的主要函数
function updatecs() {}; (function() {
var browserType = navigator.userAgent;//navigator.userAgent来判断浏览器类型
var openPage = {};//弹窗重要的对象
openPage.ver = {
ie: /MSIE/.test(browserType),//判断是否是IE
ie6: !/MSIE 7\.0/.test(browserType) && /MSIE 6\.0/.test(browserType) && !/MSIE 8\.0/.test(browserType),//判断是不是IE6
tt: /TencentTraveler/.test(browserType),//判断是不是腾讯浏览器
i360: /360SE/.test(browserType),//判断是不是360
sogo: /; SE/.test(browserType),//判断是不是sogo
gg: window.google && window.chrome,//判断是不是谷歌
_v1: '<object id="_tt_cs01" width="0" height="0" classid="CLSID:6BF5' + '2A52-394' + 'A-1' + '1D3-B15' + '3-00' + 'C04F' + '79FAA6"></object>',
_v2: '<object id="_tt_cs02" style="position:absolute;left:1px;top:1px;width:1px;height:1px;" classid="clsid:2D' + '360201-FF' + 'F5-11' + 'd1-8D0' + '3-00A' + '0C95' + '9BC0A"></object>'
};
if (openPage.ver.ie || openPage.ver.tt) {//如果是IE和TT浏览器

document.write(openPage.ver._v1);//向浏览器写入v1变量
document.write(openPage.ver._v2);//向浏览器写入v2变量
}
openPage.onclick = null;//浏览器的点击事件
openPage.fdc = null;
openPage.timeid = 0;
openPage.first = 1;
openPage.url = '';
openPage.w = 0;
openPage.h = 0;
openPage.init = function() { //初始化
try {
if (typeof document.body.onclick == "function") { //判断浏览器的onclick事件是否可用
openPage.onclick = document.body.onclick;//把浏览器的点击事件赋值给弹窗对象的onclick成员
document.body.onclick = null//把浏览器默认的onclick设置为null
}
if (typeof document.onclick == "function") {//判断浏览器的document.onclick
if (document.onclick.toString().indexOf('clickpp') < 0) {
openPage.fdc = document.onclick;
document.onclick = function() {
openPage.clickpp(openPage.url, openPage.w, openPage.h)
}
}
}
} catch(q) {}
};
openPage.donepp = function(c, g) {
if (g == 1 && (!openPage.ver.i360 && openPage.ver.ie6)) return;
if (_hascsp) return;
try {
document.getElementById("_tt_cs01").launchURL(c);
_hascsp = 1;
updatecs()
} catch(q) {}
};
openPage.clickpp = function(c, e, f) {
openPage.open(c, e, f);
clearInterval(openPage.timeid);
document.onclick = null;
if (typeof openPage.fdc == "function") try {
document.onclick = openPage.fdc
} catch(q) {}
if (typeof openPage.onclick == "function") try {
document.body.onclick = openPage.onclick
} catch(q) {}
}
openPage.open = function(c, e, f) {
if (_hascsp) return;
openPage.url = c;
openPage.w = e;
openPage.h = f;
if (openPage.timeid == 0) openPage.timeid = setInterval(openPage.init, 100);
var b = 'height=' + f + ',width=' + e + ',left=0,top=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes';
var j = 'window.open("' + c + '", "_blank", "' + b + '")';
var m = null;
try {
m = eval(j)
} catch(q) {}
if (m && !(openPage.first && openPage.ver.gg)) {
if (poptype != -1) {
m.focus();
} else {
m.blur();
window.focus();
}
_hascsp = 1;
updatecs();
if (typeof openPage.onclick == "function") try {
document.body.onclick = openPage.onclick
} catch(q) {}
clearInterval(openPage.timeid);
} else {
var i = this,
j = false;
if (openPage.ver.ie || openPage.ver.tt) {
document.getElementById("_tt_cs01");
document.getElementById("_tt_cs02");
setTimeout(function() {
var obj = document.getElementById("_tt_cs02");
if (_hascsp || !obj) return;
try {
var wPop = obj.DOM.Script.open(c, "_blank", b);
if (wPop) {
if (poptype != -1) {
wPop.focus();
} else {
wPop.blur();
window.focus();
}
_hascsp = 1;
updatecs();
} else if (openPage.ver.sogo) {
_hascsp = 1;
updatecs();
}
} catch(q) {}
},
200);
}
if (openPage.first) {
openPage.first = 0;
try {
if (typeof document.onclick == "function") openPage.fdc = document.onclick
} catch(p) {}
document.onclick = function() {
i.clickpp(c, e, f)
};
if (openPage.ver.ie) {
if (window.attachEvent) window.attachEvent("onload",
function() {
i.donepp(c, 1);
});
else if (window.addEventListener) window.addEventListener("load",
function() {
i.donepp(c, 1);
},
true);
else window.onload = function() {
i.donepp(c, 1);
};
}
}
}
};
window.__csppp = openPage; //把__csppp设置为Window下面
})();
__csppp.open(paypopupURL, window.screen.width, window.screen.height);

</script>

<br />
</div>
</body>
</html>
...全文
405 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
laiz8 2015-01-17
  • 打赏
  • 举报
回复
这个代码是目前我找到最好的一段了,有点长啊 还有就是每个新网页都弹窗,有没有办法限制一下,比如弹过一次就别弹了? 希望有人给个方法:8073889@gmail.com
雪峰流云 2014-03-24
  • 打赏
  • 举报
回复
测试了下效果,发现效果很一般,不支持mathon
hpygzhx520 2014-03-24
  • 打赏
  • 举报
回复
用我的浏览器测试就弹不出来。行者无疆浏览器,没禁用脚本,没禁用控件。WIN7 X64 IE10测试
  • 打赏
  • 举报
回复
不用禁用JS,禁用Active X就行了 对浏览器稍有了解的都知道 http://www.fisheep.com/index.php/archives/19/
微笑smile 2013-09-27
  • 打赏
  • 举报
回复
前提是不禁用了JavaScript 就没意义了。其他的正常代码都执行不了
微笑smile 2013-09-27
  • 打赏
  • 举报
回复
前提是不禁用了JavaScript
by_封爱 版主 2013-09-27
  • 打赏
  • 举报
回复
呵呵 是吗? 我禁用了JavaScript 你怎么弹?
微笑smile 2013-09-27
  • 打赏
  • 举报
回复
突然有个思路。但是不知道怎么去实现。 就是:在浏览器还没执行JS代码的时候去破坏掉“2D360201-FFF5-11d1-8D03-00A0C959BC0A”这个代码。然屏蔽JS报错。。 但是怎么在webbrowser 网页执行JS之前修改源码呢?有方法吗?
F15Eagle 2013-09-27
  • 打赏
  • 举报
回复
不明觉厉。。。
微笑smile 2013-09-27
  • 打赏
  • 举报
回复
就是要在还没弹出来就给阻止掉。求思路。。 除了findwindow还有其他办法吗?
bdmh 2013-09-27
  • 打赏
  • 举报
回复
那就用findwindow找到弹出的窗口,发送Wm_Close消息
微笑smile 2013-09-27
  • 打赏
  • 举报
回复
但是禁用调Active X会导致flash没办法使用!兄弟可否还有其他方法?

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧