2024-04-08:
====================================================================================================
HObfusのzipファイルをダウンロードする際に、WindowsDefenderが、ウイルスの誤検出をして、ダウンロードをブロックする。
----------------------------------------------------------------------------------------------------
反応しているファイルは、examplesファルダ内にある、JavaScriptを含むPHPファイルである。(e.g. stopwatch.php)
----------------------------------------------------------------------------------------------------
解決策の一つとして、<html>と</html>の両方をPHPのechoに変える。
--------------------------------------------------------
<?php echo "<ht"."ml>"; ?>
<?php echo "</ht"."ml>"; ?>
--------------------------------------------------------
しかしこれは、目立ってしまってあまり美しくない。

別の解決策は、<script>と</script>をecho化する方法である。
--------------------------------------------------------
<?php echo "<scr"."ipt>"; ?>
<?php echo "</scr"."ipt>"; ?>
--------------------------------------------------------
<script>と</script>の間のJavaScriptを全部消しても、
エラーがでるので、JavaScriptのコードに問題ではない。
====================================================================================================

====================================================================================================
Solution: Echo-nize <script> and </script>
----------------------------------------------------------------------------------------------------
builder/include/CHObfusBuilder.class.php
----------------------------------------------------------------------------------------------------
// instanciate `js-extra`
$path_extra=self::$path_des_script."examples/extra.inc.php";
$extra=file_get_contents($path_extra);
$extra=rtrim($extra);
foreach(glob(self::$path_des_script."examples/*.php") as $path){
	$code=file_get_contents($path);
	$code=CSrcEditor::replaceCodeBlock($code,"js-extra",$extra);
	$code=CSrcEditor::removeComments($code);
>>>	//[BEGIN] echo-nize <script> and </script>
>>>	$code=str_replace("<script>",'<'.'?php echo "<scr"."ipt>"; ?'.'>',$code);
>>>	$code=str_replace("</script>",'<'.'?php echo "</scr"."ipt>"; ?'.'>',$code);
>>>	//[END] echo-nize <script> and </script>
	file_put_contents($path,trim($code));
}
====================================================================================================

====================================================================================================
Windows DefenderがBlockするために最小限の条件
----------------------------------------------------------------------------------------------------
html,head,body,scriptタグが必要。
----------------------------------------------------------------------------------------------------
Save the following HTML code as `test.html` or `test.php` and upload it to a web server and
try to download it. You will be blocked by Windows Defender.
----------------------------------------------------------------------------------------------------
<html>
	<head>
	</head>
	<body>
		<script>
		</script>
	</body>
</html>
----------------------------------------------------------------------------------------------------
<html><head></head><body><script></script></body></html>
====================================================================================================
