Results 1 to 6 of 6

Thread: autoit dayz radar script

  1. #1
    Mooooooo says the cow
    Join Date
    Mar 2013
    Location
    Hell
    Posts
    36
    Rep Power
    0

    autoit dayz radar script

    Just a simple radar script I found for autoit, I believe it's broken but shouldn't be too hard to fix.

    Atleast people get the idea^^

    Code:
    #cs ----------------------------------------------------------------------------
    
     
    
     AutoIt Version: 3.3.8.1
    
     Author:         myName
    
     
    
     Script Function:
    
            Template AutoIt script.
    
     
    
    #ce ----------------------------------------------------------------------------
    
     
    
    ; Script Start - Add your code below here
    
     
    
     
    
    ;dayz INFOS : http://www.unknowncheats.me/forum/arma-2-and-dayz/69792-arma2-player-entities-6.html
    
     
    
    #region constant
    
    #include <GUIConstants.au3>
    
    #include <WindowsConstants.au3>
    
    #include <GDIPlus.au3>
    
    #include <Misc.au3>
    
    #include <Math.au3>
    
    #include <array.au3>
    
    global $game_base=0xdfcdd8
    
    global $playerInfoBase=0xDEEAE8
    
    #endregion
    
     
    
     
    
     
    
     
    
    Opt("WinTitleMatchMode", -1)
    
    SetPrivilege("SeDebugPrivilege", 1)
    
    Global $Arma_Title = "[CLASS:Direct3DWindowClass]"
    
    Global $Arma = _MemoryOpen(ProcessExists("aRMa2oa.exe"))
    
    If @error Then
    
            MsgBox(4096, "ERROR", "Failed to open memory for process : " & ProcessExists("aRMa2oa.exe"))
    
            Exit 1
    
    EndIf
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    Func offsetlist()
    
     
    
    ;ObjectTablePtr: ObjTableBase] + 0x5FC] + 0]
    
    ;ObjTableSize: ObjTableBase] + 0x5FC] + 4]
    
     
    
    global $ObjTableBase = _MemoryRead($game_base, $Arma, 'ptr')
    
    global $ObjectTablePtr_A = _MemoryRead($ObjTableBase+0x5fc, $Arma, 'ptr')
    
    _log("ObjectTablePtr_A : " & $ObjectTablePtr_A)
    
     
    
    global $ObjectTablePtr = _MemoryRead($ObjectTablePtr_A+0x0, $Arma, 'ptr')
    
    _log("ObjectTablePtr : " & $ObjectTablePtr)
    
     
    
    global $ObjTableSize = _MemoryRead($ObjectTablePtr_A+0x4, $Arma, 'int')
    
    _log("ObjTableSize : " & $ObjTableSize)
    
     
    
     
    
    Endfunc
    
     
    
     
    
    Func GetMyPos()
    
    $LocalPlayer_a =  _MemoryRead($ObjTableBase + 0x13A8, $Arma, 'ptr')
    
    $LocalPlayer_b =  _MemoryRead($LocalPlayer_a + 0x4, $Arma, 'ptr')
    
    $LocalPlayer = _MemoryRead($LocalPlayer_b + 0x18, $Arma, 'ptr')
    
    _log("--------------------------------------------------")
    
     
    
    _log("LocalPlayer : " & $LocalPlayer)
    
       Dim $return[5]
    
            $return[0] = _MemoryRead($LocalPlayer + 0x28, $Arma, 'float') ; X
    
            _log("X : " & $return[0])
    
            $return[1] = _MemoryRead($LocalPlayer + 0x30, $Arma, 'float') ; Y
    
            _log("Y : " & $return[1])
    
            $return[2] = _MemoryRead($LocalPlayer + 0x2c, $Arma, 'float') ; Altitude Z
    
            _log("Z : " & $return[2])
    
            $return[3] = _MemoryRead($LocalPlayer + 0x24, $Arma, 'float') ; X direction
    
            $return[4] = _MemoryRead($LocalPlayer + 0x1c, $Arma, 'float') ; Y direction
    
            _log("X Dir : " & $return[3])
    
            _log("Y Dir : " & $return[4])
    
    _log(("--------------------------------------------------"))
    
       Return $return
    
    Endfunc
    
     
    
     
    
     
    
    Func IterateObjectList()
    
    ConsoleWrite("-----Iterating through Scoreboard------" & @CRLF)
    
            $PlayerCount_a = _MemoryRead($playerInfoBase + 0x24, $Arma, 'ptr')
    
            $PlayerCount = _MemoryRead($PlayerCount_a + 0x1C, $Arma, 'int')
    
     
    
            $ScoreboardArray_a = _MemoryRead($playerInfoBase + 0x24, $Arma, 'ptr')
    
            $ScoreboardArray = _MemoryRead($PlayerCount_a + 0x18, $Arma, 'ptr')
    
    _log("PlayerCount = " & $PlayerCount)
    
    _log("ScoreboardArray = " & $ScoreboardArray)
    
     
    
     
    
     
    
     
    
    Dim $Scoreboard[$PlayerCount+1][3]
    
     
    
    For $i = 0 To $PlayerCount Step +1
    
    $NameID =  _MemoryRead($ScoreboardArray + $i*0xf8 + 4, $Arma, 'int')
    
    $PlayerNameAddress =  _MemoryRead($ScoreboardArray + $i*0xf8 + 0x88, $Arma, 'ptr')
    
    $realname = _MemoryRead($PlayerNameAddress + 0x8, $Arma, 'char[256]')
    
     
    
    $Scoreboard[$i][0] = $i
    
    $Scoreboard[$i][1] = $NameID
    
    $Scoreboard[$i][2] = $realname
    
     
    
    _log("NameID : " & $NameID & @TAB &"PlayerNameAddress : " & $PlayerNameAddress & @TAB & "realname : " & $realname)
    
     
    
    Next
    
    _log('--------------------------------------------------')
    
     
    
     
    
    ConsoleWrite("-----Iterating through Objects------" & @CRLF)
    
    $CurrentLoc = GetMyPos()
    
     
    
     
    
     
    
       Dim $OBJ[$ObjTableSize + 1][9]
    
    ConsoleWrite("Number of Actors : " & $ObjTableSize+1 & @CRLF)
    
       For $i = 0 To $ObjTableSize Step +1
    
          ;$curobj_ptr1 = _MemoryRead($_CurOffset + $objptr1, $Arma, 'ptr')
    
     
    
     
    
     
    
          $objPtr = _MemoryRead($ObjectTablePtr + ($i * 0x34), $Arma, 'ptr')
    
     
    
              
    
              
    
              
    
          $Entity  = _MemoryRead($objPtr + 0x4, $Arma, 'ptr')
    
              
    
              
    
              
    
              $ObjTypeStringAddress_a = _MemoryRead($Entity + 0x3c, $Arma, 'ptr')
    
              $ObjTypeStringAddress = _MemoryRead($ObjTypeStringAddress_a + 0x30, $Arma, 'ptr')
    
     
    
            ;on chope le nom de l'objet
    
          $Obj_Name = _MemoryRead($ObjTypeStringAddress + 0x8, $Arma, 'char[256]')
    
     
    
            ;on chope les coords de l'obj
    
              $Obj_Coords =  _MemoryRead($Entity + 0x18, $Arma, 'ptr')
    
              $_POS_X = _MemoryRead($Obj_Coords + 0x28 , $Arma, 'float')
    
          $_POS_Y = _MemoryRead($Obj_Coords + 0x30, $Arma, 'float')
    
          $_POS_Z = _MemoryRead($Obj_Coords + 0x2C, $Arma, 'float')
    
     
    
            ;l'objet est il arm?, si oui on get le nom de l'arme
    
              $WeaponID = _MemoryRead($Entity + 0x6E0, $Arma, 'int')
    
              If $WeaponID = -1 Then
    
              $weaponName = - 1
    
              Else
    
              $weaponNameAddress_a = _MemoryRead($Entity + 0x694, $Arma, 'ptr')
    
              $weaponNameAddress_b = _MemoryRead ($weaponNameAddress_a + 0x24 * $WeaponID + 8, $Arma, 'ptr')
    
              $weaponNameAddress_c = _MemoryRead($weaponNameAddress_b + 0x10, $Arma, 'ptr')
    
              $weaponNameAddress = _MemoryRead($weaponNameAddress_c + 4, $Arma, 'ptr')
    
              $weaponName =  _MemoryRead($weaponNameAddress + 0x8, $Arma, 'char[256]')
    
              Endif
    
     
    
            ;Le joueur est il mort ? 0 = alive    1 = dead    IsDead: Player + 0x20C]
    
            $IsDead = _MemoryRead($Entity + 0x20c, $Arma, 'byte')
    
     
    
            ;$Realname
    
            $GenericName = _MemoryRead($Entity + 0xAC8, $Arma, 'int')
    
     
    
            if $GenericName > 1 then
    
     
    
    For $u = 0 To $PlayerCount
    
     
    
    if $Scoreboard[$u][1] = $GenericName then
    
    $realname = $Scoreboard[$u][2]
    
    ContinueLoop
    
    endif
    
     
    
    Next
    
     
    
              
    
              
    
              
    
              
    
     
    
            Else
    
            $realname = ""
    
            Endif
    
     
    
     
    
          $xd = $_POS_X - $CurrentLoc[0]
    
          $yd = $_POS_Y - $CurrentLoc[1]
    
          $zd = $_POS_Z - $CurrentLoc[2]
    
          $Distance = Sqrt($xd * $xd + $yd * $yd + $zd * $zd)
    
          $OBJ[$i][0] = $i
    
          $OBJ[$i][1] = $Obj_Name
    
          $OBJ[$i][2] = $_POS_X
    
          $OBJ[$i][3] = $_POS_Y
    
          $OBJ[$i][4] = $_POS_Z
    
          $OBJ[$i][5] = $Distance
    
              $OBJ[$i][6] = $weaponName
    
              $OBJ[$i][7] = $realname
    
              $OBJ[$i][8] = $IsDead
    
              if $OBJ[$i][8] = 1 then
    
              $OBJ[$i][8] = "Dead"
    
              Endif
    
         ; $OBJ[$i][6] = $_CurOffset
    
    _log($i  & " : " & $i * 34 & " : " & @TAB &" x:" & Round($_POS_X) & @TAB &" y:" & Round($_POS_Y) & @TAB &" z:" & Round($_POS_Z) & @TAB &" distance : " & Round($Distance) & @TAB& @TAB & "name : " &$Obj_Name & " realname : " & $realname)
    
     
    
       Next
    
       ;_ArrayDisplay($OBJ)
    
       Return $OBJ
    
    EndFunc   ;==>IterateObjectList
    
     
    
     
    
    Func IterateItemList()
    
    ConsoleWrite("-----Iterating through items------" & @CRLF)
    
     
    
     $compteur_totale = 0;
    
     
    
    Dim $MasterOffsets[3] = [0x880, 0xb24, 0xdc8]
    
    Dim $SlaveOffsets[4] = [0x8, 0xb0, 0x158, 0x200]
    
     
    
       For $i = 0 to UBound($MasterOffsets) - 1
    
              $Master = $MasterOffsets[$i]
    
              $MasterArray = _MemoryRead($game_base, $Arma, 'ptr') + $Master
    
     
    
              For $y = 0 to UBound($SlaveOffsets)-1
    
     
    
                     $Slave = $SlaveOffsets[0]
    
                     $SlaveArray = _MemoryRead($MasterArray + $Slave, $Arma, 'ptr')
    
                     $SlaveSize = _MemoryRead($MasterArray + $Slave + 8, $Arma, 'int')
    
                                     ;$SlaveSize = $SlaveSize / 12
    
                     ;_log("SlaveSize = " & $SlaveSize)
    
     
    
                     for $x = 0 to $SlaveSize
    
     
    
                            $entPtr = _MemoryRead($SlaveArray + ($x*4), $Arma, 'ptr')
    
                            $ent2 =  _MemoryRead($entPtr + 0x3C, $Arma, 'ptr')
    
                            $ent3 =  _MemoryRead($ent2 + 0x30, $Arma, 'ptr')
    
                                                    $name = _MemoryRead($ent3 + 0x8, $Arma, 'char[256]')
    
     
    
     
    
       if $name == "" Then
    
               ExitLoop
    
       EndIF
    
       
    
       $compteur_totale += 1
    
                                                    $ent1 = _MemoryRead($entPtr + 0x18, $Arma, 'ptr')
    
                                                    $posx = _MemoryRead($ent1 + 0x28, $Arma, 'float')
    
                                                                                                    $posy = _MemoryRead($ent1 + 0x30, $Arma, 'float')
    
                                                                                                    
    
                                                                                                    ;_log("(" & $compteur_totale & ") " & $i & ") " & $y & ") (" & $x & ") (" & $SlaveSize &  ") name = " & $name & " x = " & $posx & " y = " & $posy)
    
                                                                                                    
    
                                                                                                    if StringInStr($name, "WeaponHolder", 0) Then
    
                                                                                                       
    
                                                                                                      
    
                                                                                                       $WeaponOlderptr = _MemoryRead($entPtr + 0x21C, $Arma, 'ptr')
    
                                                                                                       
    
                                                                                                                            _log("-> "& $name)                                                                
    
                                                                                                     WeaponOlderWeap($WeaponOlderptr)
    
                                                                                                     WeaponOlderAmmo($WeaponOlderptr)
    
                                                                                                       
    
                                                                                                       
    
                                                                                                       
    
                                                                                                       
    
                                                                                                    EndIF
    
                                                                                                    
    
                                                    
    
     
    
                     Next
    
     
    
              Next
    
     
    
       Next
    
     
    
     
    
    endfunc
    
     
    
     
    
     func WeaponOlderWeap($WeaponOlderptr)
    
            $WeaponOlderCountweap = _MemoryRead($WeaponOlderptr + 0x10, $Arma, 'int')
    
              for $t = 0 to $WeaponOlderCountweap - 1
    
                     $WeaponOlderptr2weap = _MemoryRead($WeaponOlderptr + 0xC, $Arma, 'int')
    
                     $WeaponOlderptr3weap = _MemoryRead($WeaponOlderptr2weap + $t*4, $Arma, 'int')
    
                     $WeaponOlderptr4weap = _MemoryRead($WeaponOlderptr3weap + 0x10, $Arma, 'int')
    
                     $WeaponOlderptr5weap = _MemoryRead($WeaponOlderptr4weap + 0x4, $Arma, 'int')
    
                     ;$WeaponOlderptr6 = _MemoryRead($WeaponOlderptr5 + 0x4, $Arma, 'int')
    
                     $WeaponOlderNameweap = _MemoryRead($WeaponOlderptr5weap + 0x8, $Arma, 'char[256]')
    
              
    
              _log(" weap --> " &  $WeaponOlderNameweap)
    
              Next
    
     EndFunc
    
     
    
     func WeaponOlderAmmo($WeaponOlderptr)
    
              $WeaponOlderCountammo = _MemoryRead($WeaponOlderptr + 0x1C, $Arma, 'int')
    
              for $t = 0 to $WeaponOlderCountammo - 1
    
                     $WeaponOlderptr2ammo = _MemoryRead($WeaponOlderptr + 0x18, $Arma, 'int')
    
                     $WeaponOlderptr3ammo = _MemoryRead($WeaponOlderptr2ammo + $t*4, $Arma, 'int')
    
                     $WeaponOlderptr4ammo = _MemoryRead($WeaponOlderptr3ammo + 0x8, $Arma, 'int')
    
                     $WeaponOlderptr5ammo = _MemoryRead($WeaponOlderptr4ammo + 0xC, $Arma, 'int')
    
                     $WeaponOlderptr6ammo = _MemoryRead($WeaponOlderptr5ammo + 0x4, $Arma, 'int')
    
                     $WeaponOlderNameammo = _MemoryRead($WeaponOlderptr6ammo + 0x8, $Arma, 'char[256]')
    
              
    
              _log(" ammo --> " &  $WeaponOlderNameammo)
    
              Next
    
    EndFunc
    
     
    
     
    
     
    
     
    
    Func Terminate()
    
     
    
            Exit 0
    
     
    
    EndFunc   ;==>Terminate
    
     
    
    HotKeySet("{F2}", "Terminate")
    
    ;HotKeySet("{F1}","IterateObjectList")
    
     
    
     
    
    Func _log($text)
    
    ConsoleWrite($text & @CRLF)
    
    EndFunc   ;==>_log
    
     
    
    #region
    
     
    
    Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $iv_InheritHandle = 1)
    
     
    
            If Not ProcessExists($iv_Pid) Then
    
                    SetError(1)
    
                    Return 0
    
            EndIf
    
     
    
            Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
    
     
    
            If @error Then
    
                    SetError(2)
    
                    Return 0
    
            EndIf
    
     
    
            Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $iv_InheritHandle, 'int', $iv_Pid)
    
     
    
            If @error Then
    
                    DllClose($ah_Handle[0])
    
                    SetError(3)
    
                    Return 0
    
            EndIf
    
     
    
            $ah_Handle[1] = $av_OpenProcess[0]
    
     
    
            Return $ah_Handle
    
     
    
    EndFunc   ;==>_MemoryOpen
    
     
    
    Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
    
     
    
            If Not IsArray($ah_Handle) Then
    
                    SetError(1)
    
                    Return 0
    
            EndIf
    
     
    
            Local $v_Buffer = DllStructCreate($sv_Type)
    
     
    
            If @error Then
    
                    SetError(@error + 1)
    
                    Return 0
    
            EndIf
    
     
    
            DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    
     
    
            If Not @error Then
    
                    Local $v_Value = DllStructGetData($v_Buffer, 1)
    
                    Return $v_Value
    
            Else
    
                    SetError(6)
    
                    Return 0
    
            EndIf
    
     
    
    EndFunc   ;==>_MemoryRead
    
     
    
     
    
    Func _MemoryClose($ah_Handle)
    
     
    
            If Not IsArray($ah_Handle) Then
    
                    SetError(1)
    
                    Return 0
    
            EndIf
    
     
    
            DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
    
            If Not @error Then
    
                    DllClose($ah_Handle[0])
    
                    Return 1
    
            Else
    
                    DllClose($ah_Handle[0])
    
                    SetError(2)
    
                    Return 0
    
            EndIf
    
     
    
    EndFunc   ;==>_MemoryClose
    
     
    
    Func SetPrivilege($privilege, $bEnable)
    
     
    
            ; Const $TOKEN_ADJUST_PRIVILEGES = 0x0020
    
            ; Const $TOKEN_QUERY = 0x0008
    
            ; Const $SE_PRIVILEGE_ENABLED = 0x0002
    
            Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
    
            $nTokens = 1
    
            $LUID = DllStructCreate("dword;int")
    
            If IsArray($privilege) Then $nTokens = UBound($privilege)
    
            $TOKEN_PRIVILEGES = DllStructCreate("dword;dword[" & (3 * $nTokens) & "]")
    
            $NEWTOKEN_PRIVILEGES = DllStructCreate("dword;dword[" & (3 * $nTokens) & "]")
    
            $hCurrProcess = DllCall("kernel32.dll", "hwnd", "GetCurrentProcess")
    
            $SP_auxret = DllCall("advapi32.dll", "int", "OpenProcessToken", "hwnd", $hCurrProcess[0], _
    
                            "int", BitOR($TOKEN_ADJUST_PRIVILEGES, $TOKEN_QUERY), "int_ptr", 0)
    
            If $SP_auxret[0] Then
    
                    $hToken = $SP_auxret[3]
    
                    DllStructSetData($TOKEN_PRIVILEGES, 1, 1)
    
                    $nTokenIndex = 1
    
                    While $nTokenIndex <= $nTokens
    
                            If IsArray($privilege) Then
    
                                    $priv = $privilege[$nTokenIndex - 1]
    
                            Else
    
                                    $priv = $privilege
    
                            EndIf
    
                            $ret = DllCall("advapi32.dll", "int", "LookupPrivilegeValue", "str", "", "str", $priv, _
    
                                            "ptr", DllStructGetPtr($LUID))
    
                            If $ret[0] Then
    
                                    If $bEnable Then
    
                                            DllStructSetData($TOKEN_PRIVILEGES, 2, $SE_PRIVILEGE_ENABLED, (3 * $nTokenIndex))
    
                                    Else
    
                                            DllStructSetData($TOKEN_PRIVILEGES, 2, 0, (3 * $nTokenIndex))
    
                                    EndIf
    
                                    DllStructSetData($TOKEN_PRIVILEGES, 2, DllStructGetData($LUID, 1), (3 * ($nTokenIndex - 1)) + 1)
    
                                    DllStructSetData($TOKEN_PRIVILEGES, 2, DllStructGetData($LUID, 2), (3 * ($nTokenIndex - 1)) + 2)
    
                                    DllStructSetData($LUID, 1, 0)
    
                                    DllStructSetData($LUID, 2, 0)
    
                            EndIf
    
                            $nTokenIndex += 1
    
                    WEnd
    
                    $ret = DllCall("advapi32.dll", "int", "AdjustTokenPrivileges", "hwnd", $hToken, "int", 0, _
    
                                    "ptr", DllStructGetPtr($TOKEN_PRIVILEGES), "int", DllStructGetSize($NEWTOKEN_PRIVILEGES), _
    
                                    "ptr", DllStructGetPtr($NEWTOKEN_PRIVILEGES), "int_ptr", 0)
    
                    $f = DllCall("kernel32.dll", "int", "GetLastError")
    
            EndIf
    
            $NEWTOKEN_PRIVILEGES = 0
    
            $TOKEN_PRIVILEGES = 0
    
            $LUID = 0
    
            If $SP_auxret[0] = 0 Then Return 0
    
            $SP_auxret = DllCall("kernel32.dll", "int", "CloseHandle", "hwnd", $hToken)
    
            If Not $ret[0] And Not $SP_auxret[0] Then Return 0
    
            Return $ret[0]
    
    EndFunc   ;==>SetPrivilege
    
    Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0, $iv_Address = 0x00100000)
    
     
    
            Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword')
    
            Local $vData
    
            Local $vType
    
     
    
            If Not IsArray($ah_Handle) Then
    
                    SetError(1)
    
                    Return 0
    
            EndIf
    
     
    
     
    
            DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
    
     
    
            If Not @error Then
    
     
    
                    $vData = Hex(DllStructGetData($v_Buffer, 2))
    
                    $vType = Hex(DllStructGetData($v_Buffer, 3))
    
     
    
                    While $vType <> "00000080"
    
                            DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
    
                            $vData = Hex(DllStructGetData($v_Buffer, 2))
    
                            $vType = Hex(DllStructGetData($v_Buffer, 3))
    
                            If Hex($iv_Address) = "90000000" Then ExitLoop
    
                            $iv_Address += 65536
    
     
    
                    WEnd
    
     
    
                    If $vType = "00000080" Then
    
                            SetError(0)
    
                            If $iHexDec = 1 Then
    
                                    Return Dec($vData)
    
                            Else
    
                                    Return $vData
    
                            EndIf
    
     
    
                    Else
    
                            SetError(2)
    
                            Return 0
    
                    EndIf
    
     
    
            Else
    
                    SetError(3)
    
                    Return 0
    
            EndIf
    
     
    
    EndFunc   ;==>_MemoryGetBaseAddress
    
    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   ;==>_MemoryModuleGetBaseAddress
    
    #endregion
    
     
    
     
    
    func main()
    
    offsetlist()
    
     
    
    ;IterateObjectList()
    
    IterateItemList()
    
     
    
            while 1
    
                    sleep (100)
    
            WEnd
    
    EndFunc
    
    main()

    The Best VPN!
    VVV Click Below VVV


  2. #2
    SSH-Admin/Leader
    Join Date
    Apr 2013
    Location
    USA
    Posts
    571
    Rep Power
    10
    "Template AutoIt script."

    Template?
    Is that why it doesn't work

    The Best VPN!
    VVV Click Below VVV


  3. #3
    Mooooooo says the cow
    Join Date
    Mar 2013
    Location
    Hell
    Posts
    36
    Rep Power
    0
    Nah that is just random top comments. Ignore that =P It's a copy paste ^^

    The Best VPN!
    VVV Click Below VVV


  4. #4
    Banned
    Join Date
    Apr 2013
    Location
    Chernogorsk Fire Station
    Posts
    331
    Rep Power
    0
    Radar as in ESP?

    The Best VPN!
    VVV Click Below VVV


  5. #5
    Mooooooo says the cow
    Join Date
    Mar 2013
    Location
    Hell
    Posts
    36
    Rep Power
    0
    Basically ESP yes. =)

    The Best VPN!
    VVV Click Below VVV


  6. #6
    Can you help me find molly?
    Join Date
    Mar 2013
    Location
    Elektro
    Posts
    223
    Rep Power
    5
    Haha, funny to see that AutoIt is used for this. I used it back in the days to automate installs in a company where i did some IT stuff. Thats also where my nickname comes from

    The Best VPN!
    VVV Click Below VVV


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •