如何确保游戏发布到 WP7 的在线高分榜上?

发布于 2025-01-06 03:26:22 字数 363 浏览 0 评论 0原文

我刚刚开始第一次编写在线高分游戏,这是为我的 WP7 游戏编写的。我见过一些类似的线程,但是 WP7 缺乏特定的 c# 示例让我感到震惊:(

现在我正在使用 get 访问我的 PHP/Mysql 服务器,非常简单:

http://host.com/highscore/add.php?username=foo&score=12345&gamegamefoo

但是如果有任何黑客掌握了我的url,我认为这是一项相当简单的工作,你可以输入任何内容,

意识到我无法制作一个 100% 安全的高分列表,我想做第二甚至第三最好的事情。这比我已经在做的事情要困难一些,

有人知道我能做什么吗?

I've just started programming a online highscore for the first time, and it's for my WP7 game. I've seen some similar threads, but the lack of specific c# examples to the WP7 keeps me staggering :(

Right now I'm using get to my PHP/Mysql server, pretty straight forward:

http://host.com/highscore/add.php?username=foo&score=12345&gamegamefoo

But if any hackers got the hold of my url, and I think thats a fairly easy job, you could enter anything.

Realizing that I can't make a 100% secure highscorelist, I would like to do the 2nd or even 3rd best thing. I want to make it a bit more difficult then what I'm already doing.

Do anyone have anything specifics on what I could do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

往日情怀 2025-01-13 03:26:22

您需要研究基本身份验证。最简单的形式是,您只需要在服务器上创建一个用户,并使用一个密码,您的客户端将使用该密码进行身份验证。在执行其他操作之前,服务器将检查以确保客户端发送的凭据匹配。

您的服务器最好使用 https,以便客户端发送的用户名和密码不会以明文形式发送。

You'll want to look into basic authentication. In it's simplest form, you just need to create a user on your server with a password which your client will use to authenticate with. The server will check to make sure that that the credentials sent by the client match before doing anything else.

Preferably your server would be using https so that the username and password sent by your client isn't sent in clear text.

为你鎻心 2025-01-13 03:26:22

我不是安全专家,但您可以做的一件事是将用户名/高分组合放入某种单向哈希(例如 md5 或 SHA-1)中,并提供哈希作为另一个参数。然后在您的服务器上再次执行相同的操作并确保它们匹配。

显然,您的哈希密钥可以从您的游戏代码中破解,但比公共网址安全得多。

I'm no security expert but one thing you could do is put the username/highscore combo through some kind of one way hash, like md5 or SHA-1 and supply the hash as another parameter. Then on your server you do the same again and make sure they match.

Obviously your hash key is hackable from your game code, but a lot safer than a public url.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文