确定 Flash/AIR 游戏中的计算机 ID
我正在创建一个在线多人游戏,我想阻止玩家在一台计算机上使用多个客户端/帐户加入游戏。我不能简单地在服务器端检查 IP 地址,因为我仍然希望同一办公室的人们能够一起玩。
因此,我想在客户端上生成某种计算机 ID/哈希值,并将其发送到服务器。我知道这很容易被破解,但它至少会阻止那些不能或不会更改其客户端软件的“骗子”。
有没有办法在我的游戏客户端中生成这样的 ID/哈希值?它是用 Flash 和 AIR 制作的(有两个版本,浏览器版本和桌面版本)。 该值不需要是全局唯一的,因为我将检查 IP-address + ID
I'm creating an online multiplayer game in which I want to prevent players from joining a game using multiple clients/accounts on one computer. I can't simply do a server sided check for the IP-address because I still want e.g. people in the same office to be able to play together.
Therefore I'd like to generate some kind of computer ID/hash on the client which it sends along to the server. I know that is easily hackable, but it will stop at least those "cheaters" who can't or won't change their client software.
Is there a way to generate such an ID/hash in my game client? It's made in Flash and AIR (there are two versions, browser and desktop).
The value doesn't need to be globally unique, because I will check for IP-address + ID
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用网卡的 MAC 地址。 AIR 有权获取所有可用网络接口的列表: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetworkInfo.html
您应该能够使用该向量中返回的任何值,因为 MAC地址是 独特的。
You could use the MAC address of the network card. AIR has access to get a list of all of the networking interfaces available: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetworkInfo.html
You should be able to use any value returned in that vector, since MAC addresses are unique.
除了 MAC 地址之外,您的程序还可以生成一个或多个随机数,并将它们存储在加密本地存储中(如果尚未存储)。这也可以识别用户(存在一定的冲突机会,但这种机会可以非常低。)
Along with MAC address, your program could generate one or more random numbers and store them in Encrypted Local Storage (if not stored already.) This could identify users too (with some chance of collisions, but this chance can be made very low.)