确定在Flash / AIR游戏计算机ID [英] Determine a computer ID in Flash/AIR game
问题描述
我使用多台客户机一台计算机上/帐户加入游戏创建一个在线多人游戏中,我想prevent球员。我不能简单地做一个服务器片面检查的IP地址,因为我还是想如人在同一个办公室才能够一起玩。
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.
所以我想产生某种计算机ID /散列,它沿着发送到服务器的客户端上。我知道这是很容易破解的,但它会阻止至少是那些骗子谁不能或不会改变自己的客户端软件。
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.
有没有办法来产生这样的ID /散在我的游戏客户端?它是由在Flash和AIR(有两个版本,浏览器和桌面)。
该值并不需要是全球唯一的,因为我会检查 IP地址+ ID
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
推荐答案
您可以使用网卡的MAC地址。 AIR访问获得所有可用的网络接口的列表:的http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetworkInfo.html
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
NetworkInfo.networkInfo.findInterfaces()
您应该能够使用该矢量返回的任何值,由于MAC地址是唯一的。
You should be able to use any value returned in that vector, since MAC addresses are unique.
这篇关于确定在Flash / AIR游戏计算机ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!