这样的混淆器存在吗?
首先,我个人反对混淆,并同意其他人的观点,例如 上一个问题的大多数受访者。
然而,我被告知要找到一个。所以,请不要再重复为什么混淆器没用了。谢谢。
我必须找到一个
- 最好是免费的 PHP 混淆器:-)
- 将混淆所有字符串,但不会混淆 SQL (!!??) (例如,在
$_SESSION['password'] = 'secret'
;它应该混淆$_SESSION
、password
和secret
m,但不应该混淆像这样的字符串odbc_exec($connection, 'drop database if contains users');
) - 可以跨多个目录扫描项目并知道变量
$password
在文件 a.php 中声明并重命名to$lI1O0l
应该在文件 b.php 中如此命名,其中包括 a.php 和所有其他依赖项) - 将删除所有注释并减少空格
- ,这在中型项目(至少一个几十个目录中的几百个文件)
- (这很棘手)-无法访问互联网。因此,如果它是商业产品,它可能具有我从供应商处获得的许可证文件,并将其发送到客户的 IT 部门(例如,在 CD 上)进行安装。但客户的电脑无法访问互联网来确定混淆器是否获得有效许可。
这样的野兽存在吗?如果我通过 PHP 编译器运行代码并向客户发送可执行文件(如果是,是哪个编译器),会有什么不同吗?
我意识到这是一个相当有争议的话题,但我只是寻求建议来帮助我尝试完成我的工作......
提前致谢
First off, I am personally against obfuscation and agree with others who are so, such as most respondents to this previous question.
However, I have been told to find one. So, please, let's not rehash why obfuscators are useless. Thanks.
I have to find a PHP obfuscator which
- is preferably free :-)
- will obfuscate all strings, but not SQL (!!??) (e.g., in
$_SESSION['password'] = 'secret'
; it should obfuscate$_SESSION
,password
andsecret
m but should not obfuscate strings likeodbc_exec($connection, 'drop database if exists users');
) - can scan a project across multiple directories and know that variable
$password
declared in file a.php and renamed to$lI1O0l
should be so named in file b.php which includes a.php and all other dependency stuff) - will strip all comments and reduce whitespace
- is tried and proven on medium-large projects (at least a few hundred files in a few dozen directories)
- (and this one is tricky) - does not access the internet. So, if it is a commercial product it might have licence files which I get from the vendor and send to my customer's IT dept (on CD, for instance) for installation. But the customers' PCs will not have internet access to determine if the obfuscator is validly licensed.
Does such a beast exist? Would it make any difference if I run my code through a PHP compiler and ship an executable to the customers (if so, which compiler).
I realize this is rather a contentious subject, but I'm just asking for advice to help me try to do my job ...
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能最好只使用 Zend Guard 或类似的编码器。
You're probably best off just using an encoder like Zend Guard or similar.
我们的 PHP Obfuscator 将完成大部分工作。它已被用于非常大的 PHP 应用程序。
它不会不混淆 SQL 字符串,但我不确定这个要求从何而来。
它对此类字符串所做的操作不会改变它们在程序中的功能。
您可以告诉它不要混淆某些名称(例如 odbc),这通常是
如果这些名称来自您也无法混淆的包,则这是必需的。
编辑:它不需要访问互联网来验证它是否获得许可。
Our PHP Obfuscator will do most of this. It has been used on very large PHP applications.
It won't not-obfuscate SQL strings, but I'm not sure where that requirement came from.
What it does to such strings doesn't change thier functionality in programs.
You can tell it to not-obfuscate certain names (e.g., odbc), which is generally
required if those names come from packages you can't obfuscate, too.
EDIT: And it doesn't need internet access to verify it is licensed.