require_once("js/js.php");
// from http://j4p5.sourceforge.net/
$url = $_GET['u'];
$lines = file($url);
// method: rot13
// from: http://www.roelvangils.be/geo/demo/
function checkRot13($line)
{
$r = '';
if(preg_match('/"contact\/(.*?)"/', $line, $matches))
{
$str = str_rot13($matches[1]);
$n = 0;
for($i = 0; $i < strlen($str); $i++)
{
if($str[$i] == '+')
if(!$n) { $str[$i] = '@'; $n = 1; }
else { $str[$i] = '.'; }
}
$r = $str;
}
return $r;
}
// method: javascript obfuscation
// from: http://www.seowebsitepromotion.com/obfuscate_email.asp
// uses http://j4p5.sourceforge.net/
$jsBlock = array();
$inBlock = false;
function checkJs($line, &$results)
{
global $jsBlock;
global $inBlock;
if(strpos($line, '') !== false)
{
$inBlock = false;
$script = implode("\n", $jsBlock);
js::run($script);
echo "
\n";
}
if($inBlock)
{
if($line[0] != '<')
{
$line = preg_replace('/\/\/.*/', '', $line);
$line = preg_replace('/document\.write/', 'print', $line);
$line = preg_replace('/([\w\)"])\s*$/', '\1;', $line);
array_push($jsBlock, $line);
}
}
if(strpos($line, '