我還沒有找到一種工具來自動完成此操作,但我發現通過研究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")