如何编写一个可以自行检测到它已被更改的程序? [英] How can I write a program that can detect by itself that it has been changed?

查看:43
本文介绍了如何编写一个可以自行检测到它已被更改的程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个可以检测到它已被更改的小程序.请给我一个建议!

I need to write a small program that can detect that it has been changed. Please give me a suggestion!

谢谢.

推荐答案

简短的回答是创建程序的散列或密钥,并让程序加密并将该密钥存储在其自身中.程序有时会对其自身进行校验和并将其与该哈希/密钥进行比较.如有差异,请相应处理.

The short answer is to create a hash or key of the program and have the program encrypt and store that key within itself. From time to time the program would make a checksum of itself and compare it against that hash/key. If there is a difference then handle it accordingly.

有很多方法可以解决这个问题.如果这是您想要避免的情况,那么有很多非常聪明的工程师知道如何解决它.

There are lots and lots of ways to go about this. There are lots of very smart engineers out there that know how to work around it if that is what you are trying to avoid.

这篇关于如何编写一个可以自行检测到它已被更改的程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆