|
|
@@ -73,11 +73,16 @@ if (mb_stripos($head, "<base") === false ) {
|
|
|
|
|
|
$head = str_ireplace('src="//', 'src="https://', $head);
|
|
|
$head = str_ireplace('src="/', 'src="'.$domain.'/', $head);
|
|
|
-$head = str_ireplace('src="js/', 'src="'.$domain.'/js/', $head);
|
|
|
-$head = str_ireplace('src="/js/', 'src="'.$domain.'/js/', $head);
|
|
|
+$head = preg_replace('/src="(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)"/iU', "src=\"".$domain."/$1\"", $head);
|
|
|
+$head = preg_replace("/src='(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)'/iU", "src='".$domain."/$1'", $head);
|
|
|
+//$head = preg_replace("/src=(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)/iU", "src='".$domain."/$1'", $head);
|
|
|
+//$head = str_ireplace('src="js/', 'src="'.$domain.'/js/', $head);
|
|
|
+//$head = str_ireplace('src="/js/', 'src="'.$domain.'/js/', $head);
|
|
|
$head = str_ireplace('href="//', 'href="https://', $head);
|
|
|
$head = str_ireplace('href="/', 'href="'.$domain.'/', $head);
|
|
|
$head = preg_replace('/href="(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)"/iU', "href=\"".$domain."/$1\"", $head);
|
|
|
+$head = preg_replace("/href='(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)'/iU", "href='".$domain."/$1'", $head);
|
|
|
+//$head = preg_replace("/href=(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)/iU", "href='".$domain."/$1'", $head);
|
|
|
|
|
|
//$body = preg_replace("/<body .+>/iU", "$0\n<form id='LIGHTOFFfrmUpload' role='form' method='get' action='/surf2.php' target='_self' enctype='multipart/form-data'>\n<div id='LIGHTOFFcontent'><div id='LIGHTOFFheader-surf'><br> <span style='font-weight:900;'>LIGHTOFF</span><br></div>", $body);
|
|
|
|
|
|
@@ -86,11 +91,16 @@ $body = str_ireplace("</body>", "\n\n<script src='".APP_HOST."/js/surf.js' type=
|
|
|
|
|
|
$body = str_ireplace('src="//', 'src="https://', $body);
|
|
|
$body = str_ireplace('src="/', 'src="'.$domain.'/', $body);
|
|
|
-$body = str_ireplace('src="js/', 'src="'.$domain.'/js/', $body);
|
|
|
-$body = str_ireplace('src="/js/', 'src="'.$domain.'/js/', $body);
|
|
|
+$body = preg_replace('/src="(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)"/iU', "src=\"".$domain."/$1\"", $body);
|
|
|
+$body = preg_replace("/src='(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)'/iU", "src='".$domain."/$1'", $body);
|
|
|
+//$body = preg_replace("/src=(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)/iU", "src='".$domain."/$1'", $body);
|
|
|
+//$body = str_ireplace('src="js/', 'src="'.$domain.'/js/', $body);
|
|
|
+//$body = str_ireplace('src="/js/', 'src="'.$domain.'/js/', $body);
|
|
|
$body = str_ireplace('href="//', 'href="https://', $body);
|
|
|
$body = str_ireplace('href="/', 'href="'.$domain.'/', $body);
|
|
|
$body = preg_replace('/href="(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)"/iU', "href=\"".$domain."/$1\"", $body);
|
|
|
+$body = preg_replace("/href='(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)'/iU", "href='".$domain."/$1'", $body);
|
|
|
+//$body = preg_replace("/href=(.{6}(?<!http:\/)(?<!https:)(?<!ftp:\/\/).+)/iU", "href='".$domain."/$1'", $body);
|
|
|
|
|
|
$body = preg_replace('/href="(.+)"/iU', "href=\"".APP_HOST."/surf.php?url=$1\"", $body);
|
|
|
|
|
|
@@ -100,4 +110,4 @@ echo($w);
|
|
|
|
|
|
?>
|
|
|
|
|
|
-
|
|
|
+
|