タグ付けされた質問 「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から自動的に「バスト」または抜け出します。1つの小さな問題を除きます。 結局のところ、次に示すように、フレーム無効化コードが無効化される可能性があります。 <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) …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.