IL Series 2: Make Best Uses Our Tools

zhaozj2021-02-16  49

IL series of articles 2:

Make Best Uses Our Tools

Workers must be good, and must first make a tool. I am talking about this section is to study IL tools.

The first article is posted, there is a friend on the Internet asking me "Can I see the IL code of the C # program?". It seems that some friends are not familiar with the compilation of IL and anti-compilation, so I personally think that writing an article about tools is still necessary. There are three main tools, the first is dumpbin, you can put out the exe, obj, dll, etc., our PE structure, about a PE structure, more time before the discussion of the PE structure, there are many information on the Internet. (If you are getting troublesome, you will wait when I will wait for it. J). The other two are ILASM and ILDASM. In the last article, we have already mentioned, which are IL's compiler and anti-compiler. DUMPBIN, ILASM's instructions have been more detailed. You can start the Visual Studio .NET command prompt, type "DUMPBIN /?", "ILASM /?" Or "ILDASM /?", Enter, you can see the command line of the three applications. More detailed MSDN information is as follows:

Dumpbin: ms-help: //ms.vscc/ms.msdnvs.2052/vccore/html/_core_dumpbin_reference.htm

ILASM: MS-Help: //ms.vscc/ms.msdnvs.2052/cptools/html/cpconmsilassemblerilasmexe.htm

ILDASM: MS-Help: //ms.vscc/ms.msdnvs.2052/cptools/html/cpconmsildisassemblerildasmexe.htm

(However, you have to install the MSDN integrated with Visual Studio.net to see.)

I don't want to say anything more, go see it. I will talk below is a high-level option that is not easy to be discovered - LDASM.

You entered "ILDASM /?" At the Visual Studio .NET command prompt to see what is, then in the "Ildasm / Adv /?", look at more things (ADV is the meaning of Advanced). We can't see the ADV option under the first input. We have seen more advanced options under the second input. These advanced options are beneficial for tool developers that are targeted by .NET platform.

The high-level parameters of the optional line of commands are as follows:

/ ADV starts ILDASM in advance, some advanced options will appear in the "View" menu after you start ILDASM. If you want to use the command line to perform anti-compilation, "/ ADV" must be written in front of other options, such as "/ Adv / ClassList", etc.

/ Stats Display the mirror file (you will understand the statistics of the file that you are refactored).

/ ClassList includes a list of classes defined in this module.

/ ALL includes / header, / bytes, / stats, / claslist, / tokens.

/ Metadata [= ] Show Metadata, including:

Mdheader Displays the information and size contained in Metadata HEADER.

HEX displays more than hexadecimal representation.

The CSV displays the size of the header in a comma-separated form. (I didn't understand L. here.)

UnRex displays an external object that cannot be analyzed.

Validate verifies the consistency of Metadata. (I will have a introduction to Metadata.) OK! Almost, just write here.

转载请注明原文地址:https://www.9cbs.com/read-27971.html

New Post(0)