有没有办法绕过检查其所在域的 PHP 应用程序?
我已经获得了一个 PHP 应用程序,该应用程序具有使用 Ion Cube PHP Encoder 编码的系统类。
我复制了这些文件并将它们移动到一台新服务器(开发服务器)。让我感兴趣的第一件事是应用程序只能在它所在的域上工作,所以显然不是来自 localhost
或任何其他服务器。
我猜测编码代码中的某个地方是从硬编码字符串到站点运行位置的字符串比较。
我不想做任何非法或违反软件许可证的事情 - 只是我想在不同的服务器上进行所有开发,然后将文件推回到原始域。
基本上,最大限度地减少生产现场的停机时间。
我有什么技巧可以做吗?我可以用我的主机文件来做到这一点吗?
谢谢
更新
忘记提及我在 PHP 检查之前尝试更改 $_SERVER
。还有一个需要 URL 的配置文件。将其保留在旧域中不起作用,并且更改它会导致无效域错误。
I have acquired a PHP application that has a system class encoded with Ion Cube PHP Encoder.
I copied the files and moved them to a new server, a development one. The first thing that got me was the application was to only work on the domain it was on, so obviously not from localhost
or any other server.
I'm guessing somewhere in the encoded code is a string comparison from a hardcoded string to where the site is running from.
I'm not looking to do anything illegal or against the software license - just I want to do all the development on a different server, and then push the files back to the original domain.
Basically, minimise downtime for the production site.
Is there any tricks I can do? Can I stuff with my hosts file to do it?
Thanks
Update
Forgot to mention that I have tried changing $_SERVER
before the PHP checks. There is also a config file which asks for the URL. Leaving it on the old domain doesn't work, and changing it results in the invalid domain error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于 Ion Cube 检查主机的精确程度 - 如果它使用主机名或等效名称,那么您需要修改服务器上的配置以认为它与生产服务器具有相同的名称,这不太可能是一个好主意,但是也许仍然比开发和建设环境更好。
如果它只是检查主机 HTTP 标头,那么您只需来回修改主机文件即可
It would depend on how exactly Ion Cube checks the host - if it uses hostname or equivalent then you would need to modify config on the server to think it has the same name as the production server, this is unlikely to be a good idea, but still maybe better than a developmestruction environment.
If it just checks the host HTTP header then you can just modify your hosts file back and forth
你使用什么操作系统?
将域名添加到您的主机文件中,如 127.0.0.1 (localhost)
例如:
在 Linux 下,
将此添加到文件 /etc/hosts
检查此链接以查找其他操作系统主机文件 链接文本< /a>
这应该使在本地主机上运行的应用程序引用它自己
what operating system are you using ?
add the domain name to your host file as 127.0.0.1 (localhost)
e.g:
under linux
add this to file /etc/hosts
checkthis link to find other OS hosts file link text
this should make the apps running on your localhost to refer to it's self