Protect your work from ActionScript code theft with SWF Protector

« I’ve just found a site that won a top international online advertising award – and it’s been blatantly lifted from me!

Its a flash application that has the same vectors and almost certainly the same AS code. Is there anything I can do? I’m in the UK – they’re in Brazil. »

The guy who opened this thread looks quite desperate… now imagine this happening to your latest Flash game.

That’s why you must protect your code. You don’t want someone else stealing your work.

I am going to review DCOM Soft‘s SWF Protector.

SWF Protector

SWF Protector is an swf protector software working through actionscript encryption to secure your actionscript content. This means decompilers won’t be able to read your actionscript.

The most interesting SWF Protector features are:

* Inexpensive: only $59.95 for a Business License. You can earn twice in just one day with a single game.

* Simple and fast. You can encrypt your SWF with a couple of clicks.

* Cross-platform. Available for Windows, Mac and Linux.

* Mass protection. You can protect several SWFs at once.

This is the interface you’ll see when you are about to secure your flash content:

I am testing the software on the file created on Box2D Flash game creation tutorial – part 2 tutorial.

This is the original content of the custom_contact_listener.as file:

package {
	import Box2D.Dynamics.*;
	import Box2D.Collision.*;
	import Box2D.Collision.Shapes.*;
	import Box2D.Dynamics.Joints.*;
	import Box2D.Dynamics.Contacts.*;
	import Box2D.Common.*;
	import Box2D.Common.Math.*;
	class custom_contact_listener extends b2ContactListener {
		override public function BeginContact(contact:b2Contact):void {
			// getting the fixtures that collided
			var fixtureA:b2Fixture=contact.GetFixtureA();
			var fixtureB:b2Fixture=contact.GetFixtureB();
			// if the fixture is a sensor, mark the parent body to be removed
			if (fixtureB.IsSensor()) {
				fixtureB.GetBody().SetUserData("remove");
			}
			if (fixtureA.IsSensor()) {
				fixtureA.GetBody().SetUserData("remove");
			}
		}
	}
}

Now, I will use a Flash decompiler to extract the same file from an unprotected version of the swf… here it is:

//class custom_contact_listener
package 
{
    import Box2D.Dynamics.*;
    import Box2D.Dynamics.Contacts.*;
    
    internal class custom_contact_listener extends Box2D.Dynamics.b2ContactListener
    {
        public function custom_contact_listener()
        {
            super();
            return;
        }

        public override function BeginContact(arg1:Box2D.Dynamics.Contacts.b2Contact):void
        {
            var loc1:*=arg1.GetFixtureA();
            var loc2:*=arg1.GetFixtureB();
            if (loc2.IsSensor()) 
            {
                loc2.GetBody().SetUserData("remove");
            }
            if (loc1.IsSensor()) 
            {
                loc1.GetBody().SetUserData("remove");
            }
            return;
        }
    }
}

The code is amost more polished… and obviously it works.

Now let’s try to do the same on the obfuscated swf made by SWF Protector… that’s what I got (sorry for the italian screenshot: I’m currently running an italian version of Windows7)

The decompiler crashed… probably the amount of weird characters inserted by the flash obfuscator made it crash.

In the end, SWF Protector is simple to use and very fast. It has shown lightning-fast speeds of SWF files loading, processing and saving and uses four reliable protection algorithms.

You can download a trial version on the official site or win one of three business licenses I am giving away being the first to reply “I want one” when this post will be published on my Facebook Fanpage. This is a special giveaway for three of my Facebook fans. And won’t be the only one.

Get the most popular Phaser 3 book

Through 202 pages, 32 source code examples and an Android Studio project you will learn how to build cross platform HTML5 games and create a complete game along the way.

Get the book

215 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 1+2=3
// 100 rounds
// 10000000
// 2 Cars
// 2048
// A Blocky Christmas
// A Jumping Block
// A Life of Logic
// Angry Birds
// Angry Birds Space
// Artillery
// Astro-PANIC!
// Avoider
// Back to Square One
// Ball Game
// Ball vs Ball
// Ball: Revamped
// Balloon Invasion
// BallPusher
// Ballz
// Bar Balance
// Bejeweled
// Biggification
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// Boom Dots
// Bouncing Ball
// Bouncing Ball 2
// Bouncy Light
// BoxHead
// Breakout
// Bricks
// Bubble Chaos
// Bubbles 2
// Card Game
// Castle Ramble
// Chronotron
// Circle Chain
// Circle Path
// Circle Race
// Circular endless runner
// Cirplosion
// CLOCKS - The Game
// Color Hit
// Color Jump
// ColorFill
// Columns
// Concentration
// Crossy Road
// Crush the Castle
// Cube Jump
// CubesOut
// Dash N Blast
// Dashy Panda
// Deflection
// Diamond Digger Saga
// Don't touch the spikes
// Dots
// Down The Mountain
// Drag and Match
// Draw Game
// Drop Wizard
// DROP'd
// Dudeski
// Dungeon Raid
// Educational Game
// Elasticity
// Endless Runner
// Erase Box
// Eskiv
// Farm Heroes Saga
// Filler
// Flappy Bird
// Fling
// Flipping Legend
// Floaty Light
// Fuse Ballz
// GearTaker
// Gem Sweeper
// Globe
// Goat Rider
// Gold Miner
// Grindstone
// GuessNext
// Helicopter
// Hero Emblems
// Hero Slide
// Hexagonal Tiles
// HookPod
// Hop Hop Hop Underwater
// Horizontal Endless Runner
// Hundreds
// Hungry Hero
// Hurry it's Christmas
// InkTd
// Iromeku
// Jet Set Willy
// Jigsaw Game
// Knife Hit
// Knightfall
// Legends of Runeterra
// Lep's World
// Line Rider
// Lumines
// Magick
// MagOrMin
// Mass Attack
// Math Game
// Maze
// Meeblings
// Memdot
// Metro Siberia Underground
// Mike Dangers
// Mikey Hooks
// Nano War
// Nodes
// o:anquan
// One Button Game
// One Tap RPG
// Ononmin
// Pacco
// Perfect Square!
// Perfectionism
// Phyballs
// Pixel Purge
// PixelField
// Planet Revenge
// Plants Vs Zombies
// Platform
// Platform game
// Plus+Plus
// Pocket Snap
// Poker
// Pool
// Pop the Lock
// Pop to Save
// Poux
// Pudi
// Pumpkin Story
// Puppet Bird
// Pyramids of Ra
// qomp
// Quick Switch
// Racing
// Radical
// Rebuild Chile
// Renju
// Rise Above
// Risky Road
// Roguelike
// Roly Poly
// Run Around
// Rush Hour
// SameGame
// SamePhysics
// Save the Totem
// Security
// Serious Scramblers
// Shrink it
// Sling
// Slingy
// Snowflakes
// Sokoban
// Space Checkers
// Space is Key
// Spellfall
// Spinny Gun
// Splitter
// Spring Ninja
// Sproing
// Stabilize!
// Stack
// Stairs
// Stick Hero
// String Avoider
// Stringy
// Sudoku
// Super Mario Bros
// Surfingers
// Survival Horror
// Talesworth Adventure
// Tetris
// The Impossible Line
// The Moops - Combos of Joy
// The Next Arrow
// Threes
// Tic Tac Toe
// Timberman
// Tiny Wings
// Tipsy Tower
// Toony
// Totem Destroyer
// Tower Defense
// Trick Shot
// Tunnelball
// Turn
// Turnellio
// TwinSpin
// vvvvvv
// Warp Shift
// Way of an Idea
// Whack a Creep
// Wheel of Fortune
// Where's my Water
// Wish Upon a Star
// Word Game
// Wordle
// Worms
// Yanga
// Yeah Bunny
// Zhed
// zNumbers