有没有办法绕过检查其所在域的 PHP 应用程序?

发布于 2024-09-27 13:28:38 字数 516 浏览 1 评论 0原文

我已经获得了一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纸短情长 2024-10-04 13:28:38

这取决于 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

暖树树初阳… 2024-10-04 13:28:38

你使用什么操作系统?

将域名添加到您的主机文件中,如 127.0.0.1 (localhost)

例如:
在 Linux 下,

将此添加到文件 /etc/hosts

127.0.0.1  thedomainname.com

检查此链接以查找其他操作系统主机文件 链接文本< /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

127.0.0.1  thedomainname.com

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文