Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.net dictionary object type

I'm trying to use a dll on my system. One of the methods return a dictionary object defined in the object browser as

"System.Collections.Generic.Dictionary<<string,1.5>>"

What is 1.5? Or is that some security mechanism to lock the dll from unintended use?

like image 744
Fredrik L Avatar asked Dec 21 '25 02:12

Fredrik L


1 Answers

"1.5" is not a valid type name in any common .NET language, they insist you start a type name with a letter. Important to make the job of a lexer simple, the part of the compiler that preprocesses the source code into tokens before the program is parsed. A lexer will identify "1.5" as a number, not an identifier.

The CLR has much more lax rules about that however, just about anything goes for a type name. This is taken advantage of by obfuscators. A program that you run after building an assembly that makes it difficult to reverse-engineer the source code from the assembly. There are several very good decompilers available for .NET, like Reflector and ILSpy. An obfuscator is designed to defeat them.

High odds that the assembly you are using was obfuscated.

like image 196
Hans Passant Avatar answered Dec 23 '25 17:12

Hans Passant