简体   繁体   English

Coldfusion二进制文件

[英]Coldfusion Binary files

I have some .cfm files which have a binary corrupted lines, and I used a Java decompiler to see the code of these files by converting its extension to .class. 我有一些带有二进制损坏行的.cfm文件,并且我使用Java反编译器通过将其扩展名转换为.class来查看这些文件的代码。

What I ask about, how can I modify on these files, or even see the lines as a CFML template, and run it so I can access it on my server 我要问的是如何修改这些文件,甚至将这些行视为CFML模板,然后运行它以便可以在服务器上对其进行访问

      SourceFile? :C:\\inetpub\\wwwroot\\Clients\\ent\\www\\ADMIN\\clips\\logclip.cfm? 

To my knowledge there is no way to get the original source back from the compiled cfm files because it is not actually encrypted or corrupted, it's really just a class file. 据我所知,没有办法从已编译的cfm文件中取回原始源,因为它实际上并没有被加密或损坏,它实际上只是一个类文件。

There is a bit more information about it here by Rupesh Kumar from the CF team CF团队的Rupesh Kumar在此提供了更多信息

http://coldfused.blogspot.co.uk/2008/01/encrypted-cfml-templates.html http://coldfused.blogspot.co.uk/2008/01/encrypted-cfml-templates.html

2 answers here: 这里有2个答案:

If you are speaking of the compiled class files and you have the cfm files you can safely delete the classfiles (in the "cfclasses" directory of your instance). 如果您说的是已编译的类文件,并且具有cfm文件,则可以安全地删除类文件(在实例的“ cfclasses”目录中)。 ColdFusion will recompile them when next your run the source file. 下次运行源文件时,ColdFusion将重新编译它们。 The big gotcha is, if this is a high traffic site and you delete ALL the files, then you may drag your server down as CF has to recompile everything. 最大的麻烦是,如果这是一个人流量大的站点,并且您删除了所有文件,那么您可能会拖下服务器,因为CF必须重新编译所有内容。 In that case you might want to be more selective. 在这种情况下,您可能希望更具选择性。

If you mean you are seeing nonsense encryption in a CF file and the only readible part of the file is at the top (a sort of header that tells you what it is), then you are working with encrypted CFM files - CF provides (or provided) a utility to encrypt and deploy CFM files to hide source code. 如果您是说在CF文件中看到无用的加密,并且文件的唯一可读部分在顶部(一种标头,告诉您它是什么),则说明您正在使用加密的CFM文件 -CF提供(或提供)加密和部署CFM文件以隐藏源代码的实用程序。 The CF engine can unecrypt these files into regular CF then compile them down into class files. CF引擎可以将这些文件解密为常规CF,然后将其编译为类文件。 The encryption used was (in the past) quite trivial and not much protection at all. (过去)使用的加密非常琐碎,根本没有太多保护。 I have unecrypted these files in the past for site owners who owned their code but whose developer had chosen to encrypt them and not provide source copies. 过去,我为拥有其代码但其开发人员选择对其进行加密而不提供源副本的网站所有者解密了这些文件。

YOu can find methods to unecrypt them (and even utilities to do it) in the wild if this is your issue. 如果这是您的问题,您可以在野外找到对它们进行解密的方法(甚至可以使用实用程序对它们进行解密)。 My only caution would be be sure you have a right to the code - there was a time when many devs sold encrypted custom tags and widgets - encrypted to prevent them from propogating without license. 我唯一的警告是,请确保您有权使用该代码-曾经有一段时间,许多开发人员出售加密的自定义标签和小部件-对其进行加密以防止它们未经许可而传播。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM