刚刚在我的一个客户的服务器上发现了这个奇怪的脚本。我不是 CFML 专业人士。有人可以告诉我是真正的 ColdFusion 脚本还是黑客外壳,如果是,它的作用是什么?名字是cf_fun.cfm
<cfset sf = CreateObject("java", "coldfusion.server.ServiceFactory")>
<cfset rxml="">
<cftry>
<cfscript>
rxml = XmlNew();
rxml.xmlRoot = XmlElemNew(rxml,"result");
rxml.result.XmlText = "0";
</cfscript>
<cfswitch expression="#Trim(exec_mode)#">
<cfcase value="encode">
<cfscript>
sres = sf.DataSourceService.encryptPassword(param);
rxml.result.XmlChildren[1] = XmlElemNew(rxml,"param");
rxml.result.param.XmlText = param;
rxml.result.XmlChildren[2] = XmlElemNew(rxml,"encoded");
rxml.result.encoded.XmlText = sres;
</cfscript>
</cfcase>
<cfcase value="test">
<cfscript>
sf.DataSourceService.verifyDatasource(param);
</cfscript>
</cfcase>
<cfcase value="commit">
<cfscript>
sf.DataSourceService.load();
</cfscript>
</cfcase>
<cfcase value="rollback">
<cfscript>
sf.DataSourceService.store();
</cfscript>
</cfcase>
<cfdefaultcase>
<cfthrow message="Invalid command specified" errorCode = "1" >
</cfdefaultcase>
</cfswitch>
<cfcatch>
<cfscript>
rxml = XmlNew();
rxml.xmlRoot = XmlElemNew(rxml,"result");
rxml.result.XmlText = "-1";
rxml.result.XmlChildren[1] = XmlElemNew(rxml,"description");
rxml.result.description.XmlText = cfcatch.message;
</cfscript>
</cfcatch>
</cftry>
<cfoutput>#rxml#</cfoutput>