有人用过PHP的混淆器吗?我试过一些,但它们不适用于非常大的项目。例如,它们不能处理包含在一个文件中而在另一个文件中使用的变量。
或者你有其他阻止代码传播的技巧吗?
有人用过PHP的混淆器吗?我试过一些,但它们不适用于非常大的项目。例如,它们不能处理包含在一个文件中而在另一个文件中使用的变量。
或者你有其他阻止代码传播的技巧吗?
当前回答
我不确定你是否可以将混淆解释语言标记为毫无意义(我无法在Schwern的帖子中添加评论,所以这里有一个新的条目)。
我认为,假设你知道所有可能的情况下,有人想要混淆代码,你假设任何人都愿意去看任何必要的长度,一旦混淆的代码。考虑一下我目前的情况:
I work for a consulting company that is developing a large and fairly sophisticated PHP-based site. The project will be hosted on a client's server that is hosting other sites developed by other consultancies. Technically any code we write is owned by the client, so we can't license it. However, any other consultancy (competitor) with access to the server can copy our code without getting permission from the client first. We therefore have a genuine reason for obfuscation - to make the effort required for a competitor to understand our code more than the effort of creating a copy of our work from scratch.
其他回答
我不确定你是否可以将混淆解释语言标记为毫无意义(我无法在Schwern的帖子中添加评论,所以这里有一个新的条目)。
我认为,假设你知道所有可能的情况下,有人想要混淆代码,你假设任何人都愿意去看任何必要的长度,一旦混淆的代码。考虑一下我目前的情况:
I work for a consulting company that is developing a large and fairly sophisticated PHP-based site. The project will be hosted on a client's server that is hosting other sites developed by other consultancies. Technically any code we write is owned by the client, so we can't license it. However, any other consultancy (competitor) with access to the server can copy our code without getting permission from the client first. We therefore have a genuine reason for obfuscation - to make the effort required for a competitor to understand our code more than the effort of creating a copy of our work from scratch.
试试这个:http://www.pipsomania.com/best_php_obfuscator.do
最近我用Java写了它来混淆我的PHP项目,因为我在网上没有找到任何好的和兼容的现成的东西,我决定把它作为saas放在网上,这样每个人都可以免费使用它。它不改变不同脚本之间的变量名,以获得最大的兼容性,但是很好地混淆了它们,使用随机逻辑,每条指令也是如此。弦……一切。我相信它比这个有bug的代码eclipse要好得多,顺便说一句,那是用PHP写的,非常慢:)
用于PHP的Thicket™混淆器
PHP Obfuscator工具打乱了PHP源代码,使其非常难以理解或逆向工程(示例)。这为必须托管在网站上或交付给客户的源代码知识产权提供了重要的保护。它是SD源代码混淆器家族的成员。
没有什么是完美的。如果你只是想阻止非程序员,那么这里有一个我写的小脚本,你可以使用:
<?php
$infile=$_SERVER['argv'][1];
$outfile=$_SERVER['argv'][2];
if (!$infile || !$outfile) {
die("Usage: php {$_SERVER['argv'][0]} <input file> <output file>\n");
}
echo "Processing $infile to $outfile\n";
$data="ob_end_clean();?>";
$data.=php_strip_whitespace($infile);
// compress data
$data=gzcompress($data,9);
// encode in base64
$data=base64_encode($data);
// generate output text
$out='<?ob_start();$a=\''.$data.'\';eval(gzuncompress(base64_decode($a)));$v=ob_get_contents();ob_end_clean();?>';
// write output text
file_put_contents($outfile,$out);
混淆只会给程序增加另一层潜在的错误和安全漏洞。请不要这样做。
编写模糊化软件的人通常看起来非常粗略和不熟练。
如果你的代码“很棒”,黑客就会竭尽全力传播它,不管它是否被混淆。如果没有人知道/关心你的代码,他们可能也不会。