Forum Topic: As: Specific Anti-theft Protection

(3,599 views • 40 replies)

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
None

authorblues

Reply To Post Reply & Quote

Posted at: 11/22/05 11:49 AM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

AS: MAIN. did bedn steal that too?

alright. in response to the anti-ebaum mass-hysteria, ive decided to write this modification of liljim's swf protection code. this is really an expansion to the original AS: SWF Copy Protection; a specific answer to a general question.

NOTE: please keep this thread on topic. if you would like to discuss how ebaum stole the internets, or some other off-topic banter, please refer to the parent thread. this is a place for tutorial-related talk only.

RAW CODE:

stop();
Stage.showMenu= false;
this_url = _root._url;
bad_urls = new Array("ebaum", "ebaumsworld", "rodim", "coolscifi", "dodirectory", "crazy-laberecke", "suprvibes", "simplyro", "40plusarcade", "adventurers-united", "uaenexus", "trackpads", "jl-planet", "rugbyrefs", "spamvault", "necrotania", "loafersparadise", "princejupiter", "johnstownchiefs", "nacros", "suprvibes", "footles", "f4g", "differentdawn", "brentfordalways", "wass-up", "movieloversparadise", "fruit-emu", "usuallygames", "1juegos", "julala", "topsites", "freegame365", "freegames365", "revier.co.uk", "bypassbrowser", "ianag", "freegames365", "in4.pl", "webgames", "gameportalonline", "juegosagogo", "freeonlinegames", "funflashgames", "roffles", "onlinegames", "minijuegos", ".games.gr", "millionsofgames", "juegosagogo", "funflashgames", "technorati", "kbcafe", "gametopia", "70.85.116.68", "briankass", "ianag", "limk", "indi.ru");
for (var i = 0; i<bad_urls.length; i++) {
if (this_url.indexOf(bad_urls[i])!=-1) {
gotoAndStop("bad");
}
}

__________________________________________
________

USAGE AND WHATNOT:

Stage.showMenu= false;
this_url = _root._url;

the stage right-click menu is disabled, preventing the use of playback controls such as next and play, which would render this code useless. the location in which the swf is hosted is then stored to the variable this_url.

bad_urls = new Array( [STRING DATA] );

this is a customized list (full list above) of sites that are suspected or accused of swf theft. this list is by no means all-inclusive or absolute. simply add more strings to block other sites, or remove strings that you wish to trust.

for (var i = 0; i<bad_urls.length; i++) {
if (this_url.indexOf(bad_urls[i])!=-1) {
gotoAndStop("bad");
}
}

this is the important part of the script. a loop begins, running through each value of the array and testing it against the this_url variable. if the string is not found in the variable, the indexOf() property returns a -1. if, however, the string is found in the variable, an index location, beginning with 0, is returned.

the actual actions taken when the string is identified is up to customization. the most common, and in this case, the shown way, is to send the playhead to a uniquely named frame ("bad"), where a stop(); command should be, rendering further playback of the swf impossible.

wii friend codes: [LISTED]

BBS Signature

None

namtlade

Reply To Post Reply & Quote

Posted at: 11/22/05 11:57 AM

namtlade EVIL LEVEL 10

Sign-Up: 03/21/05

Posts: 275

nice work, i'm putting that on all of my work. doubt anyone would want to steal my work, but for other people, this is very helpful. i applaud thee


None

Rantzien

Reply To Post Reply & Quote

Posted at: 11/22/05 12:01 PM

Rantzien FAB LEVEL 15

Sign-Up: 01/27/05

Posts: 3,422

Nice list, but if you only want a few places allowed you can have a good urls list instead.

Note that this is not directed to you, authorblues, I know you're not stupid =)

BBS Signature

None

authorblues

Reply To Post Reply & Quote

Posted at: 11/22/05 12:03 PM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 11/22/05 11:49 AM, authorblues wrote: this is a customized list (full list above) of sites that are suspected or accused of swf theft.

oops... i completely forgot to credit atomic_sponge on that wonderful list of sites. the only modification i made was that i removed "gamesreloaded", because someone defended them as a reputable host.

wii friend codes: [LISTED]

BBS Signature

None

dELtaluca

Reply To Post Reply & Quote

Posted at: 11/22/05 12:35 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

and still no variable declaration :X

My social worker says im special!

BBS Signature

None

Devenger

Reply To Post Reply & Quote

Posted at: 11/22/05 12:39 PM

Devenger NEUTRAL LEVEL 09

Sign-Up: 12/24/04

Posts: 1,104

Ah, come on. Most of us just can't be bothered with this whole "var variable:Number" stuff. It isn't essential half the time, even if it is good practice.

I'm back! on a temporary basis. No-one can remember who I am! but I don't really mind.


None

dELtaluca

Reply To Post Reply & Quote

Posted at: 11/22/05 12:56 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

At 11/22/05 12:39 PM, Devenger wrote: Ah, come on. Most of us just can't be bothered with this whole "var variable:Number" stuff. It isn't essential half the time, even if it is good practice.

the thing thats seems so strange to me, is that AS is the only language (AS1 and AS2 anyways, i cant remember bout AS3) that you DONT have to declare variables and there type (im not sure about javascript)

but im not bothered if people dont use strict data typing, its when they dont declare variables at all. One use straigtht away, local variables have a variable that is local to a function

var lol = 10; // var lol:Number = 10;l
function lolers()
{
var lol = 20; // var lol:Number = 20;
trace(lol);
}
lolers();
trace(lol);

and it outputs:
20
10

My social worker says im special!

BBS Signature

None

liaaaam

Reply To Post Reply & Quote

Posted at: 11/22/05 01:03 PM

liaaaam NEUTRAL LEVEL 21

Sign-Up: 12/11/04

Posts: 12,766

At 11/22/05 12:35 PM, -dELta- wrote: and still no variable declaration :X

I try and do it all the time, unless I'm just doing a quick test or something. It's habit now, I guess.

I was just looking around my PC to see if I had any good pics for my profile picture on Afro Ninja's site when I found this.

Creation Date: 13 August 2005, 16:31:47

I've hated eBaum since before time began (or since the eBaum flash was submitted, whatever). huzzah.

As: Specific Anti-theft Protection


None

authorblues

Reply To Post Reply & Quote

Posted at: 11/22/05 01:24 PM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 11/22/05 12:35 PM, -dELta- wrote: and still no variable declaration :X

well, it wasnt my fault. this was a quick modification of an existing script. i guess if you want to get technical, here is what it SHOULD look like:

stop();
Stage.showMenu= false;
var this_url:String = new String(_root._url);
var bad_urls:Array = new Array( [STRING DATA] );
for (var i:Number = 0; i<bad_urls.length; i++) {
if (this_url.indexOf(bad_urls[i])!=-1) {
gotoAndStop("bad");
}
}

wii friend codes: [LISTED]

BBS Signature

Questioning

lustforpain

Reply To Post Reply & Quote

Posted at: 1/4/06 07:00 PM

lustforpain EVIL LEVEL 18

Sign-Up: 09/22/05

Posts: 226

Have been using that code on my work, so thanks for that.
But how can you make the code work on only one site for example:
The same AS-script which is in this thread, but an added feature for a "good" link as for the only site where the flash would work in? would it be possible to do a code like that? I'm still a semiN00bIe in AS, so need a little help on it.

Internet is in danger |[]| Proof of the plans to destroy the internet.

BBS Signature

None

authorblues

Reply To Post Reply & Quote

Posted at: 1/4/06 07:03 PM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 1/4/06 07:00 PM, oceanius wrote: But how can you make the code work on only one site for example:

UNTESTED, but should work nonetheless...

stop();
Stage.showMenu= false;
this_url = _root._url;
good_url = new String("yourDomainName");
if (this_url.indexOf(good_url)==-1) {
gotoAndStop("bad");
}

wii friend codes: [LISTED]

BBS Signature

None

lustforpain

Reply To Post Reply & Quote

Posted at: 1/6/06 09:19 PM

lustforpain EVIL LEVEL 18

Sign-Up: 09/22/05

Posts: 226

At 1/4/06 07:03 PM, authorblues wrote:
At 1/4/06 07:00 PM, oceanius wrote: But how can you make the code work on only one site for example:
UNTESTED, but should work nonetheless...

stop();
Stage.showMenu= false;
this_url = _root._url;
good_url = new String("yourDomainName");
if (this_url.indexOf(good_url)==-1) {
gotoAndStop("bad");
}

Thanks for that. I have been "lurking" around some sites and it seems there is no actual way to protect one's flash movies or games from dudes like this f*ck*n ebaum and other damn ripper who rip peoples stuff and then even try to claim it. * pissed off-emoticon*

Thiis might go a bit outside of the topic, but is there any programs which could be used to encrypt the fla's before publishing them or something similar?

Internet is in danger |[]| Proof of the plans to destroy the internet.

BBS Signature

None

Flame-Reaper

Reply To Post Reply & Quote

Posted at: 3/6/06 12:28 PM

Flame-Reaper NEUTRAL LEVEL 11

Sign-Up: 11/16/04

Posts: 81

IJ have yet to test this but i trust the community members of NG in that it works as you say it does.

From now on this bad boy goes in all my important works its good to see that there is a way to crack down and at lest protet ourselves that little bit more against swf whores like ebaum and other ppl who cold heartedly steal other peoples work for their own profit giving no credit or royalties or other such compensation to the artists in question.

may these douchebags suffer painfully and hopefully karma can come back and smack them up something awfull like (insert slack jawed yokal accent in here)

thanks again


None

Toast

Reply To Post Reply & Quote

Posted at: 3/6/06 01:28 PM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,414

eBaums is the only one worth adding. Other sites don't even remove your logo, which gives you more views. I'm not sure if Eric can delete the code from the swf by decompiling it.

I put on my robe and wizard hat

Why don't you check out my check out my userpage?

BBS Signature

None

Blaze

Reply To Post Reply & Quote

Posted at: 3/6/06 01:56 PM

Blaze LIGHT LEVEL 22

Sign-Up: 08/04/05

Posts: 6,957

i have a sick idea.

Would it be possible to add THIS code on an MC? That way we could add the code onto an MC that has NOTHING inside, and makes its y axis say... 3000? Then NOBODY that decompiled it would be able to see it. ;)


None

jmtb02

Reply To Post Reply & Quote

Posted at: 3/6/06 01:56 PM

jmtb02 LIGHT LEVEL 29

Sign-Up: 03/01/04

Posts: 5,527

Nice job! Quick question: does this code work for bandwidth leechers such as foreign Russian sites by which I cannot contact the webmaster who is stealing 35 gb a month ;)? He is sucking the game straight from my website, but showing it on his... not actually hosting it on his own servers.

NOM NOM NOM NOM NOM

BBS Signature

None

Mogly

Reply To Post Reply & Quote

Posted at: 3/6/06 02:21 PM

Mogly LIGHT LEVEL 25

Sign-Up: 09/05/04

Posts: 10,304

isnt it possible to have good urls instead? it would be a bit simpliler(lol, is that a word?? mindlapzz) that way

~ MogTom ~ Dont fuck around with my dog. All that I can see I steal. ~
NG FFR ~ Automatic for the people.

BBS Signature

None

KaynSlamdyke

Reply To Post Reply & Quote

Posted at: 3/6/06 02:24 PM

KaynSlamdyke LIGHT LEVEL 15

Sign-Up: 06/25/04

Posts: 4,338

I feel partly responsible for this thread's revival.

The code here scans the URL of the SWF file - so hotlinkers will still steal by indirectly targetting your flash. The only defenses I can think of to combat this are moving your swfs arround on your server on a regular basis (which may annoy your userbase who favourite their location), or code some javascript into the HTML that calls the Flash to run (which won't be possible on Newgrounds, but will stop people directly hotlinking until they check your page source)

- Kayn Slamdyke (KSd) - Motorcycle Moderator [[892646]]
- Randomly destroying picture spam without warning since 2008


None

authorblues

Reply To Post Reply & Quote

Posted at: 3/6/06 02:27 PM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 3/6/06 01:56 PM, jmtb02 wrote: Nice job! Quick question: does this code work for bandwidth leechers such as foreign Russian sites by which I cannot contact the webmaster who is stealing 35 gb a month ;)? He is sucking the game straight from my website, but showing it on his... not actually hosting it on his own servers.

no, because _root._url is a reference to the location of the swf. you COULD however, as long as this is only for your website and not newgrounds, make a call to a javascript function on the same page to ensure that the swf is embedded only on the page of your choice. maybe something like:

getURL('javascript:valPage();', '_self');

and then on the page include:

<script language="JavaScript">
function valPage(){
window.location = 'asfunction:playTheDamnMovie';
}
</script>

and then back in the movie, make a function called playTheDamnMovie that runs the swf if and only if the function is called. the syntax may be wrong on the javascript, but for the most part, that should work...

wii friend codes: [LISTED]

BBS Signature

None

authorblues

Reply To Post Reply & Quote

Posted at: 3/6/06 02:29 PM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 3/6/06 02:21 PM, -Mogly- wrote: isnt it possible to have good urls instead? it would be a bit simpliler(lol, is that a word?? mindlapzz) that way

theres a code up there i posted that serves as a "whitelist". the idea you have is actually the most practical, and the safest. the only problem lies with hotlinking, as the _root._url reveals nothing about the embedding page, but tells where the file is uploaded.

wii friend codes: [LISTED]

BBS Signature

None

KaynSlamdyke

Reply To Post Reply & Quote

Posted at: 3/6/06 02:35 PM

KaynSlamdyke LIGHT LEVEL 15

Sign-Up: 06/25/04

Posts: 4,338

At 3/6/06 02:24 PM, KaynSlamdyke wrote:

:...The only defenses I can think of to combat this are... code some javascript into the HTML that calls the Flash to run (which won't be possible on Newgrounds, but will stop people directly hotlinking until they check your page source)

At 3/6/06 02:27 PM, authorblues wrote: You COULD however, as long as this is only for your website and not newgrounds, make a call to a javascript function on the same page to ensure that the swf is embedded only on the page of your choice. maybe...

Nice to know I'm on the same wavelength as blues... Shame I don't have the coding knowledge to back it up...

- Kayn Slamdyke (KSd) - Motorcycle Moderator [[892646]]
- Randomly destroying picture spam without warning since 2008


None

RyanPridgeon

Reply To Post Reply & Quote

Posted at: 3/6/06 02:36 PM

RyanPridgeon LIGHT LEVEL 11

Sign-Up: 12/07/05

Posts: 1,947

Most. Useful. Tut. In. Ages. You're really starting to outdo yourself, Mr. Blues

I make flashes because I can.
PM me for anything flash or web related or visit my blog here on NG!
Also, here's my DICK

BBS Signature

None

authorblues

Reply To Post Reply & Quote

Posted at: 3/6/06 02:53 PM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 3/6/06 02:35 PM, KaynSlamdyke wrote: Nice to know I'm on the same wavelength as blues... Shame I don't have the coding knowledge to back it up...

i didnt even realize you mentioned that. good call, since its the only thing i can think of either.

wii friend codes: [LISTED]

BBS Signature

None

RyanPridgeon

Reply To Post Reply & Quote

Posted at: 3/8/06 02:55 AM

RyanPridgeon LIGHT LEVEL 11

Sign-Up: 12/07/05

Posts: 1,947

I was wondering if it was ABSOLUTELY CERTAIN this would work on everyone's browser and so on, and has it been put into submitted flash before?

I make flashes because I can.
PM me for anything flash or web related or visit my blog here on NG!
Also, here's my DICK

BBS Signature

None

authorblues

Reply To Post Reply & Quote

Posted at: 3/8/06 03:12 AM

authorblues FAB LEVEL 12

Sign-Up: 06/21/05

Posts: 6,342

At 3/8/06 02:55 AM, ryanpridgeon wrote: I was wondering if it was ABSOLUTELY CERTAIN this would work on everyone's browser and so on, and has it been put into submitted flash before?

yes, this works. the only situation this fails with is hotlinking. otherwise, write a whitelist script, and its infalliable...

wii friend codes: [LISTED]

BBS Signature

None

Toast

Reply To Post Reply & Quote

Posted at: 3/8/06 07:01 AM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,414

At 3/6/06 01:56 PM, Darkfire_Blaze wrote: i have a sick idea.

Would it be possible to add THIS code on an MC? That way we could add the code onto an MC that has NOTHING inside, and makes its y axis say... 3000? Then NOBODY that decompiled it would be able to see it. ;)

Only 3000? I'd go for 10000.

It's a good idea, perhaps it would be even more funny to have all the MovieClips (for example monsters, hero, etc) go to a 'poop' frame when it's not the allowed site. You control a small peice of poo in an adventure to kill the other little shits. :P

I put on my robe and wizard hat

Why don't you check out my check out my userpage?

BBS Signature

None

TommyGun

Reply To Post Reply & Quote

Posted at: 3/8/06 07:55 AM

TommyGun EVIL LEVEL 30

Sign-Up: 10/14/05

Posts: 8,426

At 3/8/06 07:01 AM, -Toast- wrote:
At 3/6/06 01:56 PM, Darkfire_Blaze wrote: i have a sick idea.

Would it be possible to add THIS code on an MC? That way we could add the code onto an MC that has NOTHING inside, and makes its y axis say... 3000? Then NOBODY that decompiled it would be able to see it. ;)

What if they simply deleted the layer that it is on?

"It isn't that democrats are ignorant. Far from it. it's just that they know so much that just isn't so"
Ronald Reagan
Proud supporter of the Dinosaur Conspiracy Theory

BBS Signature

None

KaynSlamdyke

Reply To Post Reply & Quote

Posted at: 3/8/06 08:04 AM

KaynSlamdyke LIGHT LEVEL 15

Sign-Up: 06/25/04

Posts: 4,338

At 3/8/06 07:01 AM, -Toast- wrote: It's a good idea, perhaps it would be even more funny to have all the MovieClips (for example monsters, hero, etc) go to a 'poop' frame when it's not the allowed site. You control a small peice of poo in an adventure to kill the other little shits. :P

A better application would be to put it on a "This Flash Has Probably Been Stolen" Screen, where it petitions the user to email the webmaster and the creator of the Flash to inform them of this situation.

In response to the problem with deleting the frame the script is on, you could be exceptionally wicked and put the theft detection Flash half way through the animation and game itself - no thief is going to check to see if the entire thing runs all the way through, they'll simply check that it loads up. So putting the theft detector somewhere near the climax of the piece will possibly lead to a lot of angry emails heading towards the webmaster. After all, who'd want the Flash they're watching to Bluescreen right at the really cool part?

Naturally, they'll find this and decompile the code to remove the segment. By putting duplicates of this script throughout the movie (or even better for the motion tweeners, WITHIN tweens themselves) will heighten security to anally retentive stages. They'll bever get them all, and if they reverse engineer your code, you have moral highground when you take them to court (just make sure you mention that clause in your End User Agreement)

And make sure that it'll work before you upload it to NG, and that the slowdown from all that AS scripting doesn't mess with the quality of the piece. Security's nice, but there're just some measures that take the piss...

- Kayn Slamdyke (KSd) - Motorcycle Moderator [[892646]]
- Randomly destroying picture spam without warning since 2008


None

Claxor

Reply To Post Reply & Quote

Posted at: 3/8/06 12:53 PM

Claxor DARK LEVEL 10

Sign-Up: 10/21/05

Posts: 2,467

At 3/8/06 07:55 AM, SaiNT_SiLEiGHtY wrote: What if they simply deleted the layer that it is on?

What if it was on the same layer as a buch of other ital stuff?

BBS Signature

None

Toast

Reply To Post Reply & Quote

Posted at: 3/8/06 12:56 PM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,414

At 3/8/06 07:55 AM, SaiNT_SiLEiGHtY wrote: What if they simply deleted the layer that it is on?

Why would they if they don't know the object exists?

At 3/8/06 08:04 AM, KaynSlamdyke wrote: A better application would be to put it on a "This Flash Has Probably Been Stolen" Screen, where it petitions the user to email the webmaster and the creator of the Flash to inform them of this situation.

Lol, ever heard of sarcasm? :P

I put on my robe and wizard hat

Why don't you check out my check out my userpage?

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 12:02 PM

<< Back

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!