从 Flash 为计算机创建 UUID
我正在制作一个 Flash 程序,以便在收到付款后可以在一台计算机上下载和解锁。为此,我希望为计算机创建一个 UUID,可以检查该 UUID 以确保该程序没有被移动到另一台计算机,但我不知道有什么方法可以访问有关该计算机的足够信息来实现它唯一可识别(甚至接近)。
我还考虑过用不同的语言编写一个单独的程序来访问这些信息,但我不知道我是否可以从 Flash 运行它。
对于原始问题的任何想法或替代解决方案将不胜感激。
I'm making a Flash program to be downloadable and unlockable on one computer on receipt of payment. To do this, I was looking to create a UUID for a computer which could be checked to make sure that the program has not been moved to another computer but I don't know of any way to access enough information about the computer to make it uniquely identifiable (or even close).
I have also considered having a separate program written in a different language which would have access to this information but I don't know if I can even run it from Flash.
Any ideas or alternative solutions to the original problem would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个小型外部 EXE(在 AIR 中),它将运行本机命令并检索有关个人计算机的特定信息。请参阅我的答案以获取源代码:
我如何在按下按钮时在命令提示符中执行命令并获取 ActionScript 中的输出?
例如,在 Windows 上,你可以用 C++ 编写一个 exe(使用 eclipse 和 mingw 而不是 microsoft C++,除非你想用你的 exe 重新分发 .net)。只需使用系统命令:
输出如下:
根据微软的说法,此命令返回本地计算机唯一的 S/N。如果这不令人满意,您可以随时获取其中一台计算机的分区序列号,您只需通过谷歌搜索即可。
无论如何,无论您使用什么,只需这样做,以便当用户第一次注册时,它会获取此信息,使用 AS3CoreLib 加密包将其处理为摘要(可能使用 SHA256 类转换为哈希),然后将该数据发送到服务器及其注册信息。每当他们启动应用程序时,只需让应用程序连接到服务器并重新运行此命令,将新的哈希值(启动时)与服务器上保存的哈希值进行比较,如果它们不匹配,您就知道他们已经移动了它到另一台计算机上或将其送给盗版。
来源:
http://support.microsoft.com/kb/558124
http://www.cplusplus.com/reference/clibrary/cstdlib/system/
https://github.com/mikechambers/as3corelib/tree/master/src/com/adobe/crypto
You can make a small external EXE (In AIR) that will run a native command and retrieve specific info about the persons computer. See my answer here for source code:
How can i on button press execute a command in the command prompt and get back the output in ActionScript?
So for example, on windows you can write an exe in C++ (use eclipse and mingw not microsoft C++ unless you wanna have to redistribute .net with your exe). Just use the System command:
That outputs this:
According to microsoft this command returns a S/N unique to the local machine. If that's not satisfactory, you can always get one of the computers partition serial number, you'll just have to google around for that.
Anyway regardless of what you use, just make it so that when the user first registers it takes this info, processes it into a digest using a the AS3CoreLib crypto package (maybe use the SHA256 class to convert to hash) and then send that data to the server along with their registration info. Whenever they launch the app just get the app to connect to the server and re-run this command, comparing the new hash (at launch) against the saved one on the server and if they don't match you know they've moved it onto another computer or given it away to be pirated.
Sources:
http://support.microsoft.com/kb/558124
http://www.cplusplus.com/reference/clibrary/cstdlib/system/
https://github.com/mikechambers/as3corelib/tree/master/src/com/adobe/crypto