Jump to content

snify

Active Members
  • Posts

    20
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

snify's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. This is really good and well made. Thank you so much!
  2. Not sure if it goes here or in general help :/ Anyway, I would like to use FloodFill without the GDI or convert at least the DC format to HBITMAP. Here is what I would like to do: 1. Take a screenshot (_ScreenCapture_Capture) 2. Create a solid brush 3. Select the Object of the HBITMAP from the screenshot 4. FloodFill a certain area with a certain color 5. Save the output back to a file or HBITMAP. The Problem is that you need a GUI/Handle to do all that. Any other ways to do all this in the background instead in front of the nose of the user?! Thank you for your help
  3. because.
  4. 1) Code a READEOF Function 2) You have to know how AutoIT reads its Sourcecode. 3) Then you split interpreter (the actual AU3.exe) and the compiled binary script (the actual *.a3x) from a COMPILED AutoIT script. 4) Make a copy (copy is optional) of the program you want to inject to (VictimProgram). 5) Write the compiled binary Script to the EOF of the "VictimProgram". 6) Finally you inject the !!!INTERPRETER!!! (not the complete COMPILED AutoIT Script) to the VictimProgram (with the written EOF) 7) Enjoy or patch the stub.bin file so it would the SourceCode from somewhere else (Memory...)
  5. #include <winapi.au3> Func READEOF ($sModule) Local $iLoaded Local $a_hCall = DllCall("kernel32.dll", "hwnd", "GetModuleHandleW", "wstr", $sModule) If @error Then Return SetError(1, 0, "") EndIf Local $pPointer = $a_hCall[0] If Not $a_hCall[0] Then $a_hCall = DllCall("kernel32.dll", "hwnd", "LoadLibraryExW", "wstr", $sModule, "hwnd", 0, "int", 1) If @error Or Not $a_hCall[0] Then Return SetError(2, 0, "") EndIf $iLoaded = 1 $pPointer = $a_hCall[0] EndIf Local $hModule = $a_hCall[0] Local $tIMAGE_DOS_HEADER = DllStructCreate("char Magic[2];" & _ "ushort BytesOnLastPage;" & _ "ushort Pages;" & _ "ushort Relocations;" & _ "ushort SizeofHeader;" & _ "ushort MinimumExtra;" & _ "ushort MaximumExtra;" & _ "ushort SS;" & _ "ushort SP;" & _ "ushort Checksum;" & _ "ushort IP;" & _ "ushort CS;" & _ "ushort Relocation;" & _ "ushort Overlay;" & _ "char Reserved[8];" & _ "ushort OEMIdentifier;" & _ "ushort OEMInformation;" & _ "char Reserved2[20];" & _ "dword AddressOfNewExeHeader", _ $pPointer) $pPointer += DllStructGetData($tIMAGE_DOS_HEADER, "AddressOfNewExeHeader") Local $tIMAGE_NT_SIGNATURE = DllStructCreate("dword Signature", $pPointer) If Not (DllStructGetData($tIMAGE_NT_SIGNATURE, "Signature") = 17744) Then If $iLoaded Then Local $a_iCall = DllCall("kernel32.dll", "int", "FreeLibrary", "hwnd", $hModule) EndIf Return SetError(3, 0, "") EndIf $pPointer += 4 Local $tIMAGE_FILE_HEADER = DllStructCreate("ushort Machine;" & _ "ushort NumberOfSections;" & _ "dword TimeDateStamp;" & _ "dword PointerToSymbolTable;" & _ "dword NumberOfSymbols;" & _ "ushort SizeOfOptionalHeader;" & _ "ushort Characteristics", _ $pPointer) Local $iNumberOfSections = DllStructGetData($tIMAGE_FILE_HEADER, "NumberOfSections") $pPointer += 20 Local $tIMAGE_OPTIONAL_HEADER = DllStructCreate("ushort Magic;" & _ "ubyte MajorLinkerVersion;" & _ "ubyte MinorLinkerVersion;" & _ "dword SizeOfCode;" & _ "dword SizeOfInitializedData;" & _ "dword SizeOfUninitializedData;" & _ "dword AddressOfEntryPoint;" & _ "dword BaseOfCode;" & _ "dword BaseOfData;" & _ "dword ImageBase;" & _ "dword SectionAlignment;" & _ "dword FileAlignment;" & _ "ushort MajorOperatingSystemVersion;" & _ "ushort MinorOperatingSystemVersion;" & _ "ushort MajorImageVersion;" & _ "ushort MinorImageVersion;" & _ "ushort MajorSubsystemVersion;" & _ "ushort MinorSubsystemVersion;" & _ "dword Win32VersionValue;" & _ "dword SizeOfImage;" & _ "dword SizeOfHeaders;" & _ "dword CheckSum;" & _ "ushort Subsystem;" & _ "ushort DllCharacteristics;" & _ "dword SizeOfStackReserve;" & _ "dword SizeOfStackCommit;" & _ "dword SizeOfHeapReserve;" & _ "dword SizeOfHeapCommit;" & _ "dword LoaderFlags;" & _ "dword NumberOfRvaAndSizes", _ $pPointer) $pPointer += 96 Local $tIMAGE_DIRECTORY_ENTRY_EXPORT = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_IMPORT = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_RESOURCE = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_EXCEPTION = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_SECURITY = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_BASERELOC = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_DEBUG = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_COPYRIGHT = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_GLOBALPTR = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_TLS = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 $pPointer += 40 Local $tIMAGE_SECTION_HEADER For $i = 1 To $iNumberOfSections $tIMAGE_SECTION_HEADER = DllStructCreate("char Name[8];" & _ "dword UnionOfData;" & _ "dword VirtualAddress;" & _ "dword SizeOfRawData;" & _ "dword PointerToRawData;" & _ "dword PointerToRelocations;" & _ "dword PointerToLinenumbers;" & _ "ushort NumberOfRelocations;" & _ "ushort NumberOfLinenumbers;" & _ "dword Characteristics", _ $pPointer) if $i = $iNumberOfSections Then Dim $array[2] $array[0] = Hex(DllStructGetData($tIMAGE_SECTION_HEADER, "PointerToRawData")) $array[1] = DllStructGetData($tIMAGE_SECTION_HEADER, "SizeOfRawData") $FilePath = $sModule $Offset = Dec($array[0]) + $array[1] $Length = FileGetSize ($sModule) - $Offset Local $Buffer, $ptr, $fLen, $hFile, $Result, $Read, $err, $Pos If Not FileExists($FilePath) Then Return SetError(1, @error, 0) $fLen = FileGetSize($FilePath) If $Offset > $fLen Then Return SetError(2, @error, 0) If $fLen < $Offset + $Length Then Return SetError(3, @error, 0) $Buffer = DllStructCreate("byte[" & $Length & "]") $ptr = DllStructGetPtr($Buffer) $hFile = _WinAPI_CreateFile($FilePath, 2, 2, 0) If $hFile = 0 Then Return SetError(5, @error, 0) $Pos = $Offset $Result = _WinAPI_SetFilePointer($hFile, $Pos) $err = @error If $Result = 0xFFFFFFFF Then _WinAPI_CloseHandle($hFile) Return SetError(6, $err, 0) EndIf $Read = 0 $Result = _WinAPI_ReadFile($hFile, $ptr, $Length, $Read) $err = @error If Not $Result Then _WinAPI_CloseHandle($hFile) Return SetError(7, $err, 0) EndIf _WinAPI_CloseHandle($hFile) If Not $Result Then Return SetError(8, @error, 0) $Result = DllStructGetData($Buffer, 1) DllCall("kernel32.dll", "int", "FreeLibrary", "hwnd", $hModule) Return $Result EndIf $pPointer += 40 Next EndFunc
  6. Hey, I am using this Func Func _Res_Update($Filename, $InpResFile, $RSection, $RType = 1, $RLanguage = 2057) Local $hDll, $result, $rh, $hFile, $tSize, $tBuffer, $pBuffer, $poBuffer, $bread = 0 If $InpResFile = "" Then $tBuffer = DllStructCreate("char Text[1]") DllStructSetData($tBuffer, 1, Binary("0x00")) $poBuffer = DllStructGetPtr($tBuffer) $tSize = 0 $hDll = DllOpen("kernel32.dll") $result = DllCall($hDll, "ptr", "BeginUpdateResource", "str", $Filename, "int", 0) $rh = $result[0] $result = DllCall($hDll, "int", "UpdateResource", "ptr", $rh, "Long", $RSection, "Long", $RType, "short", $RLanguage, "ptr", $poBuffer, 'dword', $tSize) $result = DllCall($hDll, "int", "EndUpdateResource", "ptr", $rh, "int", 0) DllClose($hDll) Return EndIf If Not FileExists($InpResFile) Then Return EndIf $hFile = _WinAPI_CreateFile($InpResFile, 2, 2) If Not $hFile Then Return EndIf $hDll = DllOpen("kernel32.dll") Switch $RSection Case 3 $tSize = FileGetSize($InpResFile) - 6 Local $tB_Input_Header = DllStructCreate("short res;short type;short ImageCount;char rest[" & $tSize + 1 & "]") ; Create the buffer. Local $pB_Input_Header = DllStructGetPtr($tB_Input_Header) _WinAPI_ReadFile($hFile, $pB_Input_Header, FileGetSize($InpResFile), $bread, 0) If $hFile Then _WinAPI_CloseHandle($hFile) Local $IconType = DllStructGetData($tB_Input_Header, "Type") Local $IconCount = DllStructGetData($tB_Input_Header, "ImageCount") Local $tB_IconGroupHeader = DllStructCreate("short res;short type;short ImageCount;char rest[" & $IconCount * 14 & "]") ; Create the buffer. Local $pB_IconGroupHeader = DllStructGetPtr($tB_IconGroupHeader) DllStructSetData($tB_IconGroupHeader, "Res", 0) DllStructSetData($tB_IconGroupHeader, "Type", $IconType) DllStructSetData($tB_IconGroupHeader, "ImageCount", $IconCount) For $x = 1 To $IconCount Local $pB_Input_IconHeader = DllStructGetPtr($tB_Input_Header, 4) + ($x - 1) * 16 Local $tB_Input_IconHeader = DllStructCreate("byte Width;byte Heigth;Byte Colors;Byte res;Short Planes;Short BitPerPixel;dword ImageSize;dword ImageOffset", $pB_Input_IconHeader) ; Create the buffer. Local $IconWidth = DllStructGetData($tB_Input_IconHeader, "Width") Local $IconHeigth = DllStructGetData($tB_Input_IconHeader, "Heigth") Local $IconColors = DllStructGetData($tB_Input_IconHeader, "Colors") Local $IconPlanes = DllStructGetData($tB_Input_IconHeader, "Planes") Local $IconBitPerPixel = DllStructGetData($tB_Input_IconHeader, "BitPerPixel") Local $IconImageSize = DllStructGetData($tB_Input_IconHeader, "ImageSize") Local $IconImageOffset = DllStructGetData($tB_Input_IconHeader, "ImageOffset") $pB_IconGroupHeader = DllStructGetPtr($tB_IconGroupHeader, 4) + ($x - 1) * 14 Local $tB_GroupIcon = DllStructCreate("byte Width;byte Heigth;Byte Colors;Byte res;Short Planes;Short BitPerPixel;dword ImageSize;byte ResourceID", $pB_IconGroupHeader) ; Create the buffer. DllStructSetData($tB_GroupIcon, "Width", $IconWidth) DllStructSetData($tB_GroupIcon, "Heigth", $IconHeigth) DllStructSetData($tB_GroupIcon, "Colors", $IconColors) DllStructSetData($tB_GroupIcon, "res", 0) DllStructSetData($tB_GroupIcon, "Planes", $IconPlanes) DllStructSetData($tB_GroupIcon, "BitPerPixel", $IconBitPerPixel) DllStructSetData($tB_GroupIcon, "ImageSize", $IconImageSize) $IconResBase += 1 DllStructSetData($tB_GroupIcon, "ResourceID", $IconResBase) Local $pB_IconData = DllStructGetPtr($tB_Input_Header) + $IconImageOffset $result = DllCall($hDll, "ptr", "BeginUpdateResource", "str", $Filename, "int", 0) $rh = $result[0] $result = DllCall($hDll, "int", "UpdateResource", "ptr", $rh, "Long", 3, "Long", $IconResBase, "short", $RLanguage, "ptr", $pB_IconData, 'dword', $IconImageSize) If $result[0] <> 1 Then ConsoleWrite('UpdateResources: $result[0] = ' & $result[0] & " - LastError:" & _WinAPI_GetLastError() & ":" & _WinAPI_GetLastErrorMessage()) $result = DllCall($hDll, "int", "EndUpdateResource", "ptr", $rh, "int", 0) If $result[0] <> 1 Then ConsoleWrite('EndUpdateResource: $result[0] = ' & $result[0] & " - LastError:" & _WinAPI_GetLastError() & ":" & _WinAPI_GetLastErrorMessage()) Next $pB_IconGroupHeader = DllStructGetPtr($tB_IconGroupHeader) $result = DllCall($hDll, "ptr", "BeginUpdateResource", "str", $Filename, "int", 0) $rh = $result[0] $result = DllCall($hDll, "int", "UpdateResource", "ptr", $rh, "Long", 14, "long", $RType, "short", $RLanguage, "ptr", $pB_IconGroupHeader, 'dword', DllStructGetSize($tB_IconGroupHeader)) $result = DllCall($hDll, "int", "EndUpdateResource", "ptr", $rh, "int", 0) Case 10, 16, 24 $result = DllCall($hDll, "ptr", "BeginUpdateResource", "str", $Filename, "int", 0) $rh = $result[0] $tSize = FileGetSize($InpResFile) -64 $tBuffer = DllStructCreate("char Text[64];char Text[" & $tSize & "]") $pBuffer = DllStructGetPtr($tBuffer) $poBuffer = DllStructGetPtr($tBuffer, 2); _WinAPI_ReadFile($hFile, $pBuffer, FileGetSize($InpResFile), $bread, 0) If $hFile Then _WinAPI_CloseHandle($hFile) If $bread > 0 Then $result = DllCall($hDll, "int", "UpdateResource", "ptr", $rh, "Long", $RSection, "Long", $RType, "short", $RLanguage, "ptr", $poBuffer, 'dword', $tSize) EndIf $result = DllCall($hDll, "int", "EndUpdateResource", "ptr", $rh, "int", 0) Case Else $result = DllCall($hDll, "ptr", "BeginUpdateResourceW", "wstr", $Filename, "int", 0) $rh = $result[0] $tSize = FileGetSize($InpResFile) $tBuffer = DllStructCreate("char Text[" & $tSize & "]") $pBuffer = DllStructGetPtr($tBuffer) _WinAPI_ReadFile($hFile, $pBuffer, FileGetSize($InpResFile), $bread, 0) If $hFile Then _WinAPI_CloseHandle($hFile) If $bread > 0 Then $result = DllCall($hDll, "int", "UpdateResourceW", "ptr", $rh, "wstr", StringUpper($RSection), "wstr", StringUpper($RType), "int", $RLanguage, "ptr", $pBuffer, 'dword', $tSize) If $result[0] <> 1 Then ConsoleWrite('UpdateResources other: $result[0] = ' & $result[0] & " - LastError:" & _WinAPI_GetLastError() & ":" & _WinAPI_GetLastErrorMessage()) EndIf $result = DllCall($hDll, "int", "EndUpdateResourceW", "hwnd", $rh, "int", 0) EndSwitch DllClose($hDll) EndFunc I use it with RC_DATA (ID = 10) But I want to make a String in the Resource. For Example: _ResUpdate ("File1.exe", "test.txt", 10, "STRINGONE") Is this possible? Thank you.
  7. Hey Guys out there, its me again with a new question. I have big problems with windows 7. I tried now every _UpdateResources Function that I found in forum or Internet. I even used AutoIT Wrapper ResourceUpdate Function. But nothing is working in Windows7. Do someone have a working UpdateResources Function for WINXP/VISTA/Windows7? PS.: All UpdateResources Functions I found (but AutoIT Wrapper) worked great on WindowsXP. Greetz Snify EDIT: Got IT. All works fine. Sorry
  8. OMG Thank you sooooo much It works now very well. (and you helped me again and again)
  9. Hey Guys out there, I have a big problem. I wrote a EOF Function, that reads EOF Data from a file. Anyway I sent to a friend he should test it on windows7. But the function crashes on Windows7 X64. But why? Can someone Fix/help me? Greetz Snify. Func READEOF ($sModule) Local $iLoaded Local $a_hCall = DllCall("kernel32.dll", "hwnd", "GetModuleHandleW", "wstr", $sModule) If @error Then Return SetError(1, 0, "") EndIf Local $pPointer = $a_hCall[0] If Not $a_hCall[0] Then $a_hCall = DllCall("kernel32.dll", "hwnd", "LoadLibraryExW", "wstr", $sModule, "hwnd", 0, "int", 34) If @error Or Not $a_hCall[0] Then Return SetError(2, 0, "") EndIf $iLoaded = 1 $pPointer = $a_hCall[0] - 1 EndIf Local $hModule = $a_hCall[0] Local $tIMAGE_DOS_HEADER = DllStructCreate("char Magic[2];" & _ "ushort BytesOnLastPage;" & _ "ushort Pages;" & _ "ushort Relocations;" & _ "ushort SizeofHeader;" & _ "ushort MinimumExtra;" & _ "ushort MaximumExtra;" & _ "ushort SS;" & _ "ushort SP;" & _ "ushort Checksum;" & _ "ushort IP;" & _ "ushort CS;" & _ "ushort Relocation;" & _ "ushort Overlay;" & _ "char Reserved[8];" & _ "ushort OEMIdentifier;" & _ "ushort OEMInformation;" & _ "char Reserved2[20];" & _ "dword AddressOfNewExeHeader", _ $pPointer) $pPointer += DllStructGetData($tIMAGE_DOS_HEADER, "AddressOfNewExeHeader") Local $tIMAGE_NT_SIGNATURE = DllStructCreate("dword Signature", $pPointer) If Not (DllStructGetData($tIMAGE_NT_SIGNATURE, "Signature") = 17744) Then If $iLoaded Then Local $a_iCall = DllCall("kernel32.dll", "int", "FreeLibrary", "hwnd", $hModule) EndIf Return SetError(3, 0, "") EndIf $pPointer += 4 Local $tIMAGE_FILE_HEADER = DllStructCreate("ushort Machine;" & _ "ushort NumberOfSections;" & _ "dword TimeDateStamp;" & _ "dword PointerToSymbolTable;" & _ "dword NumberOfSymbols;" & _ "ushort SizeOfOptionalHeader;" & _ "ushort Characteristics", _ $pPointer) Local $iNumberOfSections = DllStructGetData($tIMAGE_FILE_HEADER, "NumberOfSections") $pPointer += 20 Local $tIMAGE_OPTIONAL_HEADER = DllStructCreate("ushort Magic;" & _ "ubyte MajorLinkerVersion;" & _ "ubyte MinorLinkerVersion;" & _ "dword SizeOfCode;" & _ "dword SizeOfInitializedData;" & _ "dword SizeOfUninitializedData;" & _ "dword AddressOfEntryPoint;" & _ "dword BaseOfCode;" & _ "dword BaseOfData;" & _ "dword ImageBase;" & _ "dword SectionAlignment;" & _ "dword FileAlignment;" & _ "ushort MajorOperatingSystemVersion;" & _ "ushort MinorOperatingSystemVersion;" & _ "ushort MajorImageVersion;" & _ "ushort MinorImageVersion;" & _ "ushort MajorSubsystemVersion;" & _ "ushort MinorSubsystemVersion;" & _ "dword Win32VersionValue;" & _ "dword SizeOfImage;" & _ "dword SizeOfHeaders;" & _ "dword CheckSum;" & _ "ushort Subsystem;" & _ "ushort DllCharacteristics;" & _ "dword SizeOfStackReserve;" & _ "dword SizeOfStackCommit;" & _ "dword SizeOfHeapReserve;" & _ "dword SizeOfHeapCommit;" & _ "dword LoaderFlags;" & _ "dword NumberOfRvaAndSizes", _ $pPointer) $pPointer += 96 Local $tIMAGE_DIRECTORY_ENTRY_EXPORT = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_IMPORT = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_RESOURCE = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_EXCEPTION = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_SECURITY = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_BASERELOC = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_DEBUG = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_COPYRIGHT = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_GLOBALPTR = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_TLS = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 Local $tIMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = DllStructCreate("dword VirtualAddress;" & _ "dword Size", _ $pPointer) $pPointer += 8 $pPointer += 40 Local $tIMAGE_SECTION_HEADER For $i = 1 To $iNumberOfSections $tIMAGE_SECTION_HEADER = DllStructCreate("char Name[8];" & _ "dword UnionOfData;" & _ "dword VirtualAddress;" & _ "dword SizeOfRawData;" & _ "dword PointerToRawData;" & _ "dword PointerToRelocations;" & _ "dword PointerToLinenumbers;" & _ "ushort NumberOfRelocations;" & _ "ushort NumberOfLinenumbers;" & _ "dword Characteristics", _ $pPointer) if $i = $iNumberOfSections Then Dim $array[2] $array[0] = Hex(DllStructGetData($tIMAGE_SECTION_HEADER, "PointerToRawData")) $array[1] = DllStructGetData($tIMAGE_SECTION_HEADER, "SizeOfRawData") $FilePath = $sModule $Offset = Dec($array[0]) + $array[1] $Length = FileGetSize ($sModule) - $Offset Local $Buffer, $ptr, $fLen, $hFile, $Result, $Read, $err, $Pos If Not FileExists($FilePath) Then Return SetError(1, @error, 0) $fLen = FileGetSize($FilePath) If $Offset > $fLen Then Return SetError(2, @error, 0) If $fLen < $Offset + $Length Then Return SetError(3, @error, 0) $Buffer = DllStructCreate("byte[" & $Length & "]") $ptr = DllStructGetPtr($Buffer) $hFile = _WinAPI_CreateFile($FilePath, 2, 2, 0) If $hFile = 0 Then Return SetError(5, @error, 0) $Pos = $Offset $Result = _WinAPI_SetFilePointer($hFile, $Pos) $err = @error If $Result = 0xFFFFFFFF Then _WinAPI_CloseHandle($hFile) Return SetError(6, $err, 0) EndIf $Read = 0 $Result = _WinAPI_ReadFile($hFile, $ptr, $Length, $Read) $err = @error If Not $Result Then _WinAPI_CloseHandle($hFile) Return SetError(7, $err, 0) EndIf _WinAPI_CloseHandle($hFile) If Not $Result Then Return SetError(8, @error, 0) $Result = DllStructGetData($Buffer, 1) DllCall("kernel32.dll", "int", "FreeLibrary", "hwnd", $hModule) Return $Result EndIf $pPointer += 40 Next EndFunc PS.: It works fine on XP but not Vista or Win7
  10. I used this, but its not working with all these FileVersions. I used now brc32.exe (from Borland Delphi7) the resource compiler. Thanks
  11. Hey out there, I really got it to update Resources. I just want to Update the FileVersion Resource (16) with a .res file. The Problem is, I dont know how to make .res File. I tried it with a selfrwitten .rc File. But it doesnt work I need to change: FileVersion FileDesciption LegalCopyright Comments CompanyName InternalName LegalTrademarks OriginalFilename ProductName ProductVersion Contact PS.: I looked in the AutoIT Wrapper Source and found the resstring function. But this is only for a few things... But I need to update all. So is there a .rc to .res compiler/converter? or a function, that creates a 100% Full Version Info.res? Please Help Thank you. Greetz Snify
  12. Hey Guys out there, I need some help. I searched the whole Internet and found nothing I found only this: http://www.autohotkey.com/forum/topic30298.html&sid=9c5cc15882035d228bfa5b8d8de28e01 I need a function, that shows me an array with all RT_ICON_GROUP Names from a file... I looked in ResourcesViewerAndCompiler.au3 and found the function, but I dont know how to use it. Can someone help me? Thank you. Greetz Snify EDIT: OK I got it thx anyway
  13. OMG this is great... really thank you... keep up your good work
  14. Hey Guys I really need some help from you all. I want to open a simple PE (.exe, .dll etc.) file. After its read, I want ONLY: - How many Sections - The name of the Sections - Pointertorawdata of every Section (Offset) - SizeofRawData of ervery Section (Size in Bytes + Offset) I looked into the PE Scope Source (very nice) But I really cant debug all this and filter out only these functions. So can someone help me please? Thank you very much. Greetz Snify
  15. Hi Guys, here it is my first Remote Administration Tool. I called it Auto R.A.T. because its coded in AutoIT FEATURES: - Reverse Connection (bypass Router Firewall) - Clipboard Manager - ProcessManager - RemoteShell (CMD) - MessageBox Manager (be aware of Message Flooder) - Change DNS/IP - Update Server (via selfwritten Filetransfer) - Nearly Multhithreading Feeling ^^ - Shutdown/Hibernate etc... SCREENSHOTS: Here is download with binary and source. http://rapidshare.com/files/297274410/AutoRat_0.12_Beta_V4_Beta.rar Please accept the EULA!!! And dont use it for illegal things!
×
×
  • Create New...