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

首頁 > 學(xué)院 > 開發(fā)設(shè)計 > 正文

C#程序集系列07,篡改程序集

2019-11-17 01:45:14
字體:
供稿:網(wǎng)友

C#程序集系列07,篡改程序集

以下幾個方面用來區(qū)分不同的程序集:○ 程序集名稱:Name○ 程序集版本:Version○ 程序集公匙: Public Token○ 程序集文化:Culture

如果沒有很嚴(yán)格地按照上面的幾個方面來創(chuàng)建程序集,程序集是很容易被篡改的。本篇體驗篡改程序集。

→清空F盤as文件夾下的所有文件→在as文件夾下創(chuàng)建Dog.cs類,用記事本打開,編寫如下,保存

using System;
public class Dog
{
    public static void MakeSound()
    {
        Console.WriteLine("汪汪汪");
    }
}
→把Dog.cs編譯成程序集38

→反編譯Dog.dll程序集,查看IL代碼39

// Metadata version: v4.0.30319
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z/V.4..
  .ver 4:0:0:0
}
.assembly Dog
{
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
                                                                                                             63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       // ceptionThrows.
  .hash algorithm 0x00008004
  .ver 0:0:0:0
}
.module Dog.dll
// MVID: {A8BAEEAB-2DF4-425C-B851-87260378D735}
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003       // WINDOWS_CUI
.corflags 0x00000001    //  ILONLY
// Image base: 0x00400000
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit Dog
<PRe style="font-size: 11px; font-family:
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 安宁市| 嘉善县| 大悟县| 平遥县| 柏乡县| 台北县| 建宁县| 开江县| 彩票| 富平县| 菏泽市| 嵊泗县| 西乌珠穆沁旗| 建瓯市| 彭泽县| 梁山县| 南川市| 威海市| 离岛区| 大化| 牡丹江市| 西青区| 凤冈县| 大石桥市| 澄江县| 南宫市| 东丽区| 哈密市| 大名县| 昭苏县| 广平县| 遵义市| 凯里市| 高淳县| 宁陕县| 河曲县| 许昌市| 布拖县| 阜平县| 忻州市| 定西市|