Jump to content

I broke the obfuscator :(


Morthawt
 Share

Recommended Posts

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$tester = Tester
$tester()

Func Tester()
    MsgBox(0, 0, FuncName($tester))
EndFunc   ;==>Tester

This works fine if you run it in scite editor, however if you compile it, you get an error "Unknown function name". I figured since functions are all renamed it would be interesting to have the program show the current (obfuscated) name of the function the message box is running in, but when I try and use a variablized function while obfuscated it just crashes.

Link to comment
Share on other sites

Ah, I guess I need to wait for an update then. I figured I would give it a test drive since apparently this new change to functions is supposed to not cause as many issues for obfuscation.

Link to comment
Share on other sites

  • Developers

I currently have no plans to support this new functionality in obfuscator other than the /striponly functionality of obfuscator.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I find that a bit strange considering on Melba23's post:  they mentioned one of the benefits basically is that it will not cause issues for the obfuscator and gave an example. I just took his exact example of the better newer way of doing it and tried to obfuscate it and had the same issue I had with my basic test script. Surely new functionality should be accommodated for with the obfuscator? Because otherwise not only would the obfuscator be useless with the new coding features, it would basically make the updates to Autoit's language pointless because if you adopt the new additions to your coding you can never protect your code like you could before.

Link to comment
Share on other sites

The obfuscation doesn't protect code.

Then I read much of "should" and "would", but please realize that noone here, DEVs & JON included, owe you anything.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Moderators

Morthawt,

 

Surely new functionality should be accommodated for with the obfuscator?

What an arrogant attitude! :mad:

Jos maintains Obfuscator and it is completely separate from AutoIt proper. It is entirely up to him, and him alone, to decide whether he is prepared to update it to meet any changes in AutoIt. I would point out that Jos has previously said that Obfuscator in its current form may well soon become deprecated and only certain functionalities retained for future versions - as was hinted at in his reply above. ;)

As to my remark, it related to the "StripOnly" function of Obfuscator (which is the only part I ever use) and the understandable problem it has with Call - which is avoided by using the new syntax. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I apologise if I came off as arrogant to you, I am just saying since I installed Autoit and Scite editor I would think that everything it comes with is compatible with all the new technology in the language, thats all. I did not know anything was "separate".

Link to comment
Share on other sites

Thanks. I am trying to figure out if there is any manual way I can tweak the obfuscated code to fix that one error. I think all it would take is changing the $var = ThisFunctionName and replacing it with what ever the obfuscator's random name has replaced ThisFunctionName but I, obviously, have no clue what the new name is lol and for decent sized scripts you would be there till the end of time if that is the only non-automatic way.

Link to comment
Share on other sites

This is my work around:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$originalname = FunctionHere
$originalname()
Func FunctionHere($FuncName = 'Func:FunctionHere')
    MsgBox(0,0, FuncName($originalname))
EndFunc   ;==>FunctionHere

Before you obfuscate, any functions that you are calling via a variable, add an optional parameter at the end of the function that defines the original name of the function, as shown in the example above for the function called FunctionHere and then compile your obfuscated source bypassing all errors. Then edit the post-obfuscation source file that was created and find the untouched statements like $A2700202217 = FunctionHere and do a search for that FunctionHere part and find the original name from the optional parameter. Then rename the FunctionHere part from the $A2700202217 = FunctionHere part and remove the optional parameter that has the name of the function. Then compile the obfuscated source with no further changes and the compiled exe works fine in my test.

Link to comment
Share on other sites

  • Developers

What about adding this line to your original script? Does that work?

#ignorefunc tester

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

What about adding this line to your original script? Does that work?

#ignorefunc tester

Jos

In the sense of letting the script work yes it does work, however the function name is unaltered and would then just need a manual search/replace of the function names with something similarly random as what the obfuscator would produce.

Link to comment
Share on other sites

  • Developers

In the sense of letting the script work yes it does work, however the function name is unaltered and would then just need a manual search/replace of the function names with something similarly random as what the obfuscator would produce.

.. and your point is? security or something?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Well in terms of preserving the same randomness that is performed elsewhere, you would have to then just copy the name of the unchanged function name and replace it everywhere in the script in one go with some randomness, thats it.

Edited by Morthawt
Link to comment
Share on other sites

  • Developers

I seriously think you have a false sense of source protection with Obuscator. All it does is make your script pretty unreadable but let it be clear that it is possible to make it reasonable readable again. Agree you can't restore the original FuncNames and VarNames... but that is it, the reset can be undone.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Please give the current Beta version a try. It should now both support /StripOnly and Obfuscation for this way of Func notations, as both functions are using the same functionality in the program.

 

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...