stop frame breaking codes

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Locked
illmapu
Forum Commoner
Posts: 47
Joined: Fri Aug 22, 2003 1:48 pm

stop frame breaking codes

Post by illmapu »

Hi,

Does anyone know if there is a way to identify/disable codes that break frames?

Thanks in advance!
:)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

You can't. Here's an example:

Code: Select all

<script type="text/javascript" defer="defer">
    if(self != top) top.location = location;
</script>
Without disabling javascript, I don't believe it is possible to prevent it.

Here is a better question: For the content are you trying to put into an iframe, that explicitly wants to pop out of frames, what right do you have to do so?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You *can* if you interfere with the code by importing it using PHP BUT BUT BUT... you really DO have to have permission and my guess is that since they have this set up, they will not give you permission. There's two reasons developers do this:

1. Stop people from stripping their content into their site.
2. Ensure the site is viewed the way they intended it to be viewed.

Link out to the site - don't force it to be somewhere it shouldn't be ;)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

d11wtq wrote:You *can* if you interfere with the code by importing it using PHP
Ah. I didn't think about it that way. Yes, you could scrape the site, and remove the script tag contents, and then display that code. Of course, the arguments about copyright, your rights to do so, and so on are all extremely important then.
illmapu
Forum Commoner
Posts: 47
Joined: Fri Aug 22, 2003 1:48 pm

Post by illmapu »

Hi,

Thanks to all for your replies. The reason I asked this question is because I own a website that auto-rotates member sites inside of frames to help them advertise their website to other members. (TE) The problem is when a site breaks frames, it stops the rotation of sites. This is normally done intentionally so that their website stops the rotation in hopes they get more advertising since the rotator stops at them and doesn't proceed onto the next member website.

As a business owner, if there was a way to somehow stop the site from breaking frames or have an auto check of all urls in my db at any time, it would benefit all members of my website.

The right I have is that when you join my website, according to my TOS when a member submits a website, framebreaking websites are not allowed to be submitted, period.

To be clear, I do not want to do anything to anyone elses code or website, I simply want to try to make it so my website can somehow identify these sites, even after they have been submitted by doing a test on them at any time without having to manually view hundreds of sites all of the time.

I already manually perform a check of all websites added prior to allowing them into rotation, but after the site is in rotation, I cannot stop someone from then adding the framebreaking code anyways.

I was thinking maybe there was a way I could perfom an auto-check of the urls through my admin area, but I'm not sure how I could do that?

Any masters out there that can help this little grasshopper?

Thanks in advance again!
:)
big_mumma
Forum Newbie
Posts: 4
Joined: Sat Apr 28, 2007 9:12 pm

Post by big_mumma »

IE solution:

Code: Select all

<iframe src=" somepage.html" security=restricted></iframe>
from: http://crypto.stanford.edu/framebust/

Mozilla solution:

Code: Select all

<html>
<body>
<script>
function test(e) {
    window.setTimeout ("stop();", 1);
}

window.onbeforeunload = test;

</script>
<iframe src="http://hackthissite.org/" />
</body>
</html>
from: http://kuza55.blogspot.com/2007/03/part ... g-out.html
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Long dead thread... locked.
Locked