Sign in to follow this  
Followers 0
MariusN

[solved!] Obfuscating errors

7 posts in this topic

#1 ·  Posted (edited)

When i want to compile my "exe" with the Obfuscator and command /striponly, i get the following error (I'm rinning XP PRO SP3)

---> ERROR: D:\Programming\MyScripts\RegPermissions\RegPermissions_Obfuscated.au3(57,46) : ERROR: MsgBoxHookDeRegister(): undefined function.

OnAutoItExitUnregister("MsgBoxHookDeRegister")

...a "bug" maybe?

Edited by MariusN

Share this post


Link to post
Share on other sites



...a "bug" maybe?

A little bit more info maybe? :unsure:

It would help when you provide:

- current used obfuscator version

- small script showing the problem

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

A little bit more info maybe? :unsure:

It would help when you provide:

- current used obfuscator version

- small script showing the problem

Jos

Hi Jos...

Seems i have found the problem...I was using a member's ---> CustomMsgBox.au3

the following function was in it ---> OnAutoItExitUnregister("MsgBoxHookDeRegister")

All i did was removing the "OnAutoItExitUnregister" ...now everything is working fine....thanks :-)

Share this post


Link to post
Share on other sites

Obfuscator has trouble recognising functions that are called through Call, GUIRegisterMsg etc. (More complete list here) I guess it's because the parameter passed to these functions could be a variable and as such is not necessarily known at compile time.

If the function is never called in the "usual" way, obfuscator believes it is unused and removes the function if /striponly is used. When you then try to call the function it's obviously not there.

I imagine the author of the UDF included the function for a reason, so I wouldn't advise removing it.

There are two ways of fixing this, that will not mess with the functionality of the script. The first is to add the problematic functions to the obfuscator exception list like this:

#Obfuscator_Ignore_Funcs=MsgBoxHookDeRegister

I suspect this is usable for you, but it leaves the function unobfuscated.

If it is important that the function is obfuscated you just need to reference it in the usual way, without actually calling it like this:

If False Then MsgBoxHookDeRegister() ;might need to feed some parameters to avoid warnings.

Share this post


Link to post
Share on other sites

Looks like this func was missing in obfuscator.dat so that could very well been the real issue.

I have uploaded an updated version to the Beta directory for testing.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

...thanks for the info Jos and Tvern...

Share this post


Link to post
Share on other sites

Looks like this func was missing in obfuscator.dat so that could very well been the real issue.

I have uploaded an updated version to the Beta directory for testing.

Jos

I have replaced my old obfuscator.dat with the new one...seems to work 100%...thanks Jos :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0