There is absolutely no way to make sure your client is sending data. All you can try is to confuse some things to make it difficult for spammers to send data.
However, I think you can do two things:
- Is there some secret key stored in binary
- The user algorithm calculates some checksum
Maybe you can go with such a combination. Let me give you an example:
Create your own (complicated!) Alorithm (simple):
var result = ((score XOR score / 5) XOR score * 8) BITSHIFT_BY 3
Then use your static key with this result and a well-known hash function, for example:
var hash = SHA256(StaticKey + result)
Then send this hash with the score to the server. The server should βverifyβ the hash by following the same steps (evaluate the algorithm + doing SHA256 things) and compare the hashes. If they coincide with the rating, we hope that this is your application, otherwise throw it out of the spammer.
However, this is only one thing you can do. Check out the link with mfanto , there are many other ideas you can look at. Do not forget to tell anyone about how you do it, because it is security through the unknown .
source share