This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
747 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Collections.Generic; | ||
using System.Windows.Forms; | ||
|
||
namespace NetRenamer | ||
{ | ||
internal class List | ||
{ | ||
public static string WaterMark = "NetRenamer"; | ||
public static List<CheckedListBox> tcb = new List<CheckedListBox>(); | ||
public static bool renameClasses = false; | ||
|
||
public static bool watermark = false; | ||
// config file here later -_- | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AsmResolver.DotNet" Version="4.7.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Compile Update="UI\Form1.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
</Project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace NetRenamer | ||
{ | ||
internal static class Program | ||
{ | ||
[STAThread] | ||
private static void Main() | ||
{ | ||
ApplicationConfiguration.Initialize(); | ||
Application.Run(new Form1()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
# NetRenamer | ||
Simple tool to obfuscate/rename .NET module's methods, fields, classes and more using AsmResolver. | ||
# NetRenamer | ||
Simple tool to obfuscate/rename .NET module's methods, fields, classes and more using [AsmResolver](https://github.com/Washi1337/AsmResolver). | ||
|
||
# Features | ||
- Rename Methods, Fields, Properties, Events, Classes. | ||
- Change Module's name and version. | ||
- Add custom watermark to renaming. | ||
- Exclude specific types to not rename. | ||
|
||
# UI | ||
![image](./Preview/HrrsOx88q.png) | ||
|
||
# Credits | ||
- [AsmResolver](https://github.com/Washi1337/AsmResolver) - (Washi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
using System; | ||
using System.Linq; | ||
using AsmResolver.DotNet; | ||
|
||
namespace NetRenamer | ||
{ | ||
internal class Rename | ||
{ | ||
private static readonly Random random = new Random(); | ||
|
||
public static string RandomString(int length) | ||
{ | ||
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ||
const string nums = "0123456789"; | ||
const string foreign = | ||
"䂥䂀䂁䂀䂀䁿䁾䁽䂌䂋䂎䃞䃝䃜䃛䃫䃬䃮䃰䃱䃲䃳䃴䃵䃶䃷䃸䃹䃺䃪䃩䃙䄣䄢䄡䄠䄟䒐䒏䒎䒍䒌䒋䑬䑽䑼䑾䒀䒂䑳䄞䄝䄜䄛䄋䃻䃫䃬䃭䃮䃯䃰䃱䃲䃳䃴䃵䃶䃷䃸䃹䃺䆴䇀䇁䆱䇟䇮䇯䇱䇝䇜䇍䉶䉱䉲䉢䉣䊃䊅䊖䊦䊥䊐䊞䊟䌵䌴䌳䍦䍥䍷䍷䍹"; | ||
const string special = | ||
"ƀƁƂƄƅƆƈƉƋƍƎƏƐƑƒƓƔƕƖƗƘƙƜƛơƣƥƪƩƱƲƳƴǍǎǢǣǤǥǭȄȜȞȣȮփռպֆӸӂҿҧͲͳʹͶͷͻͼͽΆΙΘΗΖΕΔΓΒΑΐΏΎΌΉΈΛάέήίΰαβϡϠϝϞϜϛϦФЯЮПЎЍЌЫЬЭЮйЩШЙЉЊϪϚѤѬѭѮѰѹ҈҉ҘѾүҾӁ"; | ||
|
||
return List.watermark | ||
? List.WaterMark + new string(Enumerable.Repeat(foreign, length) | ||
.Select(s => s[random.Next(s.Length)]).ToArray()) | ||
: new string(Enumerable.Repeat(foreign, length) | ||
.Select(s => s[random.Next(s.Length)]).ToArray()); | ||
} | ||
|
||
public static void rename(ModuleDefinition module) | ||
{ | ||
foreach (var type in module.GetAllTypes()) | ||
{ | ||
foreach (var method in type.Methods) | ||
{ | ||
foreach (var obj in List.tcb.ElementAt(0).CheckedItems) | ||
{ | ||
if (obj.ToString() == method.FullName) | ||
method.Name = RandomString(22); | ||
} | ||
} | ||
|
||
foreach (var field in type.Fields) | ||
{ | ||
foreach (var obj in List.tcb.ElementAt(1).CheckedItems) | ||
{ | ||
if (obj.ToString() == field.FullName) | ||
field.Name = RandomString(22); | ||
} | ||
} | ||
|
||
foreach (var property in type.Fields) | ||
{ | ||
foreach (var obj in List.tcb.ElementAt(2).CheckedItems) | ||
{ | ||
if (obj.ToString() == property.FullName) | ||
property.Name = RandomString(22); | ||
} | ||
} | ||
|
||
foreach (var eventt in type.Events) | ||
{ | ||
foreach (var obj in List.tcb.ElementAt(3).CheckedItems) | ||
{ | ||
if (obj.ToString() == eventt.FullName) | ||
eventt.Name = RandomString(22); | ||
} | ||
} | ||
|
||
if (type.IsClass && List.renameClasses) | ||
type.Name = RandomString(22); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Linq; | ||
|
||
namespace NetRenamer.Selection | ||
{ | ||
internal class deselect | ||
{ | ||
public static void all() | ||
{ | ||
for (int i = 0; i < 4; i++) | ||
{ | ||
for (int j = 0; j < List.tcb.ElementAt(i).Items.Count; j++) | ||
{ | ||
List.tcb.ElementAt(i).SetItemChecked(j, false); | ||
} | ||
} | ||
} | ||
|
||
public static void current(int selectedtab) | ||
{ | ||
for (int i = 0; i < List.tcb.ElementAt(selectedtab).Items.Count; i++) | ||
{ | ||
List.tcb.ElementAt(selectedtab).SetItemChecked(i, false); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Linq; | ||
|
||
namespace NetRenamer.Selection | ||
{ | ||
internal class select | ||
{ | ||
public static void all() | ||
{ | ||
for (int i = 0; i < 4; i++) | ||
{ | ||
for (int j = 0; j < List.tcb.ElementAt(i).Items.Count; j++) | ||
{ | ||
List.tcb.ElementAt(i).SetItemChecked(j, true); | ||
} | ||
} | ||
} | ||
|
||
public static void current(int selectedtab) | ||
{ | ||
for (int i = 0; i < List.tcb.ElementAt(selectedtab).Items.Count; i++) | ||
{ | ||
List.tcb.ElementAt(selectedtab).SetItemChecked(i, true); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.