Quantcast
Channel: Obfuscar, The Open Source Obfuscation Tool for .NET Assemblies
Viewing all 249 articles
Browse latest View live

Updated Wiki: Basic Example

$
0
0
There is a basic example project included in the code base. To build and obfuscate the BasicExample, get the source from Git, navigate to the BasicExample path, and run "msbuild release.proj".

example.png

The example consists of a solution that includes and executable and a dll. The test.bat script builds the solution, copies the output to a temporary input path. The files are then obfuscated into a temporary output path. After obfuscation, the files are copied along with the map file to their final output path.

The reason for this indirection is safety. The release process should be as follows:
  1. Files that will not be obfuscated should be copied directly to the final output path.
  2. Files to be obfuscated should be copied to a temporary location (Obfuscator_Input, in the example), along with their dependencies.
  3. Files to be obfuscated should be obfuscated from the first location (Obfuscator_Input) to a different location (Obfuscator_Output, in the example).
  4. Obfuscated files should be copied from the obfuscation output location (Obfuscator_Output) to the final output path.
  5. Package files in final output path (beyond the scope of this document ;)

In the event that the obfuscator fails, an in-place obfuscation could allow files to enter the release without being obfuscated. Having the obfuscator explicitly save to a different location and using files from that location means that failure results in missing files.

Created Unassigned: The zip file doesnt have complete solution [34]

$
0
0
There are items missing from the zip file. Also the Example solution is incomplete.

Created Unassigned: 'System.Reflection.ReflectionTypeLoadException' when calling Assembly::GetTypes() [35]

$
0
0
Hi. I'm getting 'System.Reflection.ReflectionTypeLoadException' when runnning this code:

Code:
```
var dll = AppDomain.CurrentDomain.GetAssemblies().OrderBy(o => o.FullName);
var types = dll
.SelectMany(o => o.GetTypes())
.Where(t => typeof(ISomeiface).IsAssignableFrom(t))
.Where(t => !t.IsAbstract)
.Where(t => !t.IsInterface)
.Where(t => t.GetConstructor(new Type[] { }) != null);
```

Commented Unassigned: The zip file doesnt have complete solution [34]

$
0
0
There are items missing from the zip file. Also the Example solution is incomplete.
Comments: Which ZIP are you referring to? To see the example, you should clone the whole GitHub repo (with submodule if you want to compile the source code).

Edited Unassigned: The zip file doesnt have complete solution [34]

$
0
0
There are items missing from the zip file. Also the Example solution is incomplete.

Commented Unassigned: 'System.Reflection.ReflectionTypeLoadException' when calling Assembly::GetTypes() [35]

$
0
0
Hi. I'm getting 'System.Reflection.ReflectionTypeLoadException' when runnning this code:

Code:
```
var dll = AppDomain.CurrentDomain.GetAssemblies().OrderBy(o => o.FullName);
var types = dll
.SelectMany(o => o.GetTypes())
.Where(t => typeof(ISomeiface).IsAssignableFrom(t))
.Where(t => !t.IsAbstract)
.Where(t => !t.IsInterface)
.Where(t => t.GetConstructor(new Type[] { }) != null);
```
Comments: Can you show how this code snippet triggers the exception and how this exception is related to Obfuscar?

Edited Unassigned: 'System.Reflection.ReflectionTypeLoadException' when calling Assembly::GetTypes() [35]

$
0
0
Hi. I'm getting 'System.Reflection.ReflectionTypeLoadException' when runnning this code:

Code:
```
var dll = AppDomain.CurrentDomain.GetAssemblies().OrderBy(o => o.FullName);
var types = dll
.SelectMany(o => o.GetTypes())
.Where(t => typeof(ISomeiface).IsAssignableFrom(t))
.Where(t => !t.IsAbstract)
.Where(t => !t.IsInterface)
.Where(t => t.GetConstructor(new Type[] { }) != null);
```

Created Unassigned: Item has already been added. Key in dictionary: 'A' Key being added : 'a' [36]

$
0
0
Hello
This is a .net 4.0 windows form project.
When i press login button , i get an exception:
The type initializer for "Tacirler_Earsiv.Genel" threw an exception

In the inner exception says:
Item has already been added. Key in dictionary: 'A' Key being added : 'a'

"Genel" class is very simple and short. It has a few static properties. I just assign userName and userId info to its properties.

Do you have any idea?
I have attach mapping.txt, obfuscar.xml and Genel.cs.


Commented Unassigned: Item has already been added. Key in dictionary: 'A' Key being added : 'a' [36]

$
0
0
Hello
This is a .net 4.0 windows form project.
When i press login button , i get an exception:
The type initializer for "Tacirler_Earsiv.Genel" threw an exception

In the inner exception says:
Item has already been added. Key in dictionary: 'A' Key being added : 'a'

"Genel" class is very simple and short. It has a few static properties. I just assign userName and userId info to its properties.

Do you have any idea?
I have attach mapping.txt, obfuscar.xml and Genel.cs.

Comments: Thanks for the report. Will investigate and get back here.

Commented Unassigned: Item has already been added. Key in dictionary: 'A' Key being added : 'a' [36]

$
0
0
Hello
This is a .net 4.0 windows form project.
When i press login button , i get an exception:
The type initializer for "Tacirler_Earsiv.Genel" threw an exception

In the inner exception says:
Item has already been added. Key in dictionary: 'A' Key being added : 'a'

"Genel" class is very simple and short. It has a few static properties. I just assign userName and userId info to its properties.

Do you have any idea?
I have attach mapping.txt, obfuscar.xml and Genel.cs.

Comments: I could not reproduce this issue with the information you provided. Hope that you can share more data by sending them to my mail box support@lextm.com

Released: 2.2.1 (Jul 16, 2016)

Created Release: 2.2.1 (Jul 16, 2016)

Commented Unassigned: Item has already been added. Key in dictionary: 'A' Key being added : 'a' [36]

$
0
0
Hello
This is a .net 4.0 windows form project.
When i press login button , i get an exception:
The type initializer for "Tacirler_Earsiv.Genel" threw an exception

In the inner exception says:
Item has already been added. Key in dictionary: 'A' Key being added : 'a'

"Genel" class is very simple and short. It has a few static properties. I just assign userName and userId info to its properties.

Do you have any idea?
I have attach mapping.txt, obfuscar.xml and Genel.cs.

Comments: I have sent you an email. It contains my sample project. Thank you.

Commented Unassigned: Item has already been added. Key in dictionary: 'A' Key being added : 'a' [36]

$
0
0
Hello
This is a .net 4.0 windows form project.
When i press login button , i get an exception:
The type initializer for "Tacirler_Earsiv.Genel" threw an exception

In the inner exception says:
Item has already been added. Key in dictionary: 'A' Key being added : 'a'

"Genel" class is very simple and short. It has a few static properties. I just assign userName and userId info to its properties.

Do you have any idea?
I have attach mapping.txt, obfuscar.xml and Genel.cs.

Comments: Now this issue can be reproduced. Initial analysis shows that it only happens if the project uses a `ApplicationSettingsBase` derived `Settings` class. Will do more investigation. A workaround is to add a skip rule, such as <SkipType name="Tacirler_Earsiv_Obfuscar.Properties.Settings" skipProperties="true" />

Commented Unassigned: Item has already been added. Key in dictionary: 'A' Key being added : 'a' [36]

$
0
0
Hello
This is a .net 4.0 windows form project.
When i press login button , i get an exception:
The type initializer for "Tacirler_Earsiv.Genel" threw an exception

In the inner exception says:
Item has already been added. Key in dictionary: 'A' Key being added : 'a'

"Genel" class is very simple and short. It has a few static properties. I just assign userName and userId info to its properties.

Do you have any idea?
I have attach mapping.txt, obfuscar.xml and Genel.cs.

Comments: Another rule to use is, ``` <SkipProperty type="Tacirler_Earsiv_Obfuscar.Properties.Settings" rx="." /> ```

Reviewed: 2.2.1 (sep. 01, 2016)

$
0
0
Rated 5 Stars (out of 5) - googd googdgoogdgoogdgoogd

Commented Unassigned: 'System.Reflection.ReflectionTypeLoadException' when calling Assembly::GetTypes() [35]

$
0
0
Hi. I'm getting 'System.Reflection.ReflectionTypeLoadException' when runnning this code:

Code:
```
var dll = AppDomain.CurrentDomain.GetAssemblies().OrderBy(o => o.FullName);
var types = dll
.SelectMany(o => o.GetTypes())
.Where(t => typeof(ISomeiface).IsAssignableFrom(t))
.Where(t => !t.IsAbstract)
.Where(t => !t.IsInterface)
.Where(t => t.GetConstructor(new Type[] { }) != null);
```
Comments: Temp close.

Closed Unassigned: 'System.Reflection.ReflectionTypeLoadException' when calling Assembly::GetTypes() [35]

$
0
0
Hi. I'm getting 'System.Reflection.ReflectionTypeLoadException' when runnning this code:

Code:
```
var dll = AppDomain.CurrentDomain.GetAssemblies().OrderBy(o => o.FullName);
var types = dll
.SelectMany(o => o.GetTypes())
.Where(t => typeof(ISomeiface).IsAssignableFrom(t))
.Where(t => !t.IsAbstract)
.Where(t => !t.IsInterface)
.Where(t => t.GetConstructor(new Type[] { }) != null);
```

Created Unassigned: Code doesn't have baml files [37]

$
0
0
The only files in the baml project are properties/assemblyInfo.cs, helper.cs and packages.config.

I used

git log -- *BamlBinaryReader.cs

to look for the file, but it was nowhere in the history either. Where does it come from?

The csproj file is looking in the ilspy folder, but that's empty.

Commented Unassigned: Code doesn't have baml files [37]

$
0
0
The only files in the baml project are properties/assemblyInfo.cs, helper.cs and packages.config.

I used

git log -- *BamlBinaryReader.cs

to look for the file, but it was nowhere in the history either. Where does it come from?

The csproj file is looking in the ilspy folder, but that's empty.
Comments: The Git repo of this project has a submodule of ILSpy. You have to check out that submodule before compiling the code base.
Viewing all 249 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>