Jump to content

obfuscation errors,


Recommended Posts

Im trying to obfuscate a small part of my code (just 1 func). I used the #Obfuscator_Off just after the #AutoIt3Wrapper_Run_Obfuscator=y at the top and then at the top of the func i want obfuscated iv put a #Obfuscator_On and then at the bottom of this func iv put #Obfuscator_Off.

but when i run the obfuscate it creates all these "possibly used before declaration" & "undeclared global variable errors" ?

There are none of the "statement using unsolvable Func, which will/could lead to problems running your obfuscated script." kinda errors that i can see.

The variables its refiring have nothing to do with my code they have been created by the obfuscation.

>"E:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test.au3"
+>17:33:53 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000809  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0)  from:E:\Program Files (x86)\AutoIt3
+>17:33:54 AU3Check ended.rc:0
>Running Obfuscator (1.0.29.5)  from:E:\Program Files (x86)\AutoIt3\SciTE\Obfuscator cmdline:
+> Obfuscator v1.0.29.5 finished obfuscating 12741 lines, stripped 2 comment lines. created:E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3
>Running AU3Check for obfuscated file(1.54.22.0)  from:E:\Program Files (x86)\AutoIt3
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11359,29) : WARNING: $A2700400652: possibly used before declaration.
$A0300305748 = $A2700400652 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11359,106) : WARNING: $A1400801B29: possibly used before declaration.
$A0300305748 = $A2700400652 & Execute($A4900500D0D) & Execute($A5B00600E1B) & $A4C00703B24 & $A1400801B29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11363,28) : WARNING: $A3A10C05D22: possibly used before declaration.
$A0010B03327 = $A3A10C05D22
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11369,28) : WARNING: $A1D20D03602: possibly used before declaration.
$A5420C0225A = $A1D20D03602
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11370,446) : WARNING: $A1B40004445: possibly used before declaration.
$A0820E0600E = $A0A20F0262C & $A0010B03327 & Execute($A0030003F31) & $A4500904408 & Execute($A5830104C4C) & $A3B00D0154E & Execute($A2530200E50) & $A303030370B & Execute($A2930404910) & Execute($A253050491D) & Execute($A2330602A12) & Execute($A5730701C09) & $A1330806228 & Execute($A0630905055) & Execute($A5630A00E15) & Execute($A0630B0243F) & Execute($A3F30C0551A) & $A3230D03A2F & Execute($A1430E0193C) & Execute($A4C30F05C54) & $A1B40004445 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11359,29) : ERROR: $A2700400652: undeclared global variable.
$A0300305748 = $A2700400652 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11359,106) : ERROR: $A1400801B29: undeclared global variable.
$A0300305748 = $A2700400652 & Execute($A4900500D0D) & Execute($A5B00600E1B) & $A4C00703B24 & $A1400801B29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11363,28) : ERROR: $A3A10C05D22: undeclared global variable.
$A0010B03327 = $A3A10C05D22
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11369,28) : ERROR: $A1D20D03602: undeclared global variable.
$A5420C0225A = $A1D20D03602
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3(11370,446) : ERROR: $A1B40004445: undeclared global variable.
$A0820E0600E = $A0A20F0262C & $A0010B03327 & Execute($A0030003F31) & $A4500904408 & Execute($A5830104C4C) & $A3B00D0154E & Execute($A2530200E50) & $A303030370B & Execute($A2930404910) & Execute($A253050491D) & Execute($A2330602A12) & Execute($A5730701C09) & $A1330806228 & Execute($A0630905055) & Execute($A5630A00E15) & Execute($A0630B0243F) & Execute($A3F30C0551A) & $A3230D03A2F & Execute($A1430E0193C) & Execute($A4C30F05C54) & $A1B40004445 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3 - 5 error(s), 5 warning(s)
!>17:33:55 AU3Check Obfuscated code ended.rc:2
>Running:(3.3.8.0):E:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "E:\PROGRAMDATA7\MY Docs\Auto It\Speedtester\speedtester_139_obfus_test_Obfuscated.au3" /out "E:\PROGRAMDATA7\MY Docs\Auto It\JDAST pack\JDAutoSpeedTester.exe" /nopack /icon "..\JDAST pack\jdast_icon.ico" /comp 2
+>17:34:09 Aut2exe.exe ended.rc:0
>17:34:09 Performing the Program Resource Update steps:
...>Updating Program Version information.
...>Setting Program ExecutionLevel Manifest information to asInvoker
...>Updating Program Manifest information.
+>17:34:09 Program Resource updating finished successfully.rc:0
>Running:(3.7.0.0):E:\Program Files (x86)\AutoIt3\aut2exe\upx.exe" --best --compress-icons=0 -qq "E:\PROGRAMDATA7\MY Docs\Auto It\JDAST pack\JDAutoSpeedTester.exe"
    943282 ->   595634   63.14% win32/pe     JDAutoSpeedTester.exe
+>17:34:11 UPX Ended: rc:0
+>17:34:11 Created program:E:\PROGRAMDATA7\MY Docs\Auto It\JDAST pack\JDAutoSpeedTester.exe
>Exit code: 0   Time: 18.117

What am i missing here ?

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • Moderators

JackDinn,

Does the obfuscated code work? :oops:

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

heres what i get when i try to run it

>"E:Program Files (x86)AutoIt3SciTEAutoIt3WrapperAutoIt3Wrapper.exe" /prod /AU3Check /in "E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3"
+>17:55:30 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000809  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0)  from:E:Program Files (x86)AutoIt3
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11359,29) : WARNING: $A5F00404E5D: possibly used before declaration.
$A500030045C = $A5F00404E5D &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11359,106) : WARNING: $A3300800A63: possibly used before declaration.
$A500030045C = $A5F00404E5D & Execute($A3600502B41) & Execute($A4B00605216) & $A0F00703245 & $A3300800A63
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11363,28) : WARNING: $A1B10C0462F: possibly used before declaration.
$A5F10B02F3D = $A1B10C0462F
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11369,28) : WARNING: $A0D20D03B0B: possibly used before declaration.
$A0720C03E38 = $A0D20D03B0B
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11370,446) : WARNING: $A6140003546: possibly used before declaration.
$A1120E00D4C = $A5820F00419 & $A5F10B02F3D & Execute($A1330000505) & $A050090121D & Execute($A073010305B) & $A1900D0595D & Execute($A2D3020031E) & $A0930306158 & Execute($A1C30402B00) & Execute($A5230504A48) & Execute($A2530605836) & Execute($A3E3070173E) & $A3830803F1F & Execute($A1630906149) & Execute($A5D30A04735) & Execute($A5730B02B4D) & Execute($A5A30C00335) & $A4E30D02F35 & Execute($A4930E05446) & Execute($A3330F01A08) & $A6140003546 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11359,29) : ERROR: $A5F00404E5D: undeclared global variable.
$A500030045C = $A5F00404E5D &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11359,106) : ERROR: $A3300800A63: undeclared global variable.
$A500030045C = $A5F00404E5D & Execute($A3600502B41) & Execute($A4B00605216) & $A0F00703245 & $A3300800A63
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11363,28) : ERROR: $A1B10C0462F: undeclared global variable.
$A5F10B02F3D = $A1B10C0462F
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11369,28) : ERROR: $A0D20D03B0B: undeclared global variable.
$A0720C03E38 = $A0D20D03B0B
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3(11370,446) : ERROR: $A6140003546: undeclared global variable.
$A1120E00D4C = $A5820F00419 & $A5F10B02F3D & Execute($A1330000505) & $A050090121D & Execute($A073010305B) & $A1900D0595D & Execute($A2D3020031E) & $A0930306158 & Execute($A1C30402B00) & Execute($A5230504A48) & Execute($A2530605836) & Execute($A3E3070173E) & $A3830803F1F & Execute($A1630906149) & Execute($A5D30A04735) & Execute($A5730B02B4D) & Execute($A5A30C00335) & $A4E30D02F35 & Execute($A4930E05446) & Execute($A3330F01A08) & $A6140003546 &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:PROGRAMDATA7MY DocsAuto ItSpeedtesterspeedtester_139_obfus_test_Obfuscated.au3 - 5 error(s), 5 warning(s)
!>17:55:31 AU3Check ended.rc:2
>Exit code: 0   Time: 1.064

EDIT: and if i try to run the .exe created it runs but as soon as i try to "use" the obfuscated func it crashes :-/

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • Moderators

JackDinn,

Sorry - I misread the first error message you posted and did not realise that it had not compiled.

Although not an expert on Obfuscator I imagine that the variables referred to are Global variables accessed by the function. After obfuscation these variables have been renamed within the function and the new names are causing the errors. Why are you only obfuscating that one function and not the whole script? :oops:

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

Why are you only obfuscating that one function and not the whole script? :oops:

because i need to be able to get any crash error line numbers from the end users and match them up to my script so i can debug, if the whole script was obfuscated i could not even read it let alone debug it. but there are a couple of funcs that i do need obfuscated for privacy reasons but they never cause any problems for me to need to bebug.

Shall check out what your suggesting and see what i can se , thx.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

If the obfuscated section is using Global variables, put those global declarations before the #Obfuscator_Off section because if they're inside the unobfuscated part, they won't match to the obfuscated variable names.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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...