#2 - disable java-script iframes (hardcore)
I have a page with iframe always redirect to url owner!
iframe is as follows:
<iframe src="http://torpedo.oiloja.com.br/oitorpedo/EnviaSMSController" name="sidebarfram" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="320 "height="530" id="sidebarfram2"></ iframe>
if someone likes challenges, will like this
very difficult :confused:
Reply,#2 - disable java-script iframes (hardcore)
Yes WolfShade!!
is a "frame-buster" case, but this example never saw before!
I tried all!
php file_get_content; iframe of iframe; anti-frame-buster; but does not work!
i think with other guys studying, it is more easy to resolve.
the techinique used is hard to break.
look my php example:
<?php $page = file_get_contents('iframe com src="http://torpedo.oiloja.com.br/oitorpedo/EnviaSMSController"');// use CURL if possible, this is not a good piece of code
echo strip_javascript($page, 0);// 0 = allow no javascript
function strip_javascript($filter, $allowed=0){
if($allowed&1 == 0) // 1 href=...
$filter = preg_replace('/href=([\'"]).*?javascript:.*?\\1/i', "'", $filter);
if($allowed&2 == 0) // 2 <script....
$filter = preg_replace("/<script.*?>.*?<\/script>/i", "", $filter);
if($allowed&4 == 0) // 4 <tag on.... ---- useful for onlick or onload
$filter = preg_replace("/<(.*)?\son.+?=\s*?(['\"]).*?\\2/i", "<$1", $filter);
return $filter;
}?>