久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

將游戲分數從客戶端更新到服務器數據庫的最安

Safest way to update game score from client to server database? Javascript(將游戲分數從客戶端更新到服務器數據庫的最安全方法?Javascript)
本文介紹了將游戲分數從客戶端更新到服務器數據庫的最安全方法?Javascript的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

所以我有這個完全在客戶端上運行的游戲.除了下載初始腳本來玩游戲之外,沒有任何服務器交互.無論如何,在游戲結束時,我希望客戶端將分數發回給我,這些分數應該在服務器數據庫中更新.現在我已經開始接受這樣一個事實,即在地球上我無法向黑客隱藏這一點并原封不動地發送分數.但我想知道我可以修改整個過程到什么級別,這對于黑客操縱正在發送的數據來說實際上變得非常不可行.當然,我不希望從客戶端機器以純文本形式發送分數,也不希望我的服務器執行復雜的解密算法.因此,實現相當大的安全性的最佳方法是什么,每個湯姆迪克和哈利都不會破壞分數......我希望有人可以提供一個不錯的小方法,我可以繼續工作...... :) 謝謝

So I have this game that is completely run on the client. No server interaction what so ever apart from downloading the initial scripts to play the game. Anyway at the end of the game I would like for the client to send me back the scores which should be updated in the server database. Now I have come to accept the fact that there is no way on earth I can hide this from a hacker and send the scores unaltered. But I would like to know till what level can I modify the whole process that it virtually becomes pretty infeasible for the hacker manipulate the data which is being sent. For sure I would not like the score to be sent as plain text from client machine and I don't want my server to perform complex decryption algorithm. What is the best way hence to achieve considerable amount of security that every tom dick and harry doesn't hack the scores... I hope someone could provide a nice little way that I could work on... :) Thanks

所以我的理想結果應該是 ->由不受信任的一方(玩家)進行的(得分)計算得出可信的結果!

So my ideal result should be -> have trusted result from a calculation (of score) made by an untrusted party (the player)!

-編輯-

有人告訴我有關將數據隱藏在圖片獲取請求中的信息.就像,我正在畫布(html5)上實現這個游戲.所以他在游戲結束時讓我從我的服務器獲取游戲結束圖像,他們請求應該包含散列分數.我沒有完全理解完整的過程,但如果你能解釋一下,我會很高興!:)

Someone told me something about hiding the data in a picture get request. Like, I am implementing this game on canvas (html5). So he asked me at the end of the game to fetch a game over image from my server, and they request should contain the hashed score. I did not exactly understand the complete process but if you could explain it, would be really glad! :)

coda^ 這樣你就可以很好地屏蔽請求

coda^ so you can mask the requests nicely

shouvik 我該怎么做!?

shouvik how do I do it!?

尾聲^ 您可以編寫您要提交的校驗和.像 12312312a12313a232 是你的 md5,其中包含分數.將資產引入到畫布中,例如

coda^ you can compose the checksum you want to submit. like 12312312a12313a232 is your md5 which contains the score. bring in an asset into the canvas like

尾聲^ server.com/images/md5_hash_of_score/congratulations.png

coda^ server.com/images/md5_hash_of_score/congratulations.png

coda^ 可以通過 htaccess 重寫服務器端

coda^ which you can rewrite server side via htaccess

推薦答案

現在我已經開始接受這樣一個事實,即我根本無法向黑客隱瞞這一點,也無法原封不動地發送分數."

"Now I have come to accept the fact that there is no way on earth I can hide this from a hacker and send the scores unaltered."

<罷工>哦,是的,有!

Oh yes, there is!

您可以使用 RSA 或任何其他公鑰加密方法(也稱為非對稱加密).

You can use RSA or any other public key encryption method (also called assymetric cryptography).

為服務器創建一組(公鑰和私鑰)密鑰.讓您的客戶端代碼包含您的服務器的公鑰.

Create a set of (public and private) keys for the server. Have your client code include your server's public key.

在游戲結束時,客戶端代碼加密分數(使用此密鑰)并將兩者(普通分數和加密分數)發送到服務器.

At the end of the game, the client code, encrypts the score (with this key) and sends both (plain score and encrypted score) to server.

服務器解密并檢查普通分數和解密分數是否相同.如果是,接受分數.如果不是,則拒絕(中間有黑客或網絡錯誤).

Server decrypts and checks if plain score and decrypted one are same. If yes, accept score. If not, reject (there's a hacker or network error in the middle).

-------更新------------更正-------------

-------UPDATE-----------CORRECTION--------------

正如 Ambrosia 所指出的,我的方法在這種攻擊下完全失敗了.

As Ambrosia, pointed out, my approach fails completely with this kind of attack.

您真正想要的是從不受信任的一方(玩家)進行的(得分)計算中獲得可信的結果.沒有簡單的方法來實現這一點.

What you actually want is to have a trusted result from a calculation (of score) made by an untrusted party (the player). No easy way to achieve this.

請參閱:http://coltrane.wiwi.hu-berlin.de/~fis/texts/2003-profit-untrust.pdf

還有這個:http://www.cse.psu.edu/~snarayan/publications/securecomputation.pdf

還有這個(需要訂閱 ACM 數字圖書館):http://portal.acm.org/citation.cfm?id=643477.643479

And this (which needs a subscription to the ACM digital library): http://portal.acm.org/citation.cfm?id=643477.643479

這篇關于將游戲分數從客戶端更新到服務器數據庫的最安全方法?Javascript的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Using discord.js to detect image and respond(使用 discord.js 檢測圖像并響應)
Check if user ID exists in Discord server(檢查 Discord 服務器中是否存在用戶 ID)
Guild Member Add does not work (discordjs)(公會成員添加不起作用(discordjs))
Creating my first bot using REPLIT but always error Discord.JS(使用 REPLIT 創建我的第一個機器人,但總是錯誤 Discord.JS)
How do I code event/command handlers for my Discord.js bot?(如何為我的 Discord.js 機器人編寫事件/命令處理程序?)
How to find a User ID from a Username in Discord.js?(如何從 Discord.js 中的用戶名中查找用戶 ID?)
主站蜘蛛池模板: 国产精品美女久久久 | 久久99一区二区 | 久久成人精品 | 日韩电影中文字幕在线观看 | 国产成人综合av | 国产亚洲精品久久午夜玫瑰园 | 91精品国产日韩91久久久久久 | 色播久久久 | 在线一区| 久久久久久天堂 | 成人免费视频观看视频 | 亚洲精品乱码久久久久久蜜桃91 | 91婷婷韩国欧美一区二区 | 亚洲精品在线91 | 偷派自拍 | 粉嫩一区二区三区国产精品 | 色婷婷精品国产一区二区三区 | 自拍偷拍一区二区三区 | 欧美午夜精品久久久久久浪潮 | 日韩a| 欧美视频区 | 日韩字幕一区 | 一级久久久久久 | 黄色日批视频 | 色综合一区二区 | 日韩在线一区二区 | 久久99视频这里只有精品 | 日韩毛片在线免费观看 | 高清一区二区 | 色999视频 | 日本久久精品视频 | 国产激情偷乱视频一区二区三区 | 久久久久国产一区二区三区 | 日日骚av| 日韩av一区二区在线观看 | 国产va| 国产综合久久 | 成人在线中文字幕 | 国产一区二区在线免费观看 | 免费一区二区三区 | 成人精品在线观看 |