PDA

View Full Version : Protection



NeoDreamer
June 13th, 2003, 03:01 PM
How do you keep people from caching a .swf into their temporary internet folder? Sites which do this, from the ones that I noticed, are www.2advanced.com and www.orisinal.com .

λ
June 13th, 2003, 03:21 PM
i think you can do this with JavaScript or PHP, or Flash... the basic method, i believe, is just to stick a load of random variables onto the end...like this:


getURL("www.mysite.com/preventcache.html?"+(math.floor(math.random()*9986))

eyezberg
June 13th, 2003, 04:20 PM
can also add nocache into you headers..
and check this out:
http://www.helpqlodhelp.com/blog/archives/000033.html#more

lostinbeta
June 13th, 2003, 05:26 PM
Keep in mind this method does make your viewers have to wait the full loading time everytime they view your site (since it won't be cached the browser has to download a new one each time), so if you are going to do this I recommend using it on a file that isn't not a large file size.

eyeinfinitude
June 14th, 2003, 12:20 AM
Also keep in mind that this will be a strain on your site's bandwidth as well. I hope you have unlimited bandwidth on your hosting plan. ;)

replode
June 14th, 2003, 12:22 AM
so if i have a 200kb site, and someone views my site 2 times in one day, it wont take up 400Kb?

eyeinfinitude
June 14th, 2003, 12:23 AM
well do the math, if the site isn't being cached then that means the viewer would have to download 200kb each time they view it.

So if they view it twice then yes that's 400kb.

replode
June 14th, 2003, 12:26 AM
i guess if you have bandwith to burn then i would protect the file. but isnt there a way that you can disable the "view source" option?

eyeinfinitude
June 14th, 2003, 12:29 AM
What's the point of disabling it? If the file is cached, it is downloaded into the temp folder.

There is no 100% way to protect the files, if there's a will, there's a way...

lostinbeta
June 14th, 2003, 12:41 AM
You can disable Right Click/View Source, but you can't disable View/Source on a browsers menu (File/Edit/View, etc)

And as EG said, if you cache it, it is saved, if you don't, they keep reloading the file which uses up bandwidth, and they can always get the direct URL to your file no matter what.

It's not worth the extra trouble. Not even 2A is protected, they just want to make it harder because they know a ton of people want their stuff.

NeoDreamer
June 14th, 2003, 02:20 AM
Originally posted by lostinbeta
Not even 2A is protected, they just want to make it harder because they know a ton of people want their stuff.

I checked my temporary internet folder and I couldn't find working SWF files from 2advanced or Orisinal. So that means they make people reload the files each time they visit their site?

eyeinfinitude
June 14th, 2003, 02:31 AM
Apparently so....

Sites like 2A have unlimited bandwidth so they don't care how many times their sites are being downloaded.

Clown Staples
June 14th, 2003, 02:38 AM
"working?" explain.
it is possible to use loadMovie in an all flash site to bring in swf's which only operate if they are within the main swf (using if's), but they will still cache

NeoDreamer
June 14th, 2003, 02:43 AM
Originally posted by clownstaples
"working?" explain.

The cached files work in a web browser, but don't work in a regular SWF player.

eyeinfinitude
June 14th, 2003, 02:45 AM
Supree, they do work, it's just that they only work if all the swf's are together, individually they might do nothing at all because one controls the other.

Clown Staples
June 14th, 2003, 02:48 AM
i got it working. the main swf (v3) just had to have its external files in the same folder with it, with the right names
(home.swf, audio.swf, and some jpgs)

edit: just saw previous post...

eyezberg
June 14th, 2003, 05:44 AM
You can easily disable that by checking if the _url property of the file has http:// in it (which means it's on the internet, so presumably on your site, lol) and if not, just fscommand exit or goto a frame with no content/ warning message.
There's a tool here: http://www.genable.com/aso/ supposed to hide your code even from ASV (ActionScriptViewer, for the non-hackers amongst us.. lol again).
It's all a question of how much trouble you want to take upon you to hide your precious code..

**edit***
and "they can always get the direct URL to your file no matter what" is not tru, you can always generate the url with php, so they won't know where the actual file is, and one more trick:
flash will load a file even if the extension is not swf, so you can put anything there, like txt, gro, edl, whatever really, flash doesn't care, it'll load it..and even no extension at all, so it gets harder to find the actual swfs in the cache...
**end edit**

**edit edit, lol**
i'm sticking this for a lil' while, just in case this is of interest to some others... just a lil' while tho'.. "
**end edit edit**

Meridian
June 14th, 2003, 05:03 PM
You can also try this.

http://www.flashkit.com/tutorials/Actionscripting/Basic/Easy_to_-Tiran_Da-674/index.php

lostinbeta
June 14th, 2003, 05:14 PM
Nice link Meridian.

Meridian
June 14th, 2003, 05:16 PM
Domo arigato Mr Lostinbeta-bato

eyeinfinitude
June 14th, 2003, 05:18 PM
Originally posted by Meridian
Domo arigato Mr Lostinbeta-bato

LMAO, oh man that just made my day. :P Thanks for the link Meridian. =)

Meridian
June 14th, 2003, 05:20 PM
I'm just trying to do my part around here hoping the more I help others the more they will be inclined to help me :)

eyezberg
June 14th, 2003, 05:52 PM
Good link, that's the first solution I had suggested above.
Only thing I'd add is: use this code at the very end of your dev cycle, coz you'll not be able to test the swf on your comp anymore afterwards .. ;)

lostinbeta
June 14th, 2003, 05:57 PM
Originally posted by Meridian
Domo arigato Mr Lostinbeta-bato


HAHAHAH.... that made my day too.



Eyez: Yeah, I didn't know you could something like this. It is quite interesting.

Meridian
June 14th, 2003, 06:35 PM
Yeah I just figured it would help to go step by step.

Glad that comment made everyones day. You guys have been making mine for the last 2 weeks with all the helps :)

jbradley
June 17th, 2003, 04:19 PM
It isn't going to help anything. The code to 'protect' the SWF is physically visible and editable. So, it's not going to help if someone uses ASV or any other tool that allows the editing of an SWF file.

good idea, but not secure.

mlk
June 17th, 2003, 05:41 PM
there a few flash code scramblers around but they are not 100% efficient. Another way is to load all your code from a different text file... but then again it could still be visible...

ahmed
June 17th, 2003, 05:56 PM
the current version of ASObfuscator does nothing really to the source code.. see my post here =)

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22518

l0stpr0fet
June 21st, 2003, 02:14 AM
why bother trying to do all that. if its on the web, people can acess your stuff. i wouldnt worry about it. if people wanna steal your stuff theyll find out a way how. plus im sure people wouldnt spend that much time just to steal one of your swf files

save yourself the time and dont bother. no one else does.

-l0st

SychoPsamIII
July 7th, 2003, 09:32 PM
I was at one point woride about the possability of otheres stealing my Action Scripts, etc... and posted the following:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=14052

Now near the bottom of the page Rev. Flash mentioned that you can change the file name sufix (.jpg, .gif, .png, .swf, Etc...) and this will not effect the playback of your files. I have done some testing of this. by attempting to convert a .swf file to a .mov file and because the file has a .swf architecture I wasun able to save the file from Quicktime Pro v.6.xx as any thing. This means that the Sub-architecture remains active in the files.

Hope that this information is also of some help to you. It was to me.

:skull:Sycho Psam III :skull:

adityagaddam
July 8th, 2003, 10:34 AM
dang guys... think before you name your posts! there could be children around here!

-Aditya
:trout:

REEFˇ
August 4th, 2003, 01:34 PM
Well, there is another way from keeping people from opening up your swf files that get stuck in the temp internet files thing...

When you're done with making the swf movie, obviously you're gonna publish it. So people publish it with the right click display menu disabled. But...that only stops people from zooming in/out and having control of the play/rewind/forward...

To make sure people can't import your swf file into the flash, go to file>publish settings>flash>check off 'protect from import'>add password>and this way only people who know the password can import it, and that only person is you>

And, even if they do find out the password, in which theres a 98% chance they wont, after importing, that whole movie will become frame by frame...no buttons no mc's no gfx, no actions...it'll turn into a flat movie, and not a website...get what i'm saying?

ahmed
August 4th, 2003, 03:49 PM
but then you can simply use a tool like swf decompiler and get all the library items + scripts without having to know the password :)

sintax321
August 30th, 2003, 03:46 AM
How would you protect and SWF fomr a decompiler. These apps that take ans SWF and rip out its source code? is ther eany way to do this?

Mannequin
February 20th, 2004, 11:26 PM
I know this was posted quite a while ago but I figured I would respond in case any of you are still interested. I posted a similar request a few weeks ago (http://www.kirupaforum.com/forums/showthread.php?s=&postid=428233) and have done extensive research into this.

"The No-Caching Issue"

First of all, it IS possible to prevent SWF files from loading into Internet Explorer's cache using a few techniques. You can test this by clearing your cache in IE and visiting my test page (http://www.mannequin3d.com/test.cfm). Even in IE's "hidden" cache directories you will not see my Flash movie. (I accomplished this using no-cache header techniques, server-side and client-side).

And it is also possible to prevent SWF files from loading into the Mozilla/Netscape cache, but this requires an adjustment (http://www.squid-cache.org/mail-archive/squid-users/200105/0894.html) at the server level, as Mozilla & Netscape will totally ignore (http://www.mozilla.org/projects/netlib/http/http-caching-faq.html) "no-cache" requests embedded into your pages. (And this is using client-side and server-side code).

But regardless of these techniques, caching issues are not the problem. The "problem" is that the .swf is going to be downloaded to the client machine whether you like it or not. And if someone wants to, he/she can access this file with a little bit of technical know-how. For example, one could go into the Mozilla source, comment out the "no-cache" line and recompile it. When he visits your site, Mozilla ignores your no-cache headers and caches the file anyway. Or a less experienced user could use "tcpdump" which prints out the headers of packets on a network. Here (http://s91156728.onlinehome.us/getflash.rb) is what this looks like on for my test Flash.

So, what can you do to protect your Flash? Aside from a few, basic steps, you can do nothing.

Here are a few ideas, though: Hide the location of the Flash file - serve it dynamically rather than printing the SWF directly in your page.

Implement the no-caching techniques even though they can be circumvented. (The average user won't know how to do this).

Embed code that crashes programs like ASV.

Load sensitive actionscript dynamically, either through remoting techniques or by using loadVars.
And that's about all you can do. If you have questions about the no-caching techniques feel free to contact me.

To answer the original poster's question, though - 2advanced is not preventing his file from going into the cache. In IE it goes into one of Temporary Internet File's "hidden" directories and is openly viewable in ASV or similar decompilers.

waztone
March 3rd, 2004, 11:55 AM
OK, i've got a new question....
I'm using the no-cache meta tags just like you mannequin.
And that works. My swf is nowhere to be found in my temp_files. But the files that my swf loads dynamically through a MovieClipLoader, will show up in my temp_files. How do I disable that ( it's for testing purposes ).

Thanx in advance.

Will

Mannequin
March 3rd, 2004, 01:58 PM
I'm experimenting with the same thing. I'm using loadMovie() to pull up an SWF, and instead of loading an SWF I'm loading a CFM page with no-cache headers. It loads the SWF okay but it still goes into my cache. I think I've reached the conclusion that there's nothing you can do about this.

kunf
May 22nd, 2004, 10:24 PM
there is a way to make it so the flash file will only play if you access it from a certain url, ill see if i can find it for you

Mannequin
May 23rd, 2004, 12:49 AM
there is a way to make it so the flash file will only play if you access it from a certain url, ill see if i can find it for you
Yes. I have a script that does this and it works well. Thanks.