Questions tagged «framebusting»

19
框架克星克星…需要克星码
假设您不希望其他网站将您的网站“框”在<iframe>: <iframe src="http://example.org"></iframe> 因此,您可以在所有页面中插入反框架,框架破坏JavaScript: /* break us out of any containing iframes */ if (top != self) { top.location.replace(self.location.href); } 优秀的!现在,您可以自动“破坏”或突破包含iframe的任何内容。除了一个小问题。 事实证明,您的框架破坏代码可以被破坏,如下所示: <script type="text/javascript"> var prevent_bust = 0 window.onbeforeunload = function() { prevent_bust++ } setInterval(function() { if (prevent_bust > 0) { prevent_bust -= 2 window.top.location = 'http://example.org/page-which-responds-with-204' } }, 1) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.