1 Star 0 Fork 0

石超 / JIEJIE.NET

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
GPL-2.0

JIEJIE.NET

An open source tool to obfuscation .NET assembly file, help people protect theirs copyright.
Jie(2)Jie(4) in chinese is a kind of transparet magic protect shield.

update log


2023-12-2 : Fix bug for parse string value.
2023-11-7 : Support Blazor Web assembly.clean custom attributes,remove dead code.
2023-2-15 : Support .NET6.0.
2022-11-11: Fix bug for SMF_CreateEmptyTable and marshal in field.
2022-11-7 : Fix bug for modopt,modreq and marshal instruction.Fix bug for COM.Interop .
2022-8-31 : Fix bug for await call.
2022-7-19 : Fix bug for SMF_GetManifestResourceNames().
2022-4-13 : Fix bug while working with VS.NET.
2022-3-7 : Support filter{}.
2022-2-17 : Add Windows GUI.
2022-2-9 : More powerfull obfuscate control flow.
2022-1-31 : Happy CHINESE NEW YEAR!!!!!!!!!
2022-1-6 : Encrypt embedded resources.
2021-12-30: More powerfull stack trace translate for new year.
2021-12-14: Let software run faster and less memory used.support crossgen.exe for .net core.
2021-12-06: Support ldtoken method.
2021-11-19: Encrypt enum value when calling method.
2021-11-16: Encrypt typeof() instruction.
2021-11-11: Encrypt byte array and integer values.fix for COM interop.
2021-11-1 : Remove property/event which renamed.
2021-10-25: Hidden array define.
2021-10-23: Merge multi assembly files to a single assembly file.change target platform.
2021-9-21 : Clean document comment xml element which renamed.
2021-9-9 : package small properties and change call/callvirt instructions.
2021-8-23 : Add feature: Support .NET core,fix some bugs.
2021-7-20 : Add feature: type or member rename.
2021-4-2 : Add feature: Obfuscate control flow.
2021-3-22 : First publish.

Background

Many .net developers are worry about their software has been cracked,copyright under infringed, so they use some tools to obfuscate IL code.such as PreEmptive dotfuscator.But some times ,it is not enought.
So I write JieJie.NET can encrypt .NET assembly deeply,help people protect their copyright.and this tool is open source. It is a .NET application, the GUI is :

The console UI is :

Features

It has following features.

1 , Rename type and member.

JieJie can change type and member's name.This can make more difficute to understand the meaning of API.And effect by [System.Reflection.ObfuscationAttribute].
For example, the old code is :

public abstract class XTextDocumentContentElement : XTextContentElement
{
    public override void AfterLoad(ElementLoadEventArgs args);
    public override void Clear();
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public override XTextElement Clone(bool Deeply);
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public override XTextDocument CreateContentDocument(bool includeThis);
    public XTextSelection CreateSelection(int startIndex, int length);
    public override void Dispose();
    public override void DrawContent(InnerDocumentPaintEventArgs args);
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public override void EditorRefreshViewExt(bool fastMode);
    public float FixPageLinePosition(int pos);
    public override void Focus();
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public XTextLineList GetAllLines();
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public virtual XTextRange GetRange(int StartIndex, int EndIndex);
    public void InnerGetSelectionBorderElement(ref XTextElement startElement, ref XTextElement endElement);
    public void InvalidateSpecifyLayoutElements();
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public virtual bool IsSelected(XTextElement element);
    public void RefreshParagraphListState(bool checkFlag, bool updateListIndex);
    public XTextParagraphFlagElement RootParagraphFlag();
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public bool SetSelection(int startIndex, int length);
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    public bool SetSelectionRange(int firstIndex, int lastIndex);
}

After rename, these code change to:

public abstract class XTextDocumentContentElement : XTextContentElement
{
    public override void Clear();
    public override XTextElement Clone(bool Deeply);
    public override XTextDocument CreateContentDocument(bool includeThis);
    public override void Dispose();
    public override void EditorRefreshViewExt(bool fastMode);
    public override void Focus();
    public XTextLineList GetAllLines();
    public virtual XTextRange GetRange(int StartIndex, int EndIndex);
    public virtual bool IsSelected(XTextElement element);
    public bool SetSelection(int startIndex, int length);
    public bool SetSelectionRange(int firstIndex, int lastIndex);
    public XTextParagraphFlagElement z0ZzZzbmm1mO001();
    public XTextSelection z0ZzZzbmm1mO011(int startIndex, int length);
    public void z0ZzZzbmm1mO01O();
    public float z0ZzZzbmm1mOOm1(int pos);
    public void z0ZzZzbmm1mOOmn(ref XTextElement startElement, ref XTextElement endElement);
    public void z0ZzZzbmm1mOOmO(bool checkFlag, bool updateListIndex);
    public override void z0ZzZzbmmOO11nn(z0ZzZzbm0mmlm1O args);
    public override void z0ZzZzbmmOOl0nO(ElementLoadEventArgs args);
}

You can see , some API's name obfuscated.

2 , Obfuscate control-flow.

JieJie can anlyse IL Code, and obfuscate control-flow randomly without lost any features, It can break syntactic structure for foreach/lock/using. hiden the operation of euqals and concat tow string values. It let codes are very hard to read, some times it will cause crack tool error.
For example , the old code is :

public int RemoveByControl(object control)
{
    if (control == null)
    {
        throw new ArgumentNullException("control");
    }
    if (CheckOwner() == false)
    {
        return -1;
    }
    int result = 0;
    lock (this)
    {
        for (int iCount = _Tasks.Count - 1; iCount >= 0; iCount--)
        {
            if (_Tasks[iCount].Control == control)
            {
                _Tasks.RemoveAt(iCount);
                result++;
            }
        }
        if (_CurrentTask != null && _CurrentTask.Control == control)
        {
            _CurrentTask = null;
        }
    }
    return result;
}

After use JieJie.NET, these code display in ILSpy is:

public int RemoveByControl(object control)
{
	//Discarded unreachable code: IL_000b, IL_0073
	//IL_000b: Incompatible stack heights: 1 vs 0
	//IL_0073: Incompatible stack heights: 1 vs 0
	int num = z0ZzZzgw.z0kh;
	bool flag = default(bool);
	int num4 = default(int);
	int result = default(int);
	while (true)
	{
		switch (num)
		{
		default:
		{
			if (control == null)
			{
				throw new ArgumentNullException(z0ZzZzow.z0rj);
			}
			if (!z0rk())
			{
				goto IL_0049;
			}
			int num2 = 0;
			z0ZzZzjw.z0uk(this);
			try
			{
				int num3 = z0ZzZzgw.z0ah;
				while (true)
				{
					switch (num3)
					{
					default:
						num2++;
						goto IL_0097;
					case 3:
						if (flag)
						{
							z0ik = null;
						}
						break;
					case 4:
					case 5:
						{
							num4 = z0bk.Count - 1;
							goto IL_009e;
						}
						IL_009e:
						if (num4 < 0)
						{
							flag = z0ik != null && z0ik.Control == control;
							num3 = z0ZzZzgw.z0wj;
							continue;
						}
						if (z0bk[num4].Control == control)
						{
							z0bk.RemoveAt(num4);
							num3 = z0ZzZzgw.z0sh;
							continue;
						}
						goto IL_0097;
						IL_0097:
						num4--;
						goto IL_009e;
					}
					break;
				}
			}
			finally
			{
				Monitor.Exit(this);
			}
			result = num2;
			break;
		}
		case 0:
		case 1:
		case 3:
			break;
		}
		break;
		IL_0049:
		result = -1;
		num = z0ZzZzgw.z0wj;
	}
	return result;
}

Look, the control flow is very hard to understand , and ILSpy has error IL_000b: Incompatible stack heights: 1 vs 0. And use .NET Reflector 10.3,It stop work direct.

3 , Encrypt all string values define in assembly.

JieJie.NET can collect all string values define in assembly,convert they to static readonly fields in a new class,and encrypt theirs value.Make hakers can no search string value direct, crack is more difficulty.
For example , the old code is :

private string GetLicenseMessage()
{

    return "This software license to :" + Environment.UserName;
}

After use JieJie.NET , the new code is :

private string GetLicenseMessage()
{
    string text = _0._6 + Environment.UserName;
    return text;
}
//  also create a new class, contains all string value in assembly in random order.
internal static class _0
{
    public static readonly string _0;
    public static readonly string _1;
    public static readonly string _2;
    public static readonly string _3;
    public static readonly string _4;
    public static readonly string _5;
    public static readonly string _6;
    public static readonly string _7;
    public static readonly string _8;
    public static readonly string _9;
    public static readonly string _10;
    public static readonly string _11;
    public static readonly string _12;
    public static readonly string _13;
    public static readonly string _14;
    public static readonly string _15;
    public static readonly string _16;
    public static readonly string _17;
    public static readonly string _18;
    public static readonly string _19;
    public static readonly string _20;
    public static readonly string _21;

    static _0()
    {
        byte[] datas = _BytesContainer__._0();
        _11 = GetStringByLong(datas, 151732605047602L);
        _20 = GetStringByLong(datas, 450799767951810L);
        _7 = GetStringByLong(datas, 101155071172227L);
        _4 = GetStringByLong(datas, 47279000500949L);
        _15 = GetStringByLong(datas, 415615395474299L);
        _5 = GetStringByLong(datas, 54975582493063L);
        _2 = GetStringByLong(datas, 17592187197342L);
        _14 = GetStringByLong(datas, 206708198516324L);
        _8 = GetStringByLong(datas, 124244814685054L);
        _21 = GetStringByLong(datas, 459595860893446L);
        _6 = GetStringByLong(datas, 72567769190975L);
        _13 = GetStringByLong(datas, 182518931688172L);
        _18 = GetStringByLong(datas, 433207581847376L);
        _16 = GetStringByLong(datas, 417814419099513L);
        _3 = GetStringByLong(datas, 36283884381871L);
        _1 = GetStringByLong(datas, 9895605165436L);
        _9 = GetStringByLong(datas, 136339442622330L);
        _19 = GetStringByLong(datas, 440904163377248L);
        _17 = GetStringByLong(datas, 426610511995160L);
        _0 = GetStringByLong(datas, 598562L);
        _10 = GetStringByLong(datas, 148434069970387L);
        _12 = GetStringByLong(datas, 158329675868829L);
    }
    private static string GetStringByLong(byte[] datas, long key)
    {
        int num = (int)(key & 0xFFFF) ^ 0xEF83;
        key >>= 16;
        int num2 = (int)(key & 0xFFFFF);
        key >>= 24;
        int num3 = (int)key;
        char[] array = new char[num2];
        int num4 = 0;
        while (num4 < num2)
        {
            int num5 = num4 + num3 << 1;
            array[num4] = (char)(((datas[num5] << 8) + datas[num5 + 1]) ^ num);
            num4++;
            num++;
        }
        return new string(array);
    }
}

Additional, this process can avoid a kind of performance problem cause by assembly obfuscation.
For example, use the following code:

public static byte[] ParseUpperHexString(string hexs)
{
    var list = new List<byte>();
    int Value = -1;
    foreach (char c in hexs)
    {
        int index = "0123456789ABCDEF".IndexOf(c);
        if (index >= 0)
        {
            if (Value < 0)
            {
                Value = index;
            }
            else
            {
                Value = Value * 16 + index;
                list.Add((byte)Value);
                Value = -1;
            }
        }
    }
    return list.ToArray();
}

After dotfuscate the code change to:

public static byte[] z0ZzZzbn(string A_0)
{
  int a_ = 15;
  List<byte> list = new List<byte>();
  int num = -1;
  foreach (char value in A_0)
  {
    int num2 = z0ZzZzbbz.b("\uf0bf\uf3c1\uf6c3\uf5c5\uffc9?\ue8cf\uebd1G?e??a???y", a_).IndexOf(value);
    if (num2 >= 0)
    {
      if (num < 0)
      {
        num = num2;
        continue;
      }
      num = num * 16 + num2;
      list.Add((byte)num);
      num = -1;
    }
  }
  return list.ToArray();
}

internal unsafe static string z0ZzZzbbz.b(string A_0, int A_1)
{
  char[] array = A_0.ToCharArray();
  int num = (int)((long)(IntPtr)(void*)((long)(IntPtr)(void*)((long)(1169192937 + A_1) + 80L) + 78L) + 41L);
  int num2 = 0;
  if (num2 >= 1)
  {
    goto IL_0029;
  }
  goto IL_005c;
  IL_005c:
  if (num2 >= array.Length)
  {
    return string.Intern(new string(array));
  }
  goto IL_0029;
  IL_0029:
  int num3 = num2;
  char num4 = array[num3];
  byte b = (byte)((num4 & 0xFFu) ^ (uint)num++);
  byte b2 = (byte)(((int)num4 >> 8) ^ num++);
  byte num5 = b2;
  b2 = b;
  b = num5;
  array[num3] = (char)((b2 << 8) | b);
  num2++;
  goto IL_005c;
}

This cause a serious performance problem.To solve the problem, by use JieJie.NET, this code change to :

private static readonly string _HexChars = _0._11 ;
public static byte[] ParseUpperHexString(string hexs)
{
  var list = new List<byte>();
  int Value = -1;
  foreach (char c in hexs)
  {
    int index = _HexChars.IndexOf(c);
    if (index >= 0)
    {
      if (Value < 0)
      {
        Value = index;
      }
      else
      {
        Value = Value * 16 + index;
        list.Add((byte)Value);
        Value = -1;
      }
    }
  }
  return list.ToArray();
}

After dotfuscate the code change to:

private static readonly string z0ZzZzbg = z0ZzZzbbz.z0ZzZzbef;
public static byte[] z0ZzZzbu(string A_0)
{
  List<byte> list = new List<byte>();
  int num = -1;
  foreach (char value in A_0)
  {
    int num2 = DCFormCheckBoxElement.z0ZzZzbg.IndexOf(value);
    if (num2 >= 0)
    {
      if (num < 0)
      {
        num = num2;
        continue;
      }
      num = num * 16 + num2;
      list.Add((byte)num);
      num = -1;
    }
  }
  return list.ToArray();
}

This code avoid the performance problem.

4 , Encrypt *.resources file.

Haker can dasm .NET assembly file use ildasm.exe, and get all *.resouces file embed in assembly , change it , maby replace their name or logo image, and use ilasm.exe to rebuild a .NET assembly file.Change your copyright UI to haker's copyright UI.
JieJie.NET can encrypt *.resouces files and hidden it, It is more hard to modify copyright UI.So it can protect your copyright.
For example, your a define a WinFrom , and the InitializeComponent() function code is :

private void InitializeComponent()
{
    System.ComponentModel.ComponentResourceManager resources 
            = new System.ComponentModel.ComponentResourceManager(typeof(SampleWinApp.frmMain));
    pictureBox1 = new System.Windows.Forms.PictureBox();
    btnAbout = new System.Windows.Forms.Button();
    btnDoWork = new System.Windows.Forms.Button();
    label1 = new System.Windows.Forms.Label();
    button1 = new System.Windows.Forms.Button();
    ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
    SuspendLayout();
    pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image");
    pictureBox1.Location = new System.Drawing.Point(150, 21);
    pictureBox1.Name = "pictureBox1";
    pictureBox1.Size = new System.Drawing.Size(64, 64);
    pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
    pictureBox1.TabIndex = 1;
    pictureBox1.TabStop = false;
    btnAbout.Location = new System.Drawing.Point(21, 188);
    btnAbout.Name = "btnAbout";
    btnAbout.Size = new System.Drawing.Size(299, 64);
    btnAbout.TabIndex = 2;
    btnAbout.Text = "About...";
    btnAbout.UseVisualStyleBackColor = true;
    btnAbout.Click += new System.EventHandler(btnAbout_Click);
    btnDoWork.Location = new System.Drawing.Point(21, 109);
    btnDoWork.Name = "btnDoWork";
    btnDoWork.Size = new System.Drawing.Size(299, 64);
    btnDoWork.TabIndex = 3;
    btnDoWork.Text = "Do work";
    btnDoWork.UseVisualStyleBackColor = true;
    btnDoWork.Click += new System.EventHandler(btnDoWork_Click);
    label1.AutoSize = true;
    label1.Location = new System.Drawing.Point(13, 43);
    label1.Name = "label1";
    label1.Size = new System.Drawing.Size(131, 12);
    label1.TabIndex = 4;
    label1.Text = "This is a logo image:";
    button1.Location = new System.Drawing.Point(21, 275);
    button1.Name = "button1";
    button1.Size = new System.Drawing.Size(299, 63);
    button1.TabIndex = 5;
    button1.Text = "Get string in resource";
    button1.UseVisualStyleBackColor = true;
    button1.Click += new System.EventHandler(button1_Click);
    base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
    base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    base.ClientSize = new System.Drawing.Size(414, 365);
    base.Controls.Add(button1);
    base.Controls.Add(label1);
    base.Controls.Add(btnDoWork);
    base.Controls.Add(btnAbout);
    base.Controls.Add(pictureBox1);
    base.Name = "frmMain";
    Text = "frmMain";
    base.Load += new System.EventHandler(frmMain_Load);
    ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
    ResumeLayout(false);
    PerformLayout();
}

After use JieJie.NET, the code change to :

private void InitializeComponent()
{
    __DC20210205._Res1 res = new __DC20210205._Res1();
    pictureBox1 = new System.Windows.Forms.PictureBox();
    btnAbout = new System.Windows.Forms.Button();
    btnDoWork = new System.Windows.Forms.Button();
    label1 = new System.Windows.Forms.Label();
    button1 = new System.Windows.Forms.Button();
    ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
    SuspendLayout();
    pictureBox1.Image = (System.Drawing.Image)res.GetObject(__DC20210205._0._2);
    pictureBox1.Location = new System.Drawing.Point(150, 21);
    pictureBox1.Name = __DC20210205._0._8;
    pictureBox1.Size = new System.Drawing.Size(64, 64);
    pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
    pictureBox1.TabIndex = 1;
    pictureBox1.TabStop = false;
    btnAbout.Location = new System.Drawing.Point(21, 188);
    btnAbout.Name = __DC20210205._0._16;
    btnAbout.Size = new System.Drawing.Size(299, 64);
    btnAbout.TabIndex = 2;
    btnAbout.Text = __DC20210205._0._20;
    btnAbout.UseVisualStyleBackColor = true;
    btnAbout.Click += new System.EventHandler(btnAbout_Click);
    btnDoWork.Location = new System.Drawing.Point(21, 109);
    btnDoWork.Name = __DC20210205._0._0;
    btnDoWork.Size = new System.Drawing.Size(299, 64);
    btnDoWork.TabIndex = 3;
    btnDoWork.Text = __DC20210205._0._21;
    btnDoWork.UseVisualStyleBackColor = true;
    btnDoWork.Click += new System.EventHandler(btnDoWork_Click);
    label1.AutoSize = true;
    label1.Location = new System.Drawing.Point(13, 43);
    label1.Name = __DC20210205._0._11;
    label1.Size = new System.Drawing.Size(131, 12);
    label1.TabIndex = 4;
    label1.Text = __DC20210205._0._7;
    button1.Location = new System.Drawing.Point(21, 275);
    button1.Name = __DC20210205._0._4;
    button1.Size = new System.Drawing.Size(299, 63);
    button1.TabIndex = 5;
    button1.Text = __DC20210205._0._13;
    button1.UseVisualStyleBackColor = true;
    button1.Click += new System.EventHandler(button1_Click);
    base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
    base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    base.ClientSize = new System.Drawing.Size(414, 365);
    base.Controls.Add(button1);
    base.Controls.Add(label1);
    base.Controls.Add(btnDoWork);
    base.Controls.Add(btnAbout);
    base.Controls.Add(pictureBox1);
    base.Name = __DC20210205._0._18;
    Text = __DC20210205._0._18;
    base.Load += new System.EventHandler(frmMain_Load);
    ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
    ResumeLayout(false);
    PerformLayout();
}
// And auto create a new class:
internal class _Res1 : ComponentResourceManager, IDisposable
{
    private ResourceSet _Data;

    public _Res1()
    {
        _Data = InnerAssemblyHelper20210315.LoadResourceSet(
                _BytesContainer__._2(), 224, gzip: true);
    }

    public override ResourceSet GetResourceSet(
                CultureInfo culture, bool createIfNotExists, bool tryParents)
    {
        return _Data;
    }

    protected override ResourceSet InternalGetResourceSet(
                CultureInfo culture, bool createIfNotExists, bool tryParents)
    {
        return _Data;
    }

    public void Dispose()
    {
        if (_Data != null)
        {
            _Data.Close();
            _Data = null;
        }
    }
}

And remove the embeded resource "SampleWinApp.frmMain.resources". after do these, new code is very difficulty to crack.

Additional,If software is design for globalization with multiple UI language,The software will include specify UI language resource dll files.My tools will prompt operator to select a UI language and merge UI language resource data to IL code .and remove embeded .resources file. This will provide a more fast lanuch speed and without UI language resouce dll.
My tool also can change the resource package class code.
For example, This is a resource package class code:

[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
internal class Resource1
{
    private static ResourceManager resourceMan;
    private static CultureInfo resourceCulture;
    [EditorBrowsable(EditorBrowsableState.Advanced)]
    internal static ResourceManager ResourceManager
    {
        get
        {
            if (resourceMan == null)
            {
                ResourceManager temp = resourceMan =  new ResourceManager(
                    "SampleWinApp.Resource1", typeof(Resource1).Assembly);
            }
            return resourceMan;
        }
    }
    [EditorBrowsable(EditorBrowsableState.Advanced)]
    internal static CultureInfo Culture
    {
        get
        {
            return resourceCulture;
        }
        set
        {
            resourceCulture = value;
        }
    }
    internal static Bitmap blue96
    {
        get
        {
            object obj = ResourceManager.GetObject("blue96", resourceCulture);
            return (Bitmap)obj;
        }
    }
    internal static string String2 {
        get{ return ResourceManager.GetString("String2", resourceCulture);}
    }
    internal static string StringValue {
        get{ return ResourceManager.GetString("StringValue", resourceCulture);}
    }
    internal Resource1()
    {
    }
}

After use my tool , It change to :

internal class Resource1
{
    private static readonly byte[] _Datas = _BytesContainer__._1();
    private static Bitmap _blue96;
    public static Bitmap get_blue96()
    {
        if (_blue96 == null)
        {
            _blue96 = InnerAssemblyHelper20210315.GetBitmap(_Datas, 0, 36918, 1807292644);
        }
        return _blue96;
    }
    internal static string get_String2()
    {
        return InnerAssemblyHelper20210315.GetString(_Datas, 37002, 98, 614997590);
    }
    internal static string get_StringValue()
    {
        return InnerAssemblyHelper20210315.GetString(_Datas, 36918, 84, 57466195);
    }
}

The resouce data aleady has been encrypted, and hard to crack.

5 ,Hidden allocation call stack.

Hackers can search key information by using memory profiler tools , etc. Scitech .NET memory Profiler.but JieJie.NET can change this stack,puzzle hackers.
For example, I use the follow code to display software license info.

private void btnAbout_Click(object sender, EventArgs e)
{
    MessageBox.Show(this, GetLicenseMessage());
}
private string GetLicenseMessage()
{
    string msg = "This software license to :" + Environment.UserName;
    return msg;
}

When you start application in Scitech .NET memory Profiler, and show the about dialog. the screensnapshort like this.

In .NET Memory profiler.the UI is
seach the string "This software license to:Administrator" and double click , then you can see the follow UI:
There are list the key string value allocation call stack :

mscorlib!System.String.Concat( string,string )
SampleWinApp!SampleWinApp.frmMain.GetLicenseMessage() frmMain.cs
SampleWinApp!SampleWinApp.frmMain.btnAbout_Click( object,EventArgs ) frmMain.cs
System.Windows.Forms!System.Windows.Forms.Control.OnClick( EventArgs )
System.Windows.Forms!System.Windows.Forms.Button.OnMouseUp( MouseEventArgs )
System.Windows.Forms!System.Windows.Forms.Control.WmMouseUp( ref Message,MouseButtons,int )
System.Windows.Forms!System.Windows.Forms.Control.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.ButtonBase.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.Control.ControlNativeWindow.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.NativeWindow.Callback( IntPtr,int,IntPtr,IntPtr )
[Native to managed transition]
[Managed to native transition]
System.Windows.Forms!System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW( ref MSG )
System.Windows.Forms!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop( int,int,int )
System.Windows.Forms!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner( int,ApplicationContext )
System.Windows.Forms!System.Windows.Forms.Application.ThreadContext.RunMessageLoop( int,ApplicationContext )
SampleWinApp!SampleWinApp.Program.Main() Program.cs

This call stack maby point out how to crack the software.
Then you can change source to :

private void btnAbout_Click(object sender, EventArgs e)
{
   MessageBox.Show(this, GetLicenseMessage());
}
        
private string GetLicenseMessage()
{
   var str = "JIEJIE.NET.SWITCH:+allocationcallstack";;// no used,just let JieJie.NET know the owner method need change.
   string msg = "This software license to :" + Environment.UserName;
   return msg;
}

At there,the code var str = "JIEJIE.NET.SWITCH:+allocationcallstack";"; do nothing, just let JieJie.NET know this is a key method, need to change, the value is ignore case.
My tool can change this call stack to this:

mscorlib!System.String.CtorCharArray( char[] )
SampleWinApp2!DCSoft.Common.InnerAssemblyHelper20210315.CloneStringCrossThead_Thread()
mscorlib!System.Threading.ExecutionContext.RunInternal( ExecutionContext,ContextCallback,object,bool )
mscorlib!System.Threading.ExecutionContext.Run( ExecutionContext,ContextCallback,object,bool )
mscorlib!System.Threading.ExecutionContext.Run( ExecutionContext,ContextCallback,object )
mscorlib!System.Threading.ThreadHelper.ThreadStart()

It is more difficuted to find out the key call stack.This feature help you hidden your weakness, protect your software copyright.

6 , Obfuscate class's members order.

When we write a large class's code , usual ,field or method for the same target is very nearby.for example:

    private string _RegisterCode = null;
    private bool _IsRegisteredFlag = false;
    public void SetRegisterCode( string code ){};
    pulbic bool IsRegisterdCodeOK( string code ){};
    public string GetErrorMessageForRegister();
    XXXXXXX other members XXXXXX

When hakers capture one key member,for example _RegisterCode , and analyse other members nearby, maby can get more information.
But JieJie.NET can obfuscate order of class's members , just like this:

    private bool _IsRegisteredFlag = false;
    XXXXXXX other members XXXXXX
    private string _RegisterCode = null;
    XXXXXXX other members XXXXXX
    public string GetErrorMessageForRegister();
    XXXXXXX other members XXXXXX
    pulbic bool IsRegisterdCodeOK( string code ){};
    XXXXXXX other members XXXXXX
    public void SetRegisterCode( string code ){};
    XXXXXXX other members XXXXXX

Other members nearby maby have nothing to do with one key member.this can make carck more difficult.

7 , Clean document comment xml file.

JIEJIE.NET can clean document comment xml file. remove member xml element which it renamed.

8 , Save rename map xml file.

JIEJIE.NET can save rename map xml file just like the following:

<jiejie.net.map methodCount="18347">
   <method newsign="zzz.z0ZzZzgvg.z0aa(System.IO.Stream)" oldsign="DCSoft.Writer.Serialization.Html.IWriterHtmlDocumentWriter.SaveMHT(System.IO.Stream 'stream')" newshort="(Stream)" newname="zzz.z0ZzZzgvg.z0aa" />
   <method newsign="zzz.z0ZzZztvg.z0aa(System.IO.Stream)" oldsign="DCSoft.Writer.Html.HtmlDocumentWriter.SaveMHT(System.IO.Stream 'stream')" newshort="(Stream)" newname="zzz.z0ZzZztvg.z0aa" />
   <method newsign="zzz.z0ZzZzmok.z0aak(String)" oldsign="Open_Newtonsoft_Json.Linq.JTokenWriter.WriteRaw(String json)" newshort="(String)" newname="zzz.z0ZzZzmok.z0aak" />
   <method newsign="zzz.z0ZzZzkrk.z0aak(String)" oldsign="Open_Newtonsoft_Json.JsonTextWriter.WriteRaw(String json)" newshort="(String)" newname="zzz.z0ZzZzkrk.z0aak" />
   <method newsign="zzz.z0ZzZzhrk.z0aak(String)" oldsign="Open_Newtonsoft_Json.JsonWriter.WriteRaw(String json)" newshort="(String)" newname="zzz.z0ZzZzhrk.z0aak" />
   <method newsign="zzz.z0ZzZzcaj.z0ab(DCSoft.Writer.Dom.XTextImageElement)" oldsign="DCSoft.TypeProviders.TypeProvider_XTextImageElement.GetRuntimeImage(DCSoft.Writer.Dom.XTextImageElement thisElement)" newshort="(XTextImageElement)" newname="zzz.z0ZzZzcaj.z0ab" />
   <method newsign="DCSoft.Writer.Dom.XTextImageElement.z0ZzZztlf.z0ab(DCSoft.Writer.Dom.XTextImageElement)" oldsign="DCSoft.Writer.Dom.XTextImageElement.ITypeProvider_XTextImageElement.GetRuntimeImage(DCSoft.Writer.Dom.XTextImageElement thisElement)" newshort="(XTextImageElement)" newname="DCSoft.Writer.Dom.XTextImageElement.z0ZzZztlf.z0ab" />
   <method newsign="DCSoft.Writer.Dom.XTextCheckBoxElementBase.z0ZzZzbzg.z0ac(DCSoft.Writer.Dom.XTextCheckBoxElementBase,Boolean)" oldsign="DCSoft.Writer.Dom.XTextCheckBoxElementBase.ITypeProvider_XTextCheckBoxElementBase.SetInnerEditorChecked(DCSoft.Writer.Dom.XTextCheckBoxElementBase element,Boolean 'value')" newshort="(XTextCheckBoxElementBase,Boolean)" newname="DCSoft.Writer.Dom.XTextCheckBoxElementBase.z0ZzZzbzg.z0ac" />
   <method newsign="zzz.z0ZzZzmaj.z0ac(DCSoft.Writer.Dom.XTextCheckBoxElementBase,Boolean)" oldsign="DCSoft.TypeProviders.TypeProvider_XTextCheckBoxElementBase.SetInnerEditorChecked(DCSoft.Writer.Dom.XTextCheckBoxElementBase element,Boolean 'value')" newshort="(XTextCheckBoxElementBase,Boolean)" newname="zzz.z0ZzZzmaj.z0ac" />
   <method newsign="DCSoft.Writer.Dom.XTextFieldElementBase.z0ad(DCSoft.Writer.Dom.XTextElement)" oldsign="DCSoft.Writer.Dom.XTextFieldElementBase.IsParentOrSupParent(DCSoft.Writer.Dom.XTextElement element)" newshort="(XTextElement)" newname="DCSoft.Writer.Dom.XTextFieldElementBase.z0ad" />
   <method newsign="DCSoft.Writer.Dom.XTextElement.z0ad(DCSoft.Writer.Dom.XTextElement)" oldsign="DCSoft.Writer.Dom.XTextElement.IsParentOrSupParent(DCSoft.Writer.Dom.XTextElement parentElement)" newshort="(XTextElement)" newname="DCSoft.Writer.Dom.XTextElement.z0ad" />
   <method newsign="DCSoft.Writer.Dom.XTextDocument.z0ad(DCSoft.Writer.Dom.XTextElement)" oldsign="DCSoft.Writer.Dom.XTextDocument.IsParentOrSupParent(DCSoft.Writer.Dom.XTextElement parentElement)" newshort="(XTextElement)" newname="DCSoft.Writer.Dom.XTextDocument.z0ad" />
   <method newsign="zzz.z0ZzZzlok.z0adk(Object,zzz.z0ZzZztok)" oldsign="Open_Newtonsoft_Json.Linq.JConstructor.set_Item(Object key,Open_Newtonsoft_Json.Linq.JToken 'value')" newshort="(Object,z0ZzZztok)" newname="zzz.z0ZzZzlok.z0adk" />
   <method newsign="zzz.z0ZzZzfok.z0adk(Object,zzz.z0ZzZztok)" oldsign="Open_Newtonsoft_Json.Linq.JObject.set_Item(Object key,Open_Newtonsoft_Json.Linq.JToken 'value')" newshort="(Object,z0ZzZztok)" newname="zzz.z0ZzZzfok.z0adk" />
   <method newsign="zzz.z0ZzZzzik.z0adk(Object,zzz.z0ZzZztok)" oldsign="Open_Newtonsoft_Json.Linq.JArray.set_Item(Object key,Open_Newtonsoft_Json.Linq.JToken 'value')" newshort="(Object,z0ZzZztok)" newname="zzz.z0ZzZzzik.z0adk" />
   <method newsign="zzz.z0ZzZztok.z0adk(Object,zzz.z0ZzZztok)" oldsign="Open_Newtonsoft_Json.Linq.JToken.set_Item(Object key,Open_Newtonsoft_Json.Linq.JToken 'value')" newshort="(Object,z0ZzZztok)" newname="zzz.z0ZzZztok.z0adk" />
   <method newsign="zzz.z0ZzZzbyg.z0ae(DCSoft.Writer.Dom.XTextDocumentList)" oldsign="DCSoft.DCPDF.PDFBuilder.set_Documents(DCSoft.Writer.Dom.XTextDocumentList 'value')" newshort="(XTextDocumentList)" newname="zzz.z0ZzZzbyg.z0ae" />

Use command line JIEJIE.NET.EXE translate=map.xml,User can translate stack trace information.The UI is :

9 , Hidden array define.

People offen define array in source code , for example :

public static byte[] GetBytes()
{
	return new byte[]
	{
		85,
		203,
		85,
		204,
		85,
		255,
		85,
		245,
		85,
		247,
		85,
		171,
		85,
		165,
		142,
		157,
		142,
		184};
}

After use JIEJIE.NET, the code change to :

public static byte[] GetBytes()
{
	byte[] array = new byte[18];
	InnerAssemblyHelper20211018.MyInitializeArray(
		array, 
		(RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
	return array;
}

10, Encrypt typeof() instruction.

People offen use typeof() instruction to get Type. But this contains some information can used by cracter. JIEJIE.NET can hidden it. For example :

public static string CheckXmlSerialize()
{
    List<Type> rootTypes = new List<Type>();
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextDocument));
    rootTypes.Add(typeof(DCSoft.TemperatureChart.TemperatureDocument));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextAccountingNumberElement));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextBarcodeFieldElement));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextBeanFieldElement));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextBlankLineElement));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextBlockElement));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextBookmark));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextButtonElement));
    rootTypes.Add(typeof(DCSoft.Writer.Dom.XTextCharElement));
    string result = WriterUtils.CheckXmlName(rootTypes);
    return result;
}

After use JIEJIE.NET, the code change to :

public static string CheckXmlSerialize()
{
	List<Type> list = new List<Type>();
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._1002_827));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._1964_633));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._4356_95));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._680_162));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._533_68));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._4013_536));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._3964_1144));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._628_824));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._464_234));
	list.Add(_RuntimeTypeHandleContainer.GetTypeInstance(_Int32ValueContainer._3013_501));
	return WriterUtils.CheckXmlName(list);
}

If it work with rename, Cracter is very difficult to find the Type value.

Many information has been hidden.

11 , Encrypt enum values.

Many code whitch call funcions use enum values, for example:

public Dictionary<string, string> GetAllOptionValues()
{
    Dictionary<string, string> result = new Dictionary<string, string>();
    foreach (PropertyInfo p in this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
    {
        object v = p.GetValue(this, null);
        foreach (PropertyInfo p2 in v.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
        {
            if (p2.CanRead == false || p2.CanWrite == false)
            {
                continue;
            }
            object v2 = p2.GetValue(v, null);
            if (v2 != null)
            {
                string txt = v2.ToString();
                if (v2 is System.Drawing.Color)
                {
                    txt = XMLSerializeHelper.ColorToString((Color)v2);
                }
                result[p.Name + '.' + p2.Name] = txt;
            }
        }//foreach
    }//foreach
    return result;
}

After use JIEJIE.NET, It change to:

public Dictionary<string, string> GetAllOptionValues()
{
    Dictionary<string, string> result = new Dictionary<string, string>();
    foreach (PropertyInfo p in this.GetType().GetProperties((BindingFlags)_Int32ValueContainer._22_20))
    {
        object v = p.GetValue(this, null);
        foreach (PropertyInfo p2 in v.GetType().GetProperties((BindingFlags)_Int32ValueContainer._22_20))
        {
            if (p2.CanRead == false || p2.CanWrite == false)
            {
                continue;
            }
            object v2 = p2.GetValue(v, null);
            if (v2 != null)
            {
                string txt = v2.ToString();
                if (v2 is System.Drawing.Color)
                {
                    txt = XMLSerializeHelper.ColorToString((Color)v2);
                }
                result[p.Name + '.' + p2.Name] = txt;
            }
        }//foreach
    }//foreach
    return result;
}

Some information has been hidden.

12 , Merge assembly files.

When developing , many .NET application split to some assembly files,maby include one exe file and many dll files.
JIEJIE.NET can merge assembly files into a single assembly file.This let application more easy to copy or upgrade.

13 , Change target platform

JIEJIE.NET support change .coreflags or .subsystem arguments to change the target platform for result assembly . For example , a .NET assembly is design for x86 , using the following command line:
jiejie.net.exe d:\aa.dll .corflags=0x1
This can modify the result assembly file to x64 platform.

14 , Support .NET Core 3.1

JIEJIE.NET now support .NET Core 3.1.

16 , Support Blazor Web assembly.

JIEJIE.NET can handle Blazor Web assembly , It can delete *.pdb and *.pdb.gz files , Update SHA256 code in blazor.boot.json .

17 , Remove dead code.

JIEJIE.NET can remove dead code, there are 3 types:
Disabled = The option is disabled.
Normal = JIEJIE.NET remove all method that renamed , and without any custom attributes and never used.
All = JIEJIE.NET remove all method than renamed and never used.

18 , Remove custom attributes.

JIEJIE.NET can remove cutom attributes speicfy full type name.For example:


jiejie.net.exe d:\a.dll RemoveCustomAttributeTypeFullnames=System.Runtime.InteropServices.ComVisibleAttribute,System.Runtime.InteropServices.GuidAttribute
It can decrease output file size.

19 , Easy to use.

My new tool is a .NET framework console application.
It support following command line argument :

      input =[required,default argument,Full path of input .NET assembly file , can be .exe or .dll,
               currenttly only support .NET framework 2.0 or later]
      output=[optional,Full path of output .NET assmebly file , if it is empty , then use input argument value]
      snk   =[optional,Full path of snk file. It use to add strong name to output assembly file.]
      switch=[optional,multi-switch split by ',',also can be define in [System.Reflection.ObfuscationAttribute.Feature].
              It support :
              +contorlfow    = enable obfuscate control flow in method body.
              -contorlfow    = disable obfuscate control flow in method body.
              +/-strings     = enable/disable encrypt string value.
              +/-resources   = enable/disable encrypt resources data.
              +/-memberorder = enable/disable member list order in type.
              +/-rename      = enable/disable rename type or member's name.
              +/-allocationcallstack  = enable/disable encrypt string value allocation callstack.
          ]
      mapxml=[optional, a file/directory name to save map infomation for class/member's old name and new name in xml format.]
      pause =[optional,pause the console after finish process.]
      debugmode=[optional,Allow show some debug info text.]
      sdkpath=[optional,set the direcotry full name of ildasm.exe.]
      prefixfortyperename=[optional, the prefix use to rename type name.]
      prefixformemberrename=[optional,the prefix use to rename type's member name.]
      deletetempfile=[optional,delete template file after job finshed.default is false.]
      merge=[optional,some .net assembly file to merge to the result file. '*' for all referenced assembly files.]
      .subsystem=[optional, it a integer value, '2' for application in GUI mode.'3' for application in console mode.]
      .corflags=[optional, it is a integer flag,'3' for 32-bit process without strong name signature, '1' for 64-bit wihout strong name, '9' for 32-bit with strong name ,'10' for 64-bit with strong name.]
      [BlazorWebAssembly] , optional , process for Blazor web assembly.
      DeadCode=[optional ,It can be `Disalbed`, or `Normal`(All method renamed , and without any custom attributes and never used) or `All`(All method renamed and never used).]
      RemoveCustomAttributeTypeFullnames=[optional, Full type name list for custom attributes which you want remove.]
   Example 1, protect d:\a.dll ,this will modify dll file.
      >JIEJIE.NET.exe d:\a.dll  
   Exmaple 2, anlyse d:\a.dll , and write result to another dll file with strong name. enable obfuscate control flow and not encript resources.
      >JIEJIE.NET.exe input=d:\a.dll output=d:\publish\a.dll snk=d:\source\company.snk switch=+contorlfow,-resources

License

JieJie.NET use GPL-2.0 License.


JIEJIE.NET can save tens of thousands of US dollars for your team. so you can donate by paypal , by alipay , by Wechat,help author to feed twins born in 2020.
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.

简介

暂无描述 展开 收起
C# 等 2 种语言
GPL-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mailshichao/JIEJIE.NET.git
git@gitee.com:mailshichao/JIEJIE.NET.git
mailshichao
JIEJIE.NET
JIEJIE.NET
main

搜索帮助