Initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
namespace WebmrAPI.Models
|
||||
{
|
||||
public class MemoryRegionInfo
|
||||
{
|
||||
public string BaseAddress { get; set; } = string.Empty;
|
||||
public long RegionSize { get; set; }
|
||||
public string State { get; set; } = string.Empty;
|
||||
public string Protect { get; set; } = string.Empty;
|
||||
public string Type { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace WebmrAPI.Models
|
||||
{
|
||||
public class ProcessInfo
|
||||
{
|
||||
private readonly object _lock = new object();
|
||||
|
||||
public int ProcessId { get; set; }
|
||||
public string ProcessName { get; set; } = string.Empty;
|
||||
public string? BaseAddress { get; set; }
|
||||
public long VirtualMemorySize { get; set; }
|
||||
public string? CommandLine { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WebmrAPI.Services
|
||||
{
|
||||
public class ProcessModuleInfo
|
||||
{
|
||||
public string? ModuleName { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public string? BaseAddress { get; set; }
|
||||
public long MemorySize { get; set; }
|
||||
public string? EntrypointAddress { get; set; }
|
||||
|
||||
public static ProcessModuleInfo FromProcessModule(ProcessModule module)
|
||||
{
|
||||
return new ProcessModuleInfo
|
||||
{
|
||||
ModuleName = module.ModuleName,
|
||||
FileName = module.FileName,
|
||||
BaseAddress = "0x" + module.BaseAddress.ToInt64().ToString("X"),
|
||||
MemorySize = module.ModuleMemorySize,
|
||||
EntrypointAddress = "0x" + module.EntryPointAddress.ToInt64().ToString("X")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user