Beispiel #1
0
 protected virtual uint GetDestinationAddr(uint baseAddr, ProcessWriter processWriter)
 {
     if (config.AddrDrifts == null)
     {
         return(baseAddr + config.AddrBasedOnMoudule);
     }
     else
     {
         return(ProcessWriter.GetAddrByPointer(processWriter.ProcessInfo, baseAddr, config.AddrDrifts.ToArray(), (uint)config.AddrDrifts.Count));
     }
 }
Beispiel #2
0
 /// <summary>
 /// @return
 /// </summary>
 protected virtual uint GetBaseAddr()
 {
     if (ModuleName == "exe")
     {
         return(processWriter.ProcessInfo.ExeBaseAddress);
     }
     else if (ModuleName != null)
     {
         uint baseaddr = ProcessWriter.GetProcessModuleBaseAddr(processWriter.Pid, ModuleName);
         if (baseaddr == 0)
         {
             throw new Exception("模组查找失败!可能是由于模块未加载或模块名错误!");
         }
         return(baseaddr);
     }
     else
     {
         return(0);
     }
 }