我还没有找到一种工具来自动完成此操作,但我发现通过研究SWF的反汇编版本可以很容易地找到这些信息,可以使用Adobe的SWF Investigator tool。
为此,请将指定RSL依赖项的SWF加载到SWF调查器中,然后查看“SWF反汇编程序”选项卡上的反汇编代码(最简单的方法是使用“打开文本视图...”来打开外部编辑器。按钮)。
依赖性在SWF的info()
函数的定义中指定的RSL,块像这样的东西开始:
function info():Object /* disp_id=0 method_id=57 nameIndex = 75 */
跨域RSL依赖性在cdRsls
物业上市,而其他人在rsls
属性。这些列表由多个RSLData
对象组成,并且很容易看到将RSLData构造函数的参数压入堆栈。例如,下面的部分将两个可能的网址检索灵活4.6“框架”库:
13 findpropstrict mx.core::RSLData //nameIndex = 6
15 pushstring "http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/framework_4.6.0.23201.swz"
18 pushstring "http://fpdownload.adobe.com/pub/swz/crossdomain.xml"
21 pushstring "abd49354324081cebb8f60184cf5fee81f0f9298e64dbec968c96d68fe16c437"
24 pushstring "SHA-256"
27 pushtrue
28 pushtrue
29 pushstring "default"
31 constructprop mx.core::RSLData (7) //nameIndex = 6
34 findpropstrict mx.core::RSLData //nameIndex = 6
36 pushstring "framework_4.6.0.23201.swz"
39 pushstring ""
41 pushstring "abd49354324081cebb8f60184cf5fee81f0f9298e64dbec968c96d68fe16c437"
44 pushstring "SHA-256"
47 pushtrue
48 pushtrue
49 pushstring "default"
51 constructprop mx.core::RSLData (7) //nameIndex = 6
54 newarray [2]
的newarray [2]
线在底部似乎表明这些表示对于相同的文件中的两个可能的位置(即,一回退URL)。如果提供了单个URL,则会创建一个RSLData对象,并且会有一行newarray [1]
行。
此代码对应于以下定义从使用Flex SDK捆绑标准的Flex-config.xml文件:
<!-- Framework SWC -->
<runtime-shared-library-path>
<path-element>libs/framework.swc</path-element>
<rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.6.0.23201/framework_4.6.0.23201.swz</rsl-url>
<policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
<rsl-url>framework_4.6.0.23201.swz</rsl-url>
<policy-file-url></policy-file-url>
</runtime-shared-library-path>
最后,仅供参考,这里的构造函数RSLData类的签名,查看这些值对应的参数:
public function RSLData(rslURL:String = null,
policyFileURL:String = null,
digest:String = null,
hashType:String = null,
isSigned:Boolean = false,
verifyDigest:Boolean = false,
applicationDomainTarget:String = "default")