AxDSan / obfuscar

Automatically exported from code.google.com/p/obfuscar
0 stars 0 forks source link

I cant find how to DISABLE resources obfuscation #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
v1.5.2

Original issue reported on code.google.com by pipisc...@gmail.com on 16 Feb 2010 at 8:58

GoogleCodeExporter commented 9 years ago
Obfuscar only renames a resource, if its name starts with the same name as an
obfuscated type does. This is for resources associated with a certain type. 
(e.g.
WinForms dialogs and controls)

If you encounter a problem with this behavior, there are two ways to work 
around it:
1. Give your resource a name other than an existing type.
2. Do not reference the resource by an hard-coded string, but determine the 
resource
name during runtime. (e.g. something like "typeof(MyType).Name")

Original comment by webbi...@gmail.com on 17 Feb 2010 at 10:37

GoogleCodeExporter commented 9 years ago
I cant change the name type belongs..

for example if I drag a TEST.PNG file to 'Solution Explorer' I show it as 
TEST.PNG
when the PRJ compiled, in resources come as RootNamespace.TEST.PNG

where RootNamespace = is the PRJ name (aka WindowsApplication1)

Original comment by pipisc...@gmail.com on 18 Feb 2010 at 7:27

GoogleCodeExporter commented 9 years ago
You can easily rename a resource file in the Solution Explorer by selecting it 
and
pressing F2 (or using 'rename' from the context menu).

Where do you reference/load the resource? If it is your own code (and not
designer-generated), just try the second method I described in my last comment.

Original comment by webbi...@gmail.com on 18 Feb 2010 at 10:43

GoogleCodeExporter commented 9 years ago
as I said 'I cant change the name type belongs..'

'You can easily rename a resource file in the Solution Explorer by selecting it 
and
pressing F2 (or using 'rename' from the context menu).'

==> I can change the 'TEST.PNG' nothing else!

Original comment by pipisc...@gmail.com on 18 Feb 2010 at 10:49

Attachments:

GoogleCodeExporter commented 9 years ago
this produce

Original comment by pipisc...@gmail.com on 18 Feb 2010 at 10:52

Attachments:

GoogleCodeExporter commented 9 years ago
I guess, I know where your problem actually comes from:

If there is a class "Name.Space.MyName" and a namespace starts with exactly the 
same
name, the following happens:
The class "Name.Space.MyName" is obfuscated to "A.A"
In the namespace there may exist a picture resource with the full name:
"Name.Space.MyName.Picture1.png".

Because Obfuscar does only a simple substring match on the resource name, the 
picture
is renamed to "A.A.Picture1.png". This is obviously not correct.

(The example you show in the screenshots should obfuscate correctly, because 
there is
no class "WindowsApplication1".)

I will fix this next week and maybe I will see into the chr(1)-chr(31) stuff.

Werner

Original comment by webbi...@gmail.com on 18 Feb 2010 at 1:41

GoogleCodeExporter commented 9 years ago

Original comment by webbi...@gmail.com on 1 Mar 2010 at 8:34