Code Obfuscation

  • Thread starter Thread starter Russell Stevens
  • Start date Start date
R

Russell Stevens

I am binding a combo box to an arraylist with code such as

ComboBox(0).DataSource = TheArrayList
ComboBox(0).DisplayMember = "Text"
ComboBox(0).ValueMember = "Tag"
ComboBox(0).DataBindings.Add(New Binding("SelectedValue", dt, "DiscCat ID"))

Works fine on my development computer and on any other computer using the
raw exe file. However, after I obfuscate the code with the included
community edition (latest version available 1.2.1269), the above code
crashes with an error such as

"Could not bind to the new display member.
New Parameter name: newDisplayMember"

My app is shipping. To fix I either need to ship unobfuscated code or get a
fix from Preemptive Solutions for the community edition. It appears to be
impossible to get tech support - I can't even figure out how to report the
problem to them. I guess you have to buy the professional edition to get
support, but as far as I can tell, it probably doesn't work either.

I suspect the problem has something to do with the late binding I am trying
to do. Any suggestions on how to work around the problem or get Preemptive's
attention to tell them their product doesn't work.

Thanks
Russ Stevens
 
Russ,

You are hitting the wall that all current obfuscators
share in common - in theory obfusactors can not guarantee
runtime integrity. So you have to do manual configuration.

Find that type of TheArrayList element, and then preserve
those two properties: "Text", "Tag"

These two members must not be obfuscated, otherwise the
obfuscated code won't run. Different obfuscators have
different mechanism to preserve symbols.

I am the author of the salamander .NET obfuscator,

http://www.remotesoft.com/salamander/obfuscator.html
(free eval download is available, no registration, no exp
date)

and I fully believe the current way of doing obfuscation
is not right, it is way too time-consuming.

Hope this is useful,

Huihong
-----Original Message-----
I am binding a combo box to an arraylist with code such as

ComboBox(0).DataSource = TheArrayList
ComboBox(0).DisplayMember = "Text"
ComboBox(0).ValueMember = "Tag"
ComboBox(0).DataBindings.Add(New Binding
("SelectedValue", dt, "DiscCat ID"))
 
Huihong,

Thank you for the feedback - I can probably find a way to fix this one
error - what scares me is how many more there may be that I am not even
aware of.

Thanks
Russ Stevens
 
Russ,

I forgot one thing, you will have to also preserve the
type of those properties from obfuscation.

You can take a look of my documentation on some runtime
problems,

http://www.remotesoft.com/salamander/obfuscator/manual/ind
ex.html#advanced_topics

You are 100% right, .NET uses lots of reflections
implicitly, e.g., data binding, serialization, remoting,
etc. Even this simple API: Application.ProductName
requires complicated configuration.

When this level of configuration is used, the UI needs to
be very easy to use, and source level debugging should be
available once exception is thrown. Our obfuscator
supports souce level debugging, e.g., the line # info is
not changed when the obfuscated image is used for
debugging, varibles can be watched, etc.

Huihong
 
Back
Top