Memory Data Encryption __ Games

Source: Internet
Author: User
Preface

For stand-alone games, or the client run game logic and the server does not verify the online games, need some counter cheating means.
Memory data encryption, game data rationality detection, server re-running verification is an effective solution.
This article describes memory data encryption. Body memory modifier principle:

The values modified by the modifier are resident in memory, that is, the address of the value in memory is unchanged.

We use an example to see the basic process of modifying the device.
For example, the game inside the coin is 100, the modifier first search 100, will get a value of 100 variable memory address.
When the gold coins change 200, then search 200.
Generally repeat 3 to 4 steps, the modifier will be able to locate the coin of the memory address of the variable.
Then there is the modification.

In addition to basic search, some powerful modifier also provides fuzzy search and anti-encryption search.

Fuzzy Search:
Some similar to the blood bar can not see the number of specific numbers, fuzzy search provides a search for "big", "small", "change", "no change" and other operations, for memory screening.
The step of fuzzy search is more than the direct search value, generally repeat 7 to 10 steps to find the corresponding memory address of the variable.

Anti-Encryption Search:
As the name suggests, when the value is encrypted and stored in memory, it is necessary to reverse encryption to find the memory address. Are generally simple XOR or encryption or value encryption formula. How to encrypt memory

Memory encryption is generally divided into reversible encryption and irreversible encryption reversible encryption:

The data displayed ~= the memory data.

Encrypt the data that resides in memory and decrypt it when it is displayed.
For example, simple XOR or encryption or y = NX + M.
Interested can search for some complex encryption algorithms. non-reversible encryption:

The data displayed is = = Memory data. Encrypt the stored variable and save it in the validation variable.

Before each variable is used, the variable is encrypted in contrast to the validation variable, so that the memory is modified.
For example, to calculate the MD5 value of a variable, and save it, the next time you take a value, first MD5 validation. In addition to encryption:

In addition to encryption, there are some very useful tips. Memory storage address for changing sensitive numeric values: The method of reading and writing variables is encapsulated into set and get two methods, and the variable storage address, changing encryption key, etc. are automatically switched when the set mode is invoked. Range judgment when sensitive values are taken. For example, store commodity prices can not be negative, the single innings of the number of combat rewards can not break the horizon.

If there is a mistake, please note.

Email:dxmdxm1992#gmail.com

blog:http://blog.csdn.net/david_dai_1108

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.