Break the excellent. NET Document design Tool Vsdocman 7.1

Source: Internet
Author: User
Tags modulus net xml reflector

Vsdocman is an excellent. NET Source code annotation authoring tool that makes it easy to design comments for. NET source code in a GUI manner.

We know. NET source code is a comment in XML format that, when generating an assembly, simply generates an XML comment with a check, and Visual Studio generates an XML comment file based on the source code. Copy the assembly and the corresponding XML file to another computer, and when you edit the reference type in Visual Studio, the Visual Studio Smart hint extracts the contents of the XML comment for easy programming.

The power of the. NET XML annotations is not so much, let's take a look at what features Vsdocman offers that I'm happy with:

1 Add, edit, and generate comments in the source code.

2 Help write annotations with the WYSIWYG comment editor, which is what you see.

3 Easily insert tables, lists, pictures, joins, and class diagram data items directly into the source code.

4 Generate professional documentation that supports multiple formats and multiple country language outputs. The output format is HTML, CHM, Docx, MS help Viewer (higher), HELP2 (Help for Vs 2002-2008), RTF, XML.

5 directly integrates with the VS Help system.

6 support for command line invocation.

The generated output file format is rich and supports command line invocation so I'm happy to write a Post build event command line call to generate the document.

After the program is installed, the Visual Studio toolbar will have a small number of buttons, and the source editor will add the following three menu items.

Add Xml Comment Add comment

Comment Editor Comments

Add Description Attribute Add a description, click this menu will add features to the current method. Like what:

[System.ComponentModel.Description ("Compile Code")]

For a simple example, feel the WYSIWYG annotation editor.

This allows you to omit the knowledge about XML introduced in MSDN and visually and simply write annotations in a graphical manner.

Let's take a look at how I cracked this software. Vsdocman compiled code is confusing, you can use. NET Reflector to decompile, see the About dialog box, and see the code snippet for the trial:

   1:  privatevoid about_load (object sender, EventArgs e)
   2:          {
   3:              try
   4:              {
   5:                  try
   6:                  {
   7:  this   "Version" + assembly.getexecutingassembly (). GetName (). Version.tostring ();
   8:                  }
   9:                  catch (Exception exception1)
  Ten:                  {
One   :                      projectdata.setprojecterror (exception1);
  :                      projectdata.clearprojecterror ();
  :                  }
  :                  if (! Class138.smethod_0 ())
  :                  {
  :  this                    "trial";
  :                  }
  :  this                false;
  :  this                false;
  :  this                false;
  :  this                false;
A   :                  if (! Class138.smethod_0 ())
  :                  {
  :  This is EVALUATION VERSION with + days                    TRIAL PERIOD ";
  :  this                    true;
been   :  This "you have                    the Using Vsdocman for";
  :                      if (Class140.smethod_5 () > 1)
  :                      {
  :  This is                        "days.";
  :                      }
To   :                      Else
  :                      {
  :  This is                        "day.";
  :                      }
  :  this                    true;
  :                  }

The 16th line of code after adding a trial word, indicating that the 14-line method returns False, will enter the 16th number to increase the trial version of the word, we only need to class138.smethod_0 this method call return value to True.

And look at the source code for the Class138.smethod_0 method:

   1:  internalstaticbool smethod_0 ()
   2:          {
   3:              bool flag;
   4:              try
   5:              {
   6:                  false;
   7:                  smethod_7 ();
   8:                  if ((string_0.length! = 0) & (class139_0.String_0.Length! = 0)) & & (Class139_0.int32_0 >= smethod_3 ()))
   9:                  {
  :                      flag = smethod_5 (String_0, class139_0.string_0);
One   :                  }
  :              }
  :              catch (Exception exception1)
  :              {
  :                  projectdata.setprojecterror (exception1);
  :                  projectdata.clearprojecterror ();
  :              }
  :              return flag;
  :          }
Looking at this code in the trial version, the 10th line of code should return false. At this time the idea of cracking is also produced, modified

Smethod_5 The return value of the method, so that it always returns true, or modifies the logic of 8 rows, so that the condition is always false not to enter the 10th line of code, and then the 6th line of code to change the default value to True, you can complete the hack. I chose the latter.

Install the Reflexil.Reflector.AIO plugin, open the Il Code Editing window, modify the IL code directly, then save As.

As shown in, the default value of line No. 0 has been changed to true, the judging condition of line 8th, arbitrarily changed to less than or equal to let it return false, after the modification, then use. NET Reflector to load the assembly, the source code is deserialized as follows:

Internal Static bool smethod_0 () {    bool flag;    try    {        true;        Smethod_7 ();        if (! ((String_0.length! = 0) & (class139_0.String_0.Length! = 0)) && (Class139_0.int32_0 >= smethod_3 ()))        {            flag = smethod_5 (String_0, class139_0.string_0);        }    }    Catch (Exception exception1)    {        projectdata.setprojecterror (exception1);        Projectdata.clearprojecterror ();    }    return

Cracked finished.

Vsdocman's source code protection method is the use of XML signature technology, some fragment code reference as follows:

 Internal Static BOOLSmethod_1 (stringString_2,stringString_3) {string_2 = String_2.trim ();            String_2 = String_2.toupper (); string_2 = string_2.padright (100,'. '); String_2 = Smethod_3 (string_2);byte[] bytes =NewUnicodeEncoding ().            GetBytes (string_2); String_3 = String_3.replace ("\ r \ n",string.            Empty); String_3 = string_3.substring (0, string_3.length-0x10);byte[] Buffer2 = Smethod_6 (string_3); RSACryptoServiceProvider Provider =NewRSACryptoServiceProvider (); Provider. Fromxmlstring ("<rsakeyvalue><modulus>q/ y9ksdzyhgjjhtltl5zzhoalfybqgptisoa98kymlzcowiudsalpz0zortyr7ldwhsqidhmynaxhb2+ Hr2tw1c0awwa95vcuuyfiahtirodc8mnho8r9xxiwiwp0z1vgkqngtc9rcjdmvethicsuc167jw9nnlpaxc0vrmgrs0=</modulus> <Exponent>AQAB</Exponent></RSAKeyValue> "); RSAParameters parameters = provider. Exportparameters (false); Provider. Fromxmlstring ("<rsakeyvalue><modulus>q/ y9ksdzyhgjjhtltl5zzhoalfybqgptisoa98kymlzcowiudsalpz0zortyr7ldwhsqidhmynaxhb2+ Hr2tw1c0awwa95vcuuyfiahtirodc8mnho8r9xxiwiwp0z1vgkqngtc9rcjdmvethicsuc167jw9nnlpaxc0vrmgrs0=</modulus> <Exponent>AQAB</Exponent></RSAKeyValue> "); Parameters = Provider. Exportparameters (false);returnSmethod_2 (bytes, buffer2, parameters); }

This is with my article "large." NET business software protection technology is the same as described in the 3rd article.

Complete installer and hack file download: vsdocman_7_1_setup

Once the installation is complete, overwrite the VSdocman2.dll directly in the installation directory.

The program is limited to communication and learning and should not be used for commercial purposes.

Break the excellent. NET Document design Tool Vsdocman 7.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.