﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2524	#Obfuscator_Parameters=/mo - issue and script line on AutoIt Error message	mlipok	Jos	"Pseudo repro code:

{{{
#AutoIt3Wrapper_Run_Obfuscator=Y
#Obfuscator_Parameters=/mo

;~ #include <ie.au3>
Global _; Com Error Handler Status Strings
		$IEComErrorNumber, _
		$IEComErrorNumberHex, _
		$IEComErrorDescription, _
		$IEComErrorScriptline, _
		$IEComErrorWinDescription, _
		$IEComErrorSource, _
		$IEComErrorHelpFile, _
		$IEComErrorHelpContext, _
		$IEComErrorLastDllError, _
		$IEComErrorComObj, _
		$IEComErrorOutput

Local $aTest
$sInfo = _
		'test1' & @CRLF & _
		'TEST2'


ConsoleWrite($aTest[2])
$sInfo2 = _
		'test1' & @CRLF & _
		'TEST2'


}}}


now 
#Obfuscator_Parameters=/mo
create that something


{{{
Global _
		$IEComErrorNumber, $IEComErrorNumberHex, $IEComErrorDescription, $IEComErrorScriptline, $IEComErrorWinDescription, $IEComErrorSource, $IEComErrorHelpFile, $IEComErrorHelpContext, $IEComErrorLastDllError, $IEComErrorComObj, $IEComErrorOutput
Local $aTest
$sInfo = 'test1' & @CRLF & 'TEST2'
ConsoleWrite($aTest[2])
$sInfo2 = 'test1' & @CRLF & 'TEST2'

}}}




but Obfuscator.exe should generate code in this way:


{{{
Global $IEComErrorNumber, $IEComErrorNumberHex, $IEComErrorDescription, $IEComErrorScriptline, $IEComErrorWinDescription, $IEComErrorSource, $IEComErrorHelpFile, $IEComErrorHelpContext, $IEComErrorLastDllError, $IEComErrorComObj, $IEComErrorOutput
Local $aTest
$sInfo = 'test1' & @CRLF & 'TEST2'
ConsoleWrite($aTest[2])
$sInfo2 = 'test1' & @CRLF & 'TEST2'
}}}


SUMMARY:
These scripts are only examples - that is an easy way to show where the problem is.
But in order to show the result of the problem, I will present a different example:

Try to compile this
{{{
#AutoIt3Wrapper_Run_Obfuscator=Y
#Obfuscator_Parameters=/mo
#include <ie.au3>
Local $aTest
ConsoleWrite($aTest[2])
}}}

Run that exe file.

and you got something like this:

{{{
AutoIt Error
OK
Line 2573  (File ""L:\TEST_obfuscator_3.exe""):

Error: Subscript used with non-Array variable.

}}}

but this is not true - I mean the correct line is 2577.

When you look to obfuscated file, then you see that the problem is in:


{{{
Global _
$IEComErrorNumber, 		$IEComErrorNumberHex, 		$IEComErrorDescription, 		$IEComErrorScriptline, 		$IEComErrorWinDescription, 		$IEComErrorSource, 		$IEComErrorHelpFile, 		$IEComErrorHelpContext, 		$IEComErrorLastDllError, 		$IEComErrorComObj, 		$IEComErrorOutput
Global Enum _
$_IEStatus_Success = 0, 		$_IEStatus_GeneralError, 		$_IEStatus_ComError, 		$_IEStatus_InvalidDataType, 		$_IEStatus_InvalidObjectType, 		$_IEStatus_InvalidValue, 		$_IEStatus_LoadWaitTimeout, 		$_IEStatus_NoMatch, 		$_IEStatus_AccessIsDenied, 		$_IEStatus_ClientDisconnected
Global Enum Step * 2 _
$_IENotifyLevel_None = 0, 		$_IENotifyNotifyLevel_Warning = 1, 		$_IENotifyNotifyLevel_Error, 		$_IENotifyNotifyLevel_ComError
Global Enum Step * 2 _
$_IENotifyMethod_Silent = 0, 		$_IENotifyMethod_Console = 1, 		$_IENotifyMethod_ToolTip, 		$_IENotifyMethod_MsgBox

}}}

I mean:

{{{
Global _
Global Enum _
Global Enum Step * 2 _
Global Enum Step * 2 _
}}}

"	Bug	closed		SciTE4AutoIt	Other	None	Fixed		
