简体   繁体   English

如何保护Flash和PHP之间的数据传输?

[英]How to protect data transfer between flash and php?

I want to make a website with flash games which I make with highscores, and I am using this code to post the scores to a php file: 我想和Flash游戏,我让与高分网站,而我使用此代码张贴分数到PHP文件:

submit.onPress = function () {
getURL ("highscore.php", "_blank", "POST"); }

Basically there is a submit button and when you click it it opens a new tab which is actually a php file where it says like Your score is 12 . 基本上有一个提交按钮,当您单击它时,它会打开一个新选项卡,该选项卡实际上是一个php文件,其中说“ 您的分数是12” My problem is how to protect this from people cheating and maybe sending false highscores? 我的问题是如何避免人们作弊甚至发送虚假的高分? If anyone has any idea please tell me... 如果有人有任何想法请告诉我...

you need to encrypt the variable add subtract multiply etc the score and add false numbers that are the same as the real number. 您需要对变量进行加,减,乘,分等加密,然后添加与实数相同的错误数字。 Then when you need the score decrepit the file and frequently if you can update the game when the game has launched and change the decryption. 然后,当您需要比分时,请减少文件的数量,如果您可以在游戏启动时更新游戏并更改解密,请经常删除。

cheat engine and other flash cheat engines example: buy something or change their score any var that changes at the time the cheater changes the var, he will have a list of variables that changed that instance, so you need to prevent this by having multiple vars acting as the score or having a timer counting up or down, and even both make sure to have multiplication and division in the encrypted variable you need it! 作弊引擎和其他Flash作弊引擎示例:购买某项东西或更改分数,在作弊者更改var时更改的任何变量,他将具有更改该实例的变量列表,因此您需要通过使用多个变量来防止这种情况充当乐谱或让计时器递增或递减,甚至两者都确保在需要的加密变量中有乘法和除法!

我认为这篇文章已经回答了这个问题: Flash加密PHP解密但是,您可能还想添加一个Blowfish ,这使它变得更加困难,但绝非不可能

var Score = 0; var分数= 0; var addScore = 0; var addScore = 0;

//high score you earn 20 point example you need to put logic in this :) //高分,您将获得20分的例子,您需要在其中添加逻辑:)

addScore = 20 addScore = 20

//client Score = addScore * 3 + 23; //客户得分= addScore * 3 + 23;

//server //服务器

Score = addScore - 23 / 3; 分数= addScore-23/3;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM