如何用代码保护我的Flash/Flex SWF ?

时间:2021-07-04 07:26:22

I've written some fancy Flex app, which doesn't really require any server side integration.

我写了一些花哨的Flex应用,它不需要任何服务器端集成。

Now if someone took that SWF and put it in their server then it will very well run.

如果有人把这个SWF文件放到他们的服务器上,它会运行得很好。

What code can recognize that the SWF is not under my domain and stop from execution during startup? I don't mind making some server side calls just to do a check. But how can this be achieved?

什么代码可以识别SWF不在我的域中并且在启动时停止执行?我不介意做一些服务器端调用来检查。但如何实现这一点呢?

3 个解决方案

#1


5  

Check out loaderinfo.url, it can do this for you. Here's an example on how it can be used to determine where the SWF is being loaded from.

查看loaderinfo。url,它可以为你做这个。下面是一个示例,说明如何使用它来确定SWF是从哪里加载的。

So, you could detect where the swf is loading from, and if it's not from your server, block out the good stuff. :)

因此,您可以检测swf从何处加载,如果不是来自您的服务器,则将其屏蔽掉。:)

Good luck

祝你好运

#2


1  

Why don't you just watermark your app? But I think if someone steals your app, he would hack it too, to remove any protection.

你为什么不给你的应用打上水印呢?但我认为,如果有人偷了你的应用,他也会黑掉它,以消除任何保护。

#3


1  

As has been mentioned the bottom line is anything you can put in, the baddie can rip right out, so all that you can really do is make the amount of work necessary to do this an obstacle to anyone even trying. What has been suggested so far would at least deter the casual thief and maybe that's enough.

正如前面提到的,底线是你可以放入的任何东西,坏人可以直接撕下来,所以你真正能做的就是把做这件事所需要的工作量变成任何人都要做的障碍。到目前为止所提出的建议至少可以阻止这个偶然的小偷,也许这就足够了。

The way I found around it was to actually have quite a tight integration with server-side data, such that even if you removed all of that integration (which would most likely take you days ... it's a big app) you would still have no data at all with which to use it. This obviously depends quite a lot on what your app is doing in the first place, but if you make an architectural decision to move any data over to the server side that will increase your protection.

我在它周围发现的方法实际上是与服务器端数据紧密集成,这样即使您删除了所有的集成(这很可能会花费您几天的时间……)这是一个大应用)你仍然没有数据可以使用它。这显然在很大程度上取决于你的应用程序首先在做什么,但是如果你做出一个架构上的决定,将任何数据转移到服务器端,这将增加你的保护。

(This should really be a comment rather than an answer, but posting here due to length.)

(这应该是一个评论,而不是一个答案,但由于篇幅较长,在这里发表。)

#1


5  

Check out loaderinfo.url, it can do this for you. Here's an example on how it can be used to determine where the SWF is being loaded from.

查看loaderinfo。url,它可以为你做这个。下面是一个示例,说明如何使用它来确定SWF是从哪里加载的。

So, you could detect where the swf is loading from, and if it's not from your server, block out the good stuff. :)

因此,您可以检测swf从何处加载,如果不是来自您的服务器,则将其屏蔽掉。:)

Good luck

祝你好运

#2


1  

Why don't you just watermark your app? But I think if someone steals your app, he would hack it too, to remove any protection.

你为什么不给你的应用打上水印呢?但我认为,如果有人偷了你的应用,他也会黑掉它,以消除任何保护。

#3


1  

As has been mentioned the bottom line is anything you can put in, the baddie can rip right out, so all that you can really do is make the amount of work necessary to do this an obstacle to anyone even trying. What has been suggested so far would at least deter the casual thief and maybe that's enough.

正如前面提到的,底线是你可以放入的任何东西,坏人可以直接撕下来,所以你真正能做的就是把做这件事所需要的工作量变成任何人都要做的障碍。到目前为止所提出的建议至少可以阻止这个偶然的小偷,也许这就足够了。

The way I found around it was to actually have quite a tight integration with server-side data, such that even if you removed all of that integration (which would most likely take you days ... it's a big app) you would still have no data at all with which to use it. This obviously depends quite a lot on what your app is doing in the first place, but if you make an architectural decision to move any data over to the server side that will increase your protection.

我在它周围发现的方法实际上是与服务器端数据紧密集成,这样即使您删除了所有的集成(这很可能会花费您几天的时间……)这是一个大应用)你仍然没有数据可以使用它。这显然在很大程度上取决于你的应用程序首先在做什么,但是如果你做出一个架构上的决定,将任何数据转移到服务器端,这将增加你的保护。

(This should really be a comment rather than an answer, but posting here due to length.)

(这应该是一个评论,而不是一个答案,但由于篇幅较长,在这里发表。)