De-Cloaking

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2267
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

De-Cloaking

Post by Capm »

Okay, say you have domain1.com forward to domain2.com, but you have it cloaked, so that no matter where you are on domain2.com, it shows domain1.com in the url bar.

I need a forwarder that breaks the cloak without having to click a link. the meta below should work, but doesn't. The link you click works, but the automatic refresh doesnt.

Code: Select all

<html>
<head>
<meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\"> 
<meta HTTP-EQUIV=\"refresh\" CONTENT=\"15;url=http://www.midnightsquadron.net/board/index.php?act=home\">
<META HTTP-EQUIV=\"Window-target\" CONTENT=\"_top\">  
<title>Midnight Squadron Loader</title> 
</head> 
<body BGCOLOR=\"#000000\" TEXT=\"#FFFFFF\"> 
<center> 
<a HREF=\"http://www.midnightsquadron.net/board/index.php?act=home\" target=\"_top\">
<img SRC=\"loading.jpg\" BORDER=\"0\" WIDTH=\"145\" HEIGHT=\"100\">
</a>
</center> 
</body> 
</html>    
Anyway... I'm stumped.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

The meta refresh mightn't work because of how cloaking is implemented. When you say that the URL is cloaked, do you mean that *any* URL on domain2.com appears in the address bar as merely \"http://domain1.com\"? Or does the address bar show the correct relative URL, such that \"http://domain2.com/page\" appears as \"http://domain1.com/page\" in the address bar?

If the former, then what's probably going on is that your cloaking provider is using a full-page frame or iframe to pull in the content from the originating URL. This means that the meta refresh will cause that frame to redirect, not the entire browser window. The hyperlink, on the other hand, has a target of \"_top\", which means that the topmost level of the browser window will be redirected.

To get this behavior automatically, you will need to use JavaScript.
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2267
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

Post by Capm »

Yea, any url on domain2 shows as domain1.com

So.. Know where I can find that javascript?
--------------
----------
---Capm
http://www.midnightsquadron.com
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Try this:

Code: Select all

<html>
<head>
<script type=\"text/javascript>
window.top.location.href = \"http://www.domain2.com/uncloaked_url\"
</script>
</head>
<body>
<a href=\"http://www.domain2.com/uncloaked_url\" target=\"_top\">Click here if your browser does not automatically redirect you.</a>
</body>
</html>
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2267
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

Post by Capm »

Doesn't automaticly forward the page?
--------------
----------
---Capm
http://www.midnightsquadron.com
User avatar
Capm
DBB DemiGod
DBB DemiGod
Posts: 2267
Joined: Thu Nov 05, 1998 12:01 pm
Location: Topeka, KS
Contact:

Post by Capm »

Ahah, got it.

had to add

Code: Select all

<body BGCOLOR=\"#000000\" TEXT=\"#FFFFFF\" onload=\"setTimeout('forward()',5)\"> 
Thanks!
--------------
----------
---Capm
http://www.midnightsquadron.com
Post Reply