Jump to content

ZokNy

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by ZokNy

  1. Just 4 note: 76561197960265728 = 2^32 + 2^52 + 2^56
  2. _MemoryPointerRead from NomadMemory. I modified the original a bit (return error shortened). NomadMemoryNew.au3
  3. Try with my _MemoryModuleGetBaseAddress: #include <NomadMemory.au3> #include <MemoryModuleGetBaseAddressUDF.au3> Dim $iPID = WinGetProcess(WinGetTitle("**")) Dim $hMem = _MemoryOpen($iPID) Dim $baseAddr = _MemoryModuleGetBaseAddress($iPID, "whatever.exe") + 0x46A578 Dim $aOffset[1] $aOffset[0] = 0x2EC Dim $Read = _MemoryPointerRead($baseAddr, $hMem, $aOffset, "dword") MsgBox(0, "", $Read) _MemoryClose($hMem)
  4. Use the func from #23. Then try this: $iPID = WinGetProcess("Test") $sModule = "test.dll" $iOffset = 0x1A128 $baseADDR = _MemoryModuleGetBaseAddress($iPID, $sModule) + $iOffset
  5. You can't use string as extended. Btw nice script!
  6. Line 230: If FileExists($hDestPath & "\" & $aArray[uBound($aArray) - 1]) Then Return SetError(0, 0, 1) If you use Return it will leave from the func, and also the loop. You can shorten it on these lines: 82, 118, 156, 230, 269 Line 379: if UBound($aArray) - 1 = 0 Then Return SetError(1, 0, 0) Return $aArray Same on line 409, 537, 556
  7. Use this: GUISetState(@SW_SHOWNOACTIVATE)
  8. If you add just a not fileexists exception it will fail too. When you use CopyHere, it will rename the $hZipFile to randomnamed file, besides it will create a file with $hZipFile name with size of 0 byte. Starts to copy the $hFile2Add into this randomnamed file. When it finished, it deletes the $hZipFile, and renames the randomnamed file to $hZipFile. If you still don't get it change the _Zip_AddFile loop to this: While 1 ConsoleWrite(FileGetSize($hZipFile) & @CR) Sleep(10) If _Zip_Count($hZipFile) = ($files+1) Then ExitLoop WEnd ConsoleWrite(FileGetSize($hZipFile) & @CR) You can see the $hZipFile actual size in the output window, while you keep checking it. Try it with a little bigger file (>1-3MB), where the copy isn't instant.
  9. OK, My previous post was a ********* Finally I solved the "Item.Count" problem, just change the loop in the _Zip_AddFile func from this: While 1 If _Zip_Count($hZipFile) = ($files+1) Then ExitLoop WEndoÝ÷ ÚÚ-+ºÚ"µÍY ÌÍÙ[HH[QÂBTÛY L BU[[ [QÙ]Ú^J ÌÍÚ[JH ÝÈ H[ [QÙ]Ú^J ÌÍÚ[JH ÉÝÈB[ÙBUÚ[HBBRYÖÐÛÝ[ ÌÍÚ[JHH ÌÍÙ[ÊÌJH[^]ÛÜUÑ[[YSimple, huh? The main reason why the old way doesn't works is because CopyHere creates a new randomnamed file without any extension, and the object works with a 'half empty' $hZipFile, so it exits with an error. If the CopyHere finishes it will rename or add the randomnamed file to $hZipFile. Hope that will work correctly. I think you can use this method at _Zip_AddFolder too, but I didn't test it. Other: the _Zip_CountAll doesn't works properly for me. It returns the follwing result: Type: WinRAR ZIP archive Date Modified: 2009. 02. 09. 0:35 Size: 745 bytes And a question: MSDN CopyHere have several options, like hide progress dialog box. I tried '$oApp.NameSpace($hZipFile).CopyHere($hFile2Add,4)', but it still shows the progress box. How can I enable these options? Cheers!
  10. gr8func, thx!
  11. Sounds good, but I can't download. Can you reup?
  12. "Library.dll+offset" solution: Func _MemoryModuleGetBaseAddress($iPID, $sModule) If Not ProcessExists($iPID) Then Return SetError(1, 0, 0) If Not IsString($sModule) Then Return SetError(2, 0, 0) Local $PSAPI = DllOpen("psapi.dll") ;Get Process Handle Local $hProcess Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020) ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE If $iPID > 0 Then Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID) If $hProcess[0] Then $hProcess = $hProcess[0] EndIf EndIf ;EnumProcessModules Local $Modules = DllStructCreate("ptr[1024]") Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0) If $aCall[4] > 0 Then Local $iModnum = $aCall[4] / 4 Local $aTemp For $i = 1 To $iModnum $aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260) If $aTemp[3] = $sModule Then DllClose($PSAPI) Return Ptr(DllStructGetData($Modules, 1, $i)) EndIf Next EndIf DllClose($PSAPI) Return SetError(-1, 0, 0) EndFunc Feel free to include! Based on ModuleSpy from wraithdu.
×
×
  • Create New...