2010年8月12日 星期四

Facebook 用來防止 iframe 的 js code

facebook 不給 iframe. 玩玩看有沒有辦法能破解.


if (top != self) {
try {
if (top.location.hostname.indexOf("apps") >= 0) {
throw 1;
}
}
catch (e) {
setTimeout(function(){
var fb_cj_img = new Image();
fb_cj_img.src = "http:\/\/error.facebook.com\/common\/scribe_endpoint.php?c=si_clickjacking&m&t=9025";
}, 5000);
window.document.write("<style>body * { display:none !important; }<\/style><a href=\"#\" onclick=\"top.location.href=window.location.href\" style=\"display: block !important; padding: 10px\"><img class=\"img\" src=\"http:\/\/static.ak.fbcdn.net\/rsrc.php\/zESAW\/hash\/6rrukmi8.gif\" style=\"display:block !important\" width=\"190\" height=\"90\" \/>\u524d\u5f80 Facebook\u3002com<\/a>");
}


失敗1:

<script>
top.document.location.toString=function(){return false;}
</script>


失敗2:

<script language="javascript">
var location="";
var navigate="";
frames[0].location.href="";
var num = frames[0].strc;
</script>
<iframe src="http://www.facebook.com" ></iframe>

【下列文章您可能也有興趣】

沒有留言: