1

Possible Duplicate:
Making a hack proof game in Javascript

I'm building a very simple web game

In this game when player clearing all missions the total score should be posted to server .

question is : ajax params could be modified easily .

How to check if datas modified ?

Community
  • 1
  • 1
kran
  • 259
  • 4
  • 14

1 Answers1

-1

There are several diferent solutions.

You can check you server script that processing your AJAX data, and then logged them. Another way is to use your browser console. The most of the new Web Browsers are having console, that allowing you to check all the data of your web page, even the data you send or receive from the server with AJAX Calls.

KodeFor.Me
  • 13,069
  • 27
  • 98
  • 166
  • He is asking how to check if the data being sent by the AJAX request has been modified or not, by a user. He doesn't want to see what is being sent by the AJAX request being the user. – Some Guy Sep 23 '11 at 08:05
  • Ok, That was wrong answer ! What can you do for ? create an md5 hash for your data, and then store it in a Cookie. On the other side (server) you can do the same with your data, and finaly check out the checksum. This, isn't 100% safe, but is better than nothing ! ;) – KodeFor.Me Sep 23 '11 at 08:10
  • Yes,it's not safe , users can also do the same thing(md5),I think there' no way to do such a thing except managing all actions by server and JS only handles the views. – kran Sep 23 '11 at 08:41
  • In general, you have to know, that any kind of information (images, sound, data) is displayed on the Client Side (Web Browser) belong to the client. That means that, once you send that info to the client, the client can modify that information in any way he/she like ! – KodeFor.Me Sep 23 '11 at 08:46