国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

對《防止對 Visual Basic .NET 或 C# 代碼進行反相工程》的思考

2024-07-10 13:07:24
字體:
來源:轉載
供稿:網友

 凡是在使用vs.net的開發人員都在努力尋找一個方法:防止或者是阻止其他人對自己的代碼進行反相,其目的是為了防止別人了解自己的業務流程或者是一些重要的算法的實現流程。
         其中大家最為熟悉的就是vs.net上自帶的dotfuscator community edition工具了,這里就不再介紹這個工具了,有興趣的可以去http://thesource.ofallevil.com/china/msdn/library/langtool/vcsharp/misnetcodeobfuscation.mspx?mfr=true看看,最主要的就是采取了模糊處理和元素重命名的一種機制。但是這種方法遠遠沒有達到隱藏我們算法的目的。


 1public void undo() {
 2  if (this.numofmoves > 0) {
 3    this.numofmoves =
 4      this.numofmoves - 1;
 5    if (this._usermoves.length >= 2)
 6      this._usermoves =
 7           this._usermoves.substring(0, this._usermoves.length - 2);
 8      this.loadboard(
 9           this.movehistory[this.numofmoves -
10               this.numofmoves / 50 * 50]);
11      this.drawboard(this.gr);
12    }
13}
14
15
16public void c() {
17    if (this.p > 0) {
18        this.p = this.p - 1;
19        if (this.r.length >= 2)
20            this.r = this.r.substring(0, this.r.length - 2);
21        this.a(this.q[this.p - this.p / 50 * 50]);
22        this.a(this.e);
23    }
24}
25

      這兩種方法有什么區別?

 

      還有一種工具xenocode 2005 enterprise,這款工具倒是不錯,可惜的是把所有的函數名和名稱空間名都加密了,在使用的時候還得這么使用


 1class program
 2  {
 3    public static void main()
 4    {
 5      // 載入程序集,test.exe 為被混淆的程序集文件名。
 6      assembly asm = assembly.loadfrom(@"test.exe");
 7
 8      // 獲取xenocode插入的解密類型(包含其namespace),對應上面字符串前面的類名,每次混淆結果可能都不同。
 9      type type = asm.gettype("x293b01486f981425.x1110bdd110cdcea4");  
10
11      // 字符串參數和解密參數
12      object[] parameters = {"/udbac/ue2b7/ue9bb/uf0af/uf7b8/ufeb3/u05a8/u0c61", 0x555ddb55};
13      type[] paramtypes = new type[parameters.length];
14      for (int i = 0; i < parameters.length; i++)
15        paramtypes[i] = parameters[i].gettype();
16
17      // 調用解密方法
18      bindingflags flags = bindingflags.public | bindingflags.static;
19      methodinfo method = type.getmethod("_d574bb1a8f3e9cbc", flags, null, paramtypes, null);
20      object result = method.invoke(null, parameters);
21
22      // 顯示解密結果
23      console.writeline(result);
24
25      console.writeline("press enter key to exit");
26      console.readline();
27    }
28  }
29

 

      不知道這是在保護我們的程序集還是在折騰我們的開發人員?

 

      還有其他的軟件也都在極力的尋找保護我們程序集的方式,vs.net都出來這么長時間了,還沒有一個理想的工具出來,我很想知道保護我們程序集的路在何方?

 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 海城市| 固阳县| 南充市| 竹山县| 射阳县| 莱芜市| 滨州市| 石棉县| 澎湖县| 永康市| 双峰县| 嘉义市| 新宾| 巴里| 昆明市| 萨嘎县| 宜黄县| 保定市| 定结县| 右玉县| 凤翔县| 鄱阳县| 印江| 苍梧县| 页游| 广元市| 顺平县| 福清市| 从化市| 静宁县| 扎兰屯市| 宝兴县| 贵阳市| 凉城县| 曲周县| 南靖县| 牡丹江市| 阿勒泰市| 荔浦县| 都江堰市| 深州市|