00:00
00:00
Newgrounds Background Image Theme

ESCANOR2169 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

As: Specific Anti-theft Protection

8,585 Views | 41 Replies
New Topic Respond to this Topic

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.


BBS Signature

Response to As: Specific Anti-theft Protection 2005-11-22 11:57:47


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

Response to As: Specific Anti-theft Protection 2005-11-22 12:01:44


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

Response to As: Specific Anti-theft Protection 2005-11-22 12:03:13


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.


BBS Signature

Response to As: Specific Anti-theft Protection 2005-11-22 12:35:45


and still no variable declaration :X

Response to As: Specific Anti-theft Protection 2005-11-22 12:39:19


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.

Response to As: Specific Anti-theft Protection 2005-11-22 12:56:17


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

Response to As: Specific Anti-theft Protection 2005-11-22 13:03:12


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


Sup, bitches :)

BBS Signature

Response to As: Specific Anti-theft Protection 2005-11-22 13:24:37


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");
}
}


BBS Signature

Response to As: Specific Anti-theft Protection 2006-01-04 19:00:35


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

Response to As: Specific Anti-theft Protection 2006-01-04 19:03:13


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");
}


BBS Signature

Response to As: Specific Anti-theft Protection 2006-01-06 21:19:46


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

Response to As: Specific Anti-theft Protection 2006-03-06 12:28:10


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

Response to As: Specific Anti-theft Protection 2006-03-06 13:28:12


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.


BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 13:56:20


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. ;)

Response to As: Specific Anti-theft Protection 2006-03-06 13:56:50


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.


Hi there!

BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 14:21:10


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


WEBSITE

BLOG ~ Dont fuck around with my dog. All that I can see I steal. ~

NG FFR ~ Automatic for the people.

BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 14:24:06


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)


...

BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 14:27:52


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...


BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 14:29:16


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.


BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 14:35:17


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...


...

BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-06 14:36:26


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

Response to As: Specific Anti-theft Protection 2006-03-06 14:53:34


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.


BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-08 02:55:34


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?

Response to As: Specific Anti-theft Protection 2006-03-08 03:12:43


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...


BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-08 07:01:02


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


BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-08 07:55:36


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

Response to As: Specific Anti-theft Protection 2006-03-08 08:04:27


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...


...

BBS Signature

Response to As: Specific Anti-theft Protection 2006-03-08 12:53:44


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

Response to As: Specific Anti-theft Protection 2006-03-08 12:56:36


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


BBS Signature