Sign in to follow this  
Followers 0
johnmcloud

Obfuscator / MouseOnEvent Incompatible

43 posts in this topic

#1 ·  Posted (edited)

Hi guys, this script:

#include <MouseOnEvent.au3> ;External UDF
#NoTrayIcon

Opt("WinTitleMatchMode", 2)

ShellExecute("notepad.exe")
Global $bPaused = 0
Global $Flag = True

While 1
If WinActive("[CLASS:Notepad]") And $Flag Then
_MouseSetOnEvent($MOUSE_WHEELDOWN_EVENT, "_WheelPressed", 0, 1)
$Flag = False
EndIf
If Not ProcessExists("notepad.exe") Then
_Exit()
EndIf
WEnd

Func _WheelPressed()
Send("Test")
EndFunc ;==>_Remapping_WHEELDOWN

Func _Exit()
Exit 0
EndFunc ;==>_Exit

You need

Work fine like .au3

Work fine like .exe

Not work if i'll try to obfuscate, this is the output:

-### Obfuscation Error: Found DllCallbackRegister() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: _Timer_SetTimer
C:\Programmi\AutoIt3\include\Timers.au3(275,1) Warning for line:$hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;int;uint_ptr;dword")
-### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: __MouseSetOnEvent_MainHandler
C:\Documents and Settings\XXX\Desktop\MouseOnEvent.au3(341,1) Warning for line:$iRet = Call($a__MSOE_Events[$i][1], $iEvent, $a__MSOE_Events[$i][4])
-### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: __MouseSetOnEvent_MainHandler
C:\Documents and Settings\XXX\Desktop\MouseOnEvent.au3(344,1) Warning for line:$iRet = Call($a__MSOE_Events[$i][1], $iEvent)
-### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: __MouseSetOnEvent_MainHandler
C:\Documents and Settings\XXX\Desktop\MouseOnEvent.au3(347,1) Warning for line:$iRet = Call($a__MSOE_Events[$i][1])
-#############################################################################################
-#### Obfuscator Found 4 Error(s)!!!! This means your script could have problems running properly. ####
-#############################################################################################
+> Obfuscator v1.0.29.5 finished obfuscating 4112 lines, stripped 7916 comment lines. created:C:\Documents and Settings\XXX\Desktop\TestScript_Obfuscated.au3

I don't know if it is a Obfuscator bug or a UDF bug, anyway there is a incompatibility between Obfuscator and MouseSetOnEvent

Solutions?

Thanks

Edited by Melba23
Changed title - it is not a "BUG"

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

No this is not a bug, the obfuscator can not find any direct call to these functions so it thinks that they are unsolvable.

I personaly do :

If Not 1 Then Call("_MyFunc") ;will never happend

Func _MyFunc()
;...
EndFunc

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

It's not a bug (please don't throw that word around for when something doesn't work), Jos has been very clear about this in the Obfusactor documentation/thread and the "error" lines are very clear at what is causing the output.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

So it's a UDF problem? I don't have any Call

It's not a bug (please don't throw that word around for when something doesn't work

For me Bug = something doesn't work as expected, but i can't write it in the tile :D

Edited by johnmcloud

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

So it's a UDF problem? I don't have any Call

The UDF you are using uses the Call function to trigger the one you defined (here for a mouse event which is _WheelPressed) Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Ok, i'll post this in the author's thread, about that problem/incompatibility or whatever we want to call it

Share this post


Link to post
Share on other sites

johnmcloud,

Bug = something doesn't work as expected, but i can't write it in the tile

Yes you can - and I just have. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

So it's a UDF problem? I don't have any Call

Did you not read the output?

This is the UDF which uses Call, it isn't yours. It can be eradicated/removed, but you would need to "heavily" change the UDF around so as not to use Call.

C:Documents and SettingsXXXDesktopMouseOnEvent.au3(344,1) Warning for line:$iRet = Call($a__MSOE_Events[$i][1], $iEvent)

I personally don't use this UDF. Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Melba,

I'll never use that word in this forum again, the thing that must not be named :D

I personally don't use this UDF

Do you have an alternative?

Edited by johnmcloud

Share this post


Link to post
Share on other sites

Create your own, it's what I did for one project (code is closed source.)

MrCreatorR uses Call for setting a function as a callback for when an event takes place. It's designed for users who don't want to get dirty with creating overly complex code in AutoIt. Therefore it's not "fixable" and posting in the UDF thread is a waste of time.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

guinness,

If i was able to create my own version i would have already done this by myself, i'm not a good coder for how much effort i can put in.

I have make a post i the MrCreatoR thread for make it aware if he don't know, if he want to "change it" and make it compatible with obfuscator good, else it's not a problem ;)

Share this post


Link to post
Share on other sites

Do my replies are blank ?


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Do my replies are blank ?

Mmm...not? :D

The UDF Call section is:

$iRet = Call($a__MSOE_Events[$i][1], $iEvent, $a__MSOE_Events[$i][4])
   If @error Then
    $iRet = Call($a__MSOE_Events[$i][1], $iEvent)
    If @error Then
     $iRet = Call($a__MSOE_Events[$i][1])
    EndIf
   EndIf

If i make:

If Not 1 Then $iRet = Call(etc.) The UDF not work anymore

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

guinness,

If i was able to create my own version i would have already done this by myself

In that case your question has been answered. Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

If i make:

If Not 1 Then $iRet = Call(etc.) The UDF not work anymore

That's not what I meant.

;this is the "unsolvable function"
If Not 1 Then Call("_WheelPressed")

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

FireFox,

Probably i'm totally stoned by this code, i need to change how my script call the UDF function? In any case, please post an example based on the first post, thank you.

Edited by johnmcloud

Share this post


Link to post
Share on other sites

FireFox is showing you the usage of Call and that the output displayed by Obfuscator is normal, as the reason they described.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

FireFox,

Probably i'm totally stoned by this code, i need to change how my script call the UDF function? In any case, please post an example based on the first post, thank you.

I have said this before to others:

Maybe you should consider not using obfuscator when you don't understand what the limitation are and the warnings/Errors mean as you will end up with a crippled script.

You'll slowly need to get used to the fact I am going to drop support on the Obfuscation part. I am considering supporting the stripping functionality depending on the changes Jon applies to the syntax.

Jos


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

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

Although it's not entirely related, I have been trying to figure out my own obfuscation technique for a particular script. I got inspiration from Jos' program, but my script uses some functions that are not intended to be combined with obfuscator. In all it's turning out to be quite a task, but very revealing. Thanks Jos for the inspiration.

BTW, one technique I'm trying is refactorizing magic numbers and wrapping them in bitwise functions. My main idea is to make it as annoying as possible. :)

EDIT

Actually refactorizing isn't quite the word I'm looking for but it's close to what I mean. Something like BitOr(1, 2, 4, 8) could become BitOr(6, 9) or BitOr(7, 8) - makes no difference - etc. Well I think it's a good idea. Time will tell.

Edited by czardas

Share this post


Link to post
Share on other sites

I will explain how it works :

The obfuscator strips unused functions, in the UDF you have this variable :

$a__MSOE_Events[$i][1]

which calls your function, but how can the obfuscator know (only by the script) that it calls "_WheelPressed" ?

So, the obfuscator shows a warning because the function stored in this variable could be stripped.

Here is the "trick" included in your first post script :

#include <MouseOnEvent.au3> ;External UDF
#NoTrayIcon

Opt("WinTitleMatchMode", 2)

ShellExecute("notepad.exe")
Global $bPaused = 0
Global $Flag = True

While 1
If WinActive("[CLASS:Notepad]") And $Flag Then
_MouseSetOnEvent($MOUSE_WHEELDOWN_EVENT, "_WheelPressed", 0, 1)
$Flag = False
EndIf
If Not ProcessExists("notepad.exe") Then
_Exit()
EndIf
WEnd

If Not 1 Then _WheelPressed()
Func _WheelPressed()
Send("Test")
EndFunc   ;==>_WheelPressed

Func _Exit()
Exit 0
EndFunc   ;==>_Exit

As you can understand, there is a direct call to your function, so the obfuscator won't strip it AND the function won't be called because the test always equals to False. (If Not 1, If Not True etc... just an example).

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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

  • Similar Content

    • TheDcoder
      By TheDcoder
      Where can i find it ?
      TD
    • Jos
      By Jos
      1/22/2014: re-Uploaded a new SciTE4AutoIt3.exe installer with the new SciTE v3.3.7 release.
      This version contains a version of AutoIt3Wrapper and SciTEConfig which are recompiled with AutoIt3 v 3.3.10.2 to avoid te hardcrash with Athlon CPU's.
      There are a couple of major changes:
      - Updated our version of SciTE from 3.3.6 to 3.3.7
      - AutoIt3Wrapper will now use  "c:users<userName>AppdataLocalAutoit v3Aut2Exe" as Temp directory.
      - Updated syntax files.

      Enjoy,
      Jos


      Addition/Changes/Fixes in the current installer:
      -------------------------------------------------------------------------------------------------- 01/22/2014 *** Updated AutoIt3Wrapper v2.1.4.5 (Jos)     - Fixed issue with undecleared variable error when using /Versioning_Commit     - Recompiled with version 3.3.10.2 because 3.3.10.0 could give a hardcrash. *** Updated SciTEConfig v1.6.11.1 (Jos)     - Recompiled with version 3.3.10.2 because 3.3.10.0 could give a hardcrash. -------------------------------------------------------------------------------------------------- 12/29/2013 *** Fixed missing SciTEConfig in SciTE4AutoIt3 installer. -------------------------------------------------------------------------------------------------- 12/28/2013 *** Merged the updates of SciTE v 3.3.7 by Neil Hodgson with our own version of SciTE. (Jos) *** Updated Production config files to 3.3.10.0 *** Updated AutoIt3Wrapper v2.1.4.0 (Jos)     - Use "c:\users\<userName>\Appdata\Local\Autoit v3\Aut2Exe" as Temp directory for compiling and resource updating like aut2exe.     - Fixed issue with Compile both and Pragma(x64,true)     - Fixed inputfile in case Obfuscator needs to run but is skipped due to unsupported utf format.     - Fixed UPX selection option to default to N and adding the Directive when checkbox is checked. *** Updated Obfuscator.exe v1.0.31.1 (Jos)     - Changed the code to leave #include statements that include a a3x file. -------------------------------------------------------------------------------------------------- 11/14/2013 *** Merged the updates of SciTE v 3.3.6 by Neil Hodgson with our own version of SciTE. (Jos)     - Added check to avoid double shelling of the script via shortcuts of the tools menu items.     - Added Properties option to set the default encoding of new files:         NewFileEncoding=CodePage/UTF8/UTF8BOM/UTF16BE/UTF16LE     - Fixed issue in AU3 lexer to show the last correctly when the previous line is a commentline, commentblock, Special and Directives. *** Updated AutoIt3Wrapper v2.1.3.0 (Jos)     - Fixed issue where a tempfile was left behind when files was checked by au3check and UTF encoded.     - Added support for the #PRAGMA statement to avoid any conflicts. Warnings are now displayed in the Console output.     - Added SciTE version to the displayed info in the Console Output.     - Added #AutoIt3Wrapper_Res_Remove (wraithdu)     - Added File compression for Resource Files (wraithdu)         #AutoIt3Wrapper_Res_File_Add=%in%, 10, UNCOMPRESSED         #AutoIt3Wrapper_Res_File_Add=%in%, -10, COMPRESSED     - Updated option to change the TempDir in the INI file. Default changed to @UserProfileDir. (wraithdu)     - Fixed adding /Beta to the Obfuscator line when using the /Beta on the commandline of Autoit3wrapper.     - Fixed to ensure UPX is ran when needed.     - Fixed: Allow | in run_before and Run_After directives. *** Updated Tidy v2.4.0.0 (Jos)     - Added support for 3.3.9.x changes.     - Changed default EOF setting to add the CRLF. (End_With_NewLine=1)     - Fixed removal of spaces for new Var/Func notation     - Fixed crash caused by Function table load. *** Updated SciTEConfig v1.6.11.0     - Updates for Abbrev manager and User Calltip Manager (Melba23) *** Updated Obfuscator.exe v1.0.31.0 (Jos)     - Fixed ensure #pragma statements are not stripped.     - Fixed Regression internal code cleanup done before. The Obfuscation was broken     - Fixed #include logic for #Include not first checking the Directory where the file containing the include is located.     - Added check for max 4100 character record len without causing a crash. *** Added support for personal LUA functions. Look at "PersonalTools.lua" in your @UserProfileDir subdir for details. *** Updated SciTEJump to the latest version v2.13.103.227 (guinness) -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE/Scintilla updates.
      ==> Visit the SciTE4AutoIt3 Download page for the latest versions
      ==> Check the online documentation for an overview of all extra's you get with this installer.
       
    • mLipok
      By mLipok
      Can I use directives to AutoIt3Wrapper and Obfuscator in a include file ?
        For me it is important to me because I lead a lot of different projects and I would like everywhere standardize the use of these directives.  
    • mLipok
      By mLipok
      in my scritp i using this directive
      #AutoIt3Wrapper_Run_Obfuscator=Y #Obfuscator_Parameters=/mo Script Error gives a message like: "Subscript used with non-array variable" "Line Number 55931"   Of course I know what the problem is, ie where there is an error in my script, I find after a while searching for the error and corrects him.   Unfortunately, at some cases, given the line of code is not in line with what is in the file: MyProgram_Obfuscated.au3   I mean. as it turns out the error "MyProgram_Obfuscated.au3" is included in the line number 55939.   Questions: 1 Did anyone happened to specified line was wrong, but so little, that the difference is only 8 lines of code? 2 Does anyone know the reason for this? 3 Can anyone steer me however to solve this problem?   EDIT: topic change from #Obfuscator_Parameters=/mo to #Obfuscator_Parameters=/mo - problem with script line number in AutoIt Error message
    • mLipok
      By mLipok
      In some scripts, I use as follows Obfuscator parameters:
      #AutoIt3Wrapper_Run_Obfuscator=Y #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0 /mo In some other scripts, I use as follows Obfuscator parameters:
      #AutoIt3Wrapper_Run_Obfuscator=Y #Obfuscator_Parameters=/sf #Obfuscator_Parameters=/sv #Obfuscator_Parameters=/om #Obfuscator_Parameters=/cs=0 #Obfuscator_Parameters=/cn=0 #Obfuscator_Parameters=/mo I do not know why I have such a distinction, perhaps I used some example.

      QUESTION:
      Are both indicated examples correct?