C # encryption method using Dotfuscator to confuse code

Source: Internet
Author: User
Tags printable characters

Text:
Code written in C # without some degree of confusion and encryption, it is very easy to be anti-compilation, especially for some commercial use of C # software, because staring more people, it is very easy to break. The Dotfuscator with VS comes with the functions of confusing code, variable name modification, string encryption, and so on.

Floating easy to use is the Dotfuscator 4.2 PRO version, there is a need to search online to download Dotfuscator Professional Edition 4.9 cracked version. Install Dotfuscator good Open Interface, there are several places to configure: Options, Input, Rename, String encryption, Build, the other default can be, the following floating easy one by one to explain.

options OptionThis is the global configuration option:
Set Disable string encryption to No, that is, enable string encryption, check Disable control flow, dsiable renaming also No, that is, to ensure that control flow and obfuscation function open, other default. Such as:

in the Input optionSelect the DLL that you need to confuse encryption, EXE file, refer to the first picture;

Rename OptionsTick "Use enhanced overload induction" (using enhanced mode), note: Do not check the bottom "do not suppress on serializable types", that is, the serialized type of variable is not encrypted, otherwise compiled may be abnormal; " Renaming Scheme "select" unprintable "(non-printable characters, which are garbled), or you can choose other ways such as lowercase letters, uppercase characters, and numbers. Such as:

String Encryption OptionsInclude the use of string encryption to select the project EXE, DLL, and so on.

Build OptionsSet the Output destination folder, click the "Build" button below to regenerate the new EXE, DLL files.

OK, let's look at the effect of encryption obfuscation:

The original code:
String TT = "FM";
BOOL VIP = FALSE;

private void Form1_Load (object sender, EventArgs e)
{
richTextBox1.Text = "Start";
}

private void Button1_Click (object sender, EventArgs e)
{
richTextBox1.Text = "Button1 Clicked";
VIP = true;
richTextBox1.Text + = VIP. ToString ();
}

After Dotfuscator obfuscated encryption, we use the famous anti-compilation software Reflector, you can see that the code in the body of the function has not been seen, prompting: "This item was obfuscated and can not be translated." The string also becomes garbled and the function name is not visible, as follows:

several points of attention using Dotfuscator confusion】:
1, if you encrypt the DLL, EXE has the public class, you need to be externally referenced, then refer to the public of the relevant DLLs, EXE also put into the Dotfuscator Input, while confusing encryption, or external call error.
2, if there is a public class, but you do not want to follow the 1th way, you can check the Library mode (input to expand the project, see), or do not select the Rename option, only with control flow confusion (in this way will see the class name, function name, But the function body is not visible).

3, if there is a public class, but you do not want to follow my 1th, 2nd method, you can exclude these public class name, method name, attribute name in the Rename option: Use rename exclude left to exclude items, or the right side of the regular exclusion method, see:

Here is an article written by other netizens with Dotfuscator to confuse the practice experience of ASP.

Of course, the software world is not able to crack, but the use of Dotfuscator obfuscation encryption can at least block many novice! Flymorn
Source: Flymorn
All rights reserved. The author and original source and this statement must be indicated in the form of a link in the reprint. "Turn" http://www.piaoyi.org/c-sharp/C-Dotfuscator-code.html

C # encryption method using Dotfuscator to confuse code

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.