Menu

[r11]: / trunk / SWFInvestigator / src / utils / xssFuzzer / shim.html  Maximize  Restore  History

Download this file

38 lines (33 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<HTML>
<!-- &copy; 2009 Adobe Systems Incorporated. All rights reserved. -->
<HEAD>
<SCRIPT type="text/javascript">
//Create postMessage listener
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
var eventRef = window[eventMethod];
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
//Listen to message from child window
eventRef(messageEvent,function(e) {parent.postMessage("ping","*"); } );
if(typeof childSandboxBridge=='undefined') {
childSandboxBridge={};
}
function rewriteDiv(bI) {
viewerWrapper.innerHTML = '<iframe id="viewer" src="' + bI.remapDomain + '/viewerWrapper.html" width="100%" height="100%"></iframe>';
var htmlString = "<object id='viewer' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' height='300' width='500'>";
htmlString += "<param name='src' value='" + bI.src + "'/>";
htmlString += "<param name='allowScriptAccess' value='" + bI.allowScriptAccess + "'/>";
htmlString += "<param name='allowNetworking' value='" + bI.allowNetworking + "'/>";
htmlString += "<param name='wmode' value='opaque'/>";
htmlString += "<param name='FlashVars' value='" + bI.flashVars + "'/>";
htmlString += "<embed name='viewer' wmode='opaque' pluginspage='/go/getflashplayer' src='" + bI.src + "' height='80%' width='80%' allowScriptAccess='" + bI.allowScriptAccess + "' allowNetworking='" + bI.allowNetworking + "' FlashVars='" + bI.flashVars + "'/>";
htmlString += "</object>";
viewer.postMessage(htmlString,"*");
}
window.childSandboxBridge.rewriteDiv = rewriteDiv;
</SCRIPT>
</HEAD>
<BODY>
<div id="viewerWrapper">
</div>
</BODY>
</HTML>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.