如何在没有调试C#的情况下识别代码已经更改? [英] How Can I Recognise That Someone Has Changed In Code Without Debugging In C#?

查看:78
本文介绍了如何在没有调试C#的情况下识别代码已经更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我,如果没有调试,我怎么能识别出我的代码中有人发生了变化?如果假设我通过网络服务访问的代码



plz帮助我

解决方案

如果你的意思是你想要确保你的代码在编写时没有改变,你可能必须使用像SHA这样的东西为二进制文件创建一个哈希值,并将它与你最初创建EXE时生成的值进行比较。 />


(很久以前我们曾经做过这个标准来检测使用CRC-16的基于EPROM的程序中的故障,但是SHA [或者甚至是这个应用程序的MD5]是一个更准确)


你的问题有无解决方案,这是不可能的。



无法判断代码是否已经过调试。



您只能根据代码中发现的错误进行猜测。

- 你可以编写完美的代码strait,然后调试或不改变任何东西。

- Bug可以在一个例外情况下没有被调试覆盖。



调试并不意味着没有bug,也没有bug也没有暗示调试。



即使是Ethan Hunt也没有任何帮助。 :)

Hi, can anyone please tell me that how can i recognise that someone has changed in my code without debugging? if suppose that code i am accessing through webservice

plz help me

解决方案

If you mean that you want to make sure that your code is unchanged from when you wrote it, you probably will have to use something like SHA to create a hash value for the binary file and compare that to the value you generated when the EXE was originally created.

(We used to do this as standard a long time ago to detect failures in EPROM based programs using CRC-16, but SHA [or even MD5 for this application] is a lot more accurate)


There is no Solution to your question, it is impossible.

There is no way to tell if code was debugged or not.

You can only guess depending on bugs you find in the code.
- you can write perfect code strait, and then debug or not don't change anything.
- Bug can be in an exceptional case not covered by debug.

Debugging do not imply bug free, and bug free do nor imply debugging.

Even Ethan Hunt will be of no help. :)


这篇关于如何在没有调试C#的情况下识别代码已经更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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