A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Extracting binary resources from SWFs?

  1. #1
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    923

    Extracting binary resources from SWFs?

    Some time ago I had to protect an swf but, since I never did it before, I had no fancy obfuscation tools and stuff like that. So what

    I did was this:
    Code:
    package  
    {
    	import flash.display.Loader;
    	import flash.display.Sprite;
    	
    	public class BoxTest extends Sprite
    	{
    		[Embed(source="./box.swf", mimeType="application/octet-stream")]
    		private var _loc_1:Class;
    		
    		public function BoxTest() 
    		{
    			var loader:Loader = new Loader;
    			loader.loadBytes (new _loc_1);
    			addChild (loader);
    		}
    		
    	}
    	
    }
    This produces nice useless output in sоthink decompiler:
    Code:
    package 
    {
        import BoxTest.*;
        import flash.display.*;
    
        public class BoxTest extends Sprite
        {
            private var _loc_1:Class;
    
            public function BoxTest()
            {
    1  0 17            _loc_1 = BoxTest__loc_1;
                var _loc_1:* = new Loader();
                _loc_1.loadBytes(new _loc_1());
                addChild(_loc_1);
                return;
            }// end function
    
        }
    }
    
    package 
    {
        import mx.core.*;
    
        public class BoxTest__loc_1 extends ByteArrayAsset
        {
    
            public function BoxTest__loc_1()
            {
                return;
            }// end function
    
        }
    }
    and, of course, it produces useless FLA and can't export binary resources. So far looks good, and I'm quite happy with this trick. The question is, however, do any of you actually know some tool to extract binary resources easily?
    who is this? a word of friendly advice: FFS stop using AS2

  2. #2
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    923
    ha ha, no replies to that, and - guess what - it is actually GREAT XD oh and btw,
    Quote Originally Posted by realMakc View Post
    I had no fancy obfuscation tools and stuff like that.
    well now I do, thanks to some guy at wichers.nu (the preprocessor in question supports #define x y thing, figure out the rest from here).
    who is this? a word of friendly advice: FFS stop using AS2

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center