消灭顽固的 FRAME 杀手
我已经尝试了几个小时来解决这个问题,但没有成功...我现在非常绝望:(
我正在为一家公司进行渗透测试,我需要绕过这个框架杀手 JS:
<script type="text/javascript">/* <![CDATA[ */
if (top != self) {
try {
if (parent != top) {
throw 1;
}
var disallowed = ['XXXXXXX.com'];
var href = top.location.href.toLowerCase();
for (var i = 0; i < disallowed.length; i++) {
if (href.indexOf(disallowed[i]) >= 0) {
throw 1;
}
}
} catch (e) {
try {
window.document.getElementsByTagName('head')[0].innerHTML = '';
} catch (e) { /* IE */
var htmlEl = document.getElementsByTagName('html')[0];
htmlEl.removeChild(document.getElementsByTagName('head')[0]);
var el = document.createElement('head');
htmlEl.appendChild(el);
}
window.document.body.innerHTML = '<a href="#" onclick="top.location.href=window.location.href" style="text-decoration:none;"><img src="http://www.XXXXXXX.com/img/XXXXXX.gif" style="border:0px;" /><br />Go to XXXXXXX.com</a>';
}
}
/* ]]> */</script>
非常感谢!
I've been trying to break this up for a few hours now but with no success... I am pretty desperate now :(
I am doing penetration testing for a company and I need to bypass this frame killer JS:
<script type="text/javascript">/* <![CDATA[ */
if (top != self) {
try {
if (parent != top) {
throw 1;
}
var disallowed = ['XXXXXXX.com'];
var href = top.location.href.toLowerCase();
for (var i = 0; i < disallowed.length; i++) {
if (href.indexOf(disallowed[i]) >= 0) {
throw 1;
}
}
} catch (e) {
try {
window.document.getElementsByTagName('head')[0].innerHTML = '';
} catch (e) { /* IE */
var htmlEl = document.getElementsByTagName('html')[0];
htmlEl.removeChild(document.getElementsByTagName('head')[0]);
var el = document.createElement('head');
htmlEl.appendChild(el);
}
window.document.body.innerHTML = '<a href="#" onclick="top.location.href=window.location.href" style="text-decoration:none;"><img src="http://www.XXXXXXX.com/img/XXXXXX.gif" style="border:0px;" /><br />Go to XXXXXXX.com</a>';
}
}
/* ]]> */</script>
Thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用以下选项之一:
参考资料
Use one of the following:
References