public bool GetVersionInfo(ulong baseAddress, out VersionInfo version) { ElfFile?file = GetElfFile(baseAddress); if (file is null) { version = default; return(false); } return(LinuxFunctions.GetVersionInfo(this, baseAddress, file, out version)); }
public void GetVersionInfo(ulong baseAddress, out VersionInfo version) { ElfLoadedImage image = _core.LoadedImages.First(image => (ulong)image.BaseAddress == baseAddress); ElfFile? file = image.Open(); if (file is null) { version = default; } else { LinuxFunctions.GetVersionInfo(this, baseAddress, file, out version); } }
private ModuleInfo CreateModuleInfo(ElfLoadedImage image) { ElfFile?file = image.Open(); VersionInfo version; int filesize = (int)image.Size; int timestamp = 0; if (file is null) { using PEImage pe = image.OpenAsPEImage(); filesize = pe.IndexFileSize; timestamp = pe.IndexTimeStamp; version = pe.GetFileVersionInfo()?.VersionInfo ?? default; } else { LinuxFunctions.GetVersionInfo(this, (ulong)image.BaseAddress, file, out version); } return(new ModuleInfo((ulong)image.BaseAddress, filesize, timestamp, image.Path, image._containsExecutable, default, version));