Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/21/2012 in all areas

  1. Mobius

    AutoCamo - 98.18b

    Last updated 9/10/21 * Image may not represent current product Features Simple Integrated countermeasures against file and memory analysis based decompilers. Add basic types of resources into the interpreter or other types as raw data. Define multiple programs to execute pre and post build. Create and include pe version information. User defined patches that can be implemented globally on the interpreter and compiler or selectively. Handles its own basic macro's as well as environment variables in most fields for easier path finding. Drag and drop configs (script bound or separate) to the input edit box or to the icon to load them. Configuration settings can be copied to the clipboard or saved as config files or Au3 scripts. Settings can now be saved directly to an AutoIt3 script. Subsystem independant, can act as a gui or console tool. And much more. See next post for update information. A3C_97.16b.7z A3C_98_18_b.zip
    1 point
  2. ProgAndy

    AutoItObject UDF

    The AutoItObject team is proud to announce that the first version of our AutoItObject UDF is complete and ready to use. The project page is located at [currently missing] Please, report bugs and any other issues at our [currently missing], and not here. An overview of all the functions can be found in the online documentation [currently missing] or in the offline .chm documentation file which is included with the [currently missing]. If Origo has problems providing the download, the current version will be mirrored here The UDF requires the current AutoIt version v3.3.4.0! AutoItObject 1.2.8.2.exe AutoItObject 1.2.8.2.zip Please, leave your comments and experiences here. Regards, - trancexx - ProgAndy - monoceres - Kip Our work is published under the Artistic License 2.0 A copy of the FAQ to answer your most urgent questions right away: (can also be found at the online documentation: Some helper-functions: When using the Wrapper, this are some simple methods to get a return value from the resulting array. ; #FUNCTION# ==================================================================================================================== ; Name...........: _AIOResult ; Description ...: Returns the return value of the Call to a WraperObject function ; Syntax.........: _AIOResult(Const $aResult [, $vError=0] ) ; Parameters ....: $aResult - the resulting array ; $vError - [optional] value to be returned if result is no array (default: 0) ; Return values .: Success - Returnvalue ($aResult[0]) ; Failure - $vError, @error set to 1 ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; ; =============================================================================================================================== Func _AIOResult(Const $aResult, $vError=0) ; Author: Prog@ndy If IsArray($aResult) Then Return $aResult[0] Return SetError(1,0,$vError) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _AIOParam ; Description ...: Returns the parameter value of the Call to a WraperObject function ; Syntax.........: _AIOParam(Const $aResult, $iParam, $vError=0) ; Parameters ....: $aResult - the resulting array ; $iParam - The parameterindex to return (0: result, 1: first parameter, 2: 2nd parameter, ...) ; $vError - [optional] value to be returned if result is no array (default: 0) ; Return values .: Success - Parameter value ; Failure - $vError, @error set to 1 ; Author ........: Prog@ndy ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; ; =============================================================================================================================== Func _AIOParam(Const $aResult, $iParam, $vError=0) ; Author: Prog@ndy If UBound($aResult)-1 < $iParam Then Return SetError(1,0,$vError) Return SetExtended($aResult[0], $aResult[$iParam]) EndFunc
    1 point
  3. Ward

    Web Screenshot

    This script demonstrate how to save the web page, or just the specified element to an image file. Two COM interface were used in the script (IViewObject2 for entire page, and IHTMLElementRender for an element) Some code was modified from IECapt. This script needs (Thanks to trancexx, she help me to solve a problem.) #Include <IE.au3> #Include <WinAPI.au3> #Include <ScreenCapture.au3> #Include <WindowsConstants.au3> #Include "AutoItObject.au3" _AutoItObject_StartUp() OnAutoItExitRegister('OnExit') WebCaptureTest("http://en.wikipedia.org/wiki/AutoIt", "Test1.png") ElementCaptureTest("http://en.wikipedia.org/wiki/AutoIt", "Test2.png") Func OnExit() _AutoItObject_Shutdown() EndFunc Func WebCaptureTest($Url, $ImageName) Local $hBmp = WebCapture($Url, 1280) _ScreenCapture_SaveImage($ImageName, $hBmp, True) EndFunc Func ElementCaptureTest($Url, $ImageName) Local $WebWidth = 1280 Local $oIE = ObjCreate("Shell.Explorer.2") GUICreate("", $WebWidth, 768, -1, -1) GUICtrlCreateObj($oIE, 0, 0 , $WebWidth, 768) _IENavigate($oIE, $Url) Local $oElement = $oIE.document.documentElement If $oElement.clientWidth = 0 Then $oElement = $oIE.document.body Local $hBmp = ElementCapture($oElement) _ScreenCapture_SaveImage($ImageName, $hBmp, True) EndFunc Func WebCapture($Url, $WebWidth = 1024) Local Const $DVASPECT_CONTENT = 1 Local $tIID_IViewObject2 = _AutoItObject_CLSIDFromString("{00000127-0000-0000-C000-000000000046}") Local $dtagIViewObject2 = $dtagIUnknown & "Draw hresult(dword;long;ptr;ptr;dword;dword;ptr;ptr;int;dword);" Local $oIE = ObjCreate("Shell.Explorer.2") GUICreate("", $WebWidth, 768, -1, -1) GUICtrlCreateObj($oIE, 0, 0 , $WebWidth, 768) _IENavigate($oIE, $url) Local $oDocument = $oIE.document Local $oBody = $oIE.document.body Local $oHtml = $oIE.document.documentElement $oBody.scroll = "no" $oBody.style.borderStyle = "none" $oHtml.style.overflow = 'hidden' $oBody.style.overflow = 'hidden' Local $oIViewObject2 = _AutoItObject_WarpInterface($oDocument, $tIID_IViewObject2, $dtagIViewObject2) If @Error Then Return SetError(1, 0, 0) Local $BodyWidth = $oBody.scrollWidth Local $BodyHeight = $oBody.scrollHeight Local $RootWidth = $oHtml.scrollWidth Local $RootHeight = $oHtml.scrollHeight Local $Width = $BodyWidth Local $Height = $RootHeight If $BodyHeight > $Height Then $Height = $BodyHeight $oIE.width = $Width $oIE.height = $Height Local $hDC = _WinAPI_GetDC(0) Local $hMemDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBmp = _WinAPI_CreateCompatibleBitmap($hDC, $Width, $Height) _WinAPI_SelectObject($hMemDc, $hBmp) Local $sRECT = DllStructCreate($tagRECT) DllStructSetData($sRECT, "Top", 0) DllStructSetData($sRECT, "Left", 0) DllStructSetData($sRECT, "Right", $Width) DllStructSetData($sRECT, "Bottom", $Height) $oIViewObject2.Draw($DVASPECT_CONTENT, -1, 0, 0, Number($hDC), Number($hMemDC), Number(DllStructGetPtr($sRECT)), 0, 0, 0) _WinAPI_DeleteDC($hMemDC) _WinAPI_ReleaseDC(0, $hDC) Return $hBmp EndFunc Func ElementCapture($oElement, $Border = 2) If Not IsObj($oElement) Then Return SetError(1, 0, 0) If $oElement.clientWidth = 0 Or $oElement.clientHeight = 0 Then Return SetError(1, 0, 0) Local $tIID_IHTMLElementRender = _AutoItObject_CLSIDFromString("{3050F669-98B5-11CF-BB82-00AA00BDCE0B}") Local $dtagIHTMLElementRender = $dtagIUnknown & "DrawToDC hresult(hwnd);" Local $PageHeight = $oElement.scrollHeight - $Border Local $PageWidth = $oElement.scrollWidth - $Border Local $oIHTMLElementRender = _AutoItObject_WarpInterface($oElement, $tIID_IHTMLElementRender, $dtagIHTMLElementRender) Local $hDC = _WinAPI_GetDC(0) Local $hMemDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBmp = _WinAPI_CreateSolidBitmap(0, 0xffffff, $oElement.clientWidth, $oElement.clientHeight) Local $hMemDcFull = _WinAPI_CreateCompatibleDC($hDC) Local $hBmpFull = _WinAPI_CreateSolidBitmap(0, 0xffffff, $PageWidth, $PageHeight) _WinAPI_SelectObject($hMemDc, $hBmp) _WinAPI_SelectObject($hMemDcFull, $hBmpFull) Local $DrawWidth = $oElement.clientWidth - $Border Local $DrawHeight = $oElement.clientHeight - $Border Local $CurrentX = 0 Local $CurrentY = 0 While $CurrentX < $PageWidth While $CurrentY < $PageHeight $oElement.scrollLeft = $CurrentX $oElement.scrollTop = $CurrentY $oIHTMLElementRender.DrawToDC(Number($hMemDC)) _WinAPI_BitBlt($hMemDcFull, $oElement.scrollLeft, $oElement.scrollTop, $DrawWidth, $DrawHeight, $hMemDC, $Border, $Border, $SRCCOPY) $CurrentY += $DrawHeight WEnd $CurrentY = 0 $CurrentX += $DrawWidth WEnd _WinAPI_DeleteDC($hMemDC) _WinAPI_DeleteDC($hMemDcFull) _WinAPI_ReleaseDC(0, $hDC) _WinAPI_DeleteObject($hBmp) Return $hBmpFull EndFunc Func _AutoItObject_WarpInterface($Obj, $IID, $Tag, $fNoUnknown = False) If Not IsDllStruct($IID) Then $IID = _AutoItObject_CLSIDFromString($IID) If Not IsObj($Obj) Then Return SetError(1, 0, 0) Local $pObj = _AutoItObject_IDispatchToPtr($Obj) If Not _AutoItObject_IUnknownAddRef($Obj) Then Return SetError(1, 0, 0) Local $ObjWarpped = _AutoItObject_WrapperCreate($pObj, $dtagIUnknown, $fNoUnknown) Local $aCall = $ObjWarpped.QueryInterface(Number(DllStructGetPtr($IID)), 0) If Not IsArray($aCall) And $aCall[0] <> 0 Then Return SetError(1, 0, 0) Local $pInterface = $aCall[2] Return _AutoItObject_WrapperCreate($pInterface, $Tag) EndFunc
    1 point
  4. For those of us who use SciTE4AutoIt3 then you would've come across (at some stage) the directive #AutoIt3Wrapper_Res_SaveSource, it allows you to save the script to the compiled exe thus allowing you to retrieve at a later stage, great if you accidentally delete your source file. _GetSavedSource() allows you to extract the source file from the compiled executable and save to a file of your choice. Note: You must use #AutoIt3Wrapper_Res_SaveSource=Y at the top of the script for this to work & it must be compiled. Function: #include-once #include <WinAPIRes.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GetSavedSource ; Description ...: Retrieve the source file from a compiled executable, #AutoIt3Wrapper_Res_SaveSource=Y must be used beforehand to embed the file to the executable ; Syntax ........: _GetSavedSource([$sExecutable = ''[, $sSaveFilePath = '']]) ; Parameters ....: $sExecutable - [optional] Executable to retrieve the source file from ; Use a blank string or the Default keyword to use the current executable. Default is '' ; $sSaveFilePath - [optional] FilePath to save the source file to. Nore: The file doesn't have to exist. Default is '' ; Use a blank string or the Default keyword to save to the current directory and using the script's ; name with the au3 prefix. Default is '' ; Return values .: Success - True ; Failure - False and sets @error to non-zero ; Author ........: guinness ; Remarks .......: ; Example .......: Yes ; Note ..........: Thanks to Jos, Yashied & Zedna ; =============================================================================================================================== Func _GetSavedSource($sExecutable = '', $sSaveFilePath = '') Local Enum $GETSAVEDSOURCE_ERROR_NONE, $GETSAVEDSOURCE_ERROR_FILEWRITE, $GETSAVEDSOURCE_ERROR_FINDRESOURCE, $GETSAVEDSOURCE_ERROR_LOADMODULE Local $iError = $GETSAVEDSOURCE_ERROR_LOADMODULE Local $hInstance = (($sExecutable = Default Or StringStripWS($sExecutable, $STR_STRIPALL) = '') ? _WinAPI_GetModuleHandle(Null) : _WinAPI_LoadLibraryEx($sExecutable, $LOAD_LIBRARY_AS_DATAFILE)) If Not @error Then $iError = $GETSAVEDSOURCE_ERROR_FINDRESOURCE ; Get the source file from the executable. This is located at resname 999 Local $hResource = _WinAPI_FindResource($hInstance, $RT_RCDATA, 999) If Not @error Then Local $hData = _WinAPI_LoadResource($hInstance, $hResource) Local $iSize = _WinAPI_SizeOfResource($hInstance, $hResource) Local $pResource = _WinAPI_LockResource($hData) If $sSaveFilePath = Default Or StringStripWS($sSaveFilePath, $STR_STRIPALL) = '' Then $sSaveFilePath = @ScriptDir & '\' & StringLeft(@ScriptName, StringInStr(@ScriptName, '.', $STR_NOCASESENSEBASIC, -1) - 1) EndIf $iError = $GETSAVEDSOURCE_ERROR_FILEWRITE Local $hFilePath = FileOpen($sSaveFilePath, BitOR($FO_OVERWRITE, $FO_BINARY, $FO_UTF8)) If $hFilePath > -1 Then $iError = $GETSAVEDSOURCE_ERROR_NONE Local $tBuffer = DllStructCreate('byte array[' & $iSize & ']', $pResource) FileWrite($hFilePath, DllStructGetData($tBuffer, 'array')) FileClose($hFilePath) EndIf EndIf _WinAPI_FreeLibrary($hInstance) EndIf Return SetError($iError, 0, $iError = $GETSAVEDSOURCE_ERROR_NONE) EndFunc ;==>_GetSavedSource Example 1 of Function: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 ; Use the full version of SciTE4AutoIt3 by Jos #AutoIt3Wrapper_Res_SaveSource=Y #AutoIt3Wrapper_UseX64=N #include <MsgBoxConstants.au3> #include '_GetSavedSource.au3' Example() Func Example() If @Compiled Then If _GetSavedSource(@ScriptFullPath, @ScriptDir & '\' & GetScriptName() & '.au3') Then MsgBox($MB_SYSTEMMODAL, 'Completed', 'The Au3 script was saved in the script directory and is called ' & GetScriptName() & '.au3') Else MsgBox($MB_SYSTEMMODAL, 'Error' & @error, 'An error occurred whilst extracting the Au3 script located in the resources.') EndIf Else MsgBox($MB_SYSTEMMODAL, 'Compile first', 'Please compile this script first and then run the compiled file, you''ll see a new file called "' & _ GetScriptName() & '.au3' & '" is created in the same directory.') EndIf EndFunc ;==>Example ; Return the @ScriptName minus the .exe or .au3 extension and with _SAVEDSOURCE_ appended Func GetScriptName() Return StringLeft(@ScriptName, StringInStr(@ScriptName, '.', $STR_NOCASESENSEBASIC, -1) - 1) & '_SAVEDSOURCE_' EndFunc ;==>GetScriptName Example 2 of Function: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 ; Use the full version of SciTE4AutoIt3 by Jos #AutoIt3Wrapper_Res_SaveSource=Y #AutoIt3Wrapper_UseX64=N #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include '_GetSavedSource.au3' If Not @Compiled Then Exit MsgBox($MB_SYSTEMMODAL, 'Compile first', 'Please compile this script first and then run the compiled file, you''ll see a new file called "' & _ GetScriptName() & '.au3' & '" is created in the same directory.') EndIf ; Check if the commandline parameter 'SaveSource' has been passed to the executable IsSaveSource() Example() Func Example() ; The example of using AutoItWinGetTitle() can be found at: http://www.autoitscript.com/forum/topic/133648-autoitwingettitleautoitwinsettitle-an-example-of-usage/ ; Get the handle of the AutoIt Hidden Window by finding out the title of the AutoIt Hidden Window Local $hAutoIt = AutoItWinShow() ; Read the source file that was extracted from the executable Local $sData = FileRead(@ScriptDir & '\' & GetScriptName() & '.au3') If @error Then ; If the file wasn't extracted then show an error string $sData = '## @error - can''t open the file ##' EndIf ; Set the text of the edit box using the data returned from _GetFile AutoItWinSetText($hAutoIt, $sData) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ; Just hit the close button to Exit the application ExitLoop EndSwitch WEnd EndFunc ;==>Example ; Add text to AutoIt's Hidden Window Func AutoItWinSetText($sString, $hWnd = Default) If Not IsHWnd($hWnd) Or $hWnd = Default Then ; Get the handle of the AutoIt Hidden Window by finding out the title of the AutoIt Hidden Window $hWnd = WinGetHandle(AutoItWinGetTitle()) EndIf Return ControlSetText($hWnd, '', ControlGetHandle($hWnd, '', 'Edit1'), $sString) EndFunc ;==>AutoItWinSetText ; Display AutoIt's Hidden Window. Returns the handle of the window Func AutoItWinShow() ; Get the handle of the AutoIt Hidden Window by finding out the title of the AutoIt Hidden Window Local $hWnd = WinGetHandle(AutoItWinGetTitle()) ; Move the AutoIt Hidden Window and re-size for a better view of the data that will be set WinMove($hWnd, '', (@DesktopWidth / 2) - 250, (@DesktopHeight / 2) - 250, 500, 500) ; Show the AutoIt Hidden Window, normally this is hidden, but in the interest of this example I'm displaying it WinSetState($hWnd, '', @SW_SHOW) Return $hWnd EndFunc ;==>AutoItWinShow ; Return the @ScriptName minus the .exe or .au3 extension and with _SAVEDSOURCE_ appended Func GetScriptName() Return StringLeft(@ScriptName, StringInStr(@ScriptName, '.', $STR_NOCASESENSEBASIC, -1) - 1) & '_SAVEDSOURCE_' EndFunc ;==>GetScriptName ; Check if the commandline parameter 'SaveSource' has been passed to the executable Func IsSaveSource() Return (StringInStr($CmdLineRaw, 'SaveSource') ? _GetSavedSource(@ScriptFullPath, @ScriptDir & '\' & GetScriptName() & '.au3') : Null) EndFunc ;==>IsSaveSource All of the above has been included in a ZIP file. GetSavedSource.zip
    1 point
  5. I have already published a lot of AutoIt UDF about algorithm, but all of them only support 32 bits or so called X86 system. Recently I got a computer with Windows 7 64 bits, so I finally added X64 support to most of my old projects. Besides, I also added some new. For example, some compression algorithm and SHA3 Candidates. Following are the algorithms list: Checksum CRC16 CRC32 ADLER32 Compression FastLZ LZF LZMA LZMAT MiniLZO QuickLZ Encode Base64 ARC4 XXTEA DES AES Hash Checksums (CRC16/CRC32/ADLER32) MD2 MD4 MD5 SHA1 SHA2 (SHA224/256/384/512) SHA3 Candidates BLAKE BMW (Blue Midnight Wish) CUBEHASH ECHO SHABAL SKEIN Some points to mention: All of the subroutines have one or more examples to demonstrate the usage. Since the function and usage of subroutine are easy to understand. A complete subroutines and parameters list are unavailability now. Sorry for my lazy. All of the subroutines here invoked by Lazycat's method (through CallWindowProc API). My MemoryDLL UDF is not necessary this time. Although MemoryFuncCall (part of MemoryDLL) is still good, but inevitably, it is slower than CallWindowProc. Some subroutines have the same name with my old machine code version UDF. But for some reason, I rearrange the position of the parameters. Please not mix up. If you notice, yes, checksums are duplicated. But they receive different parameters. One is the old style, and another use the same interface as other hashes. Choose what you like, but don't use them in the same time. Some algorithm already supported by the standard UDF "Encryption.au3". But I still provide them, because some system lack of the full support of Windows Crypt Library. If you are looking for only one hash algorithm, for example, used in encryption, I suggested "SHABAL_TINY.au3". Although it is a bit slower then SHABAL, but it is smaller, and it supports different size of output (from 32 to 512 bits).AutoIt Machine Code Algorithm Collection.zip
    1 point
×
×
  • Create New...