Initial commit

This commit is contained in:
2025-06-30 18:15:07 +03:00
commit 4977ae71de
15 changed files with 837 additions and 0 deletions
+11
View File
@@ -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;
}
}
+17
View File
@@ -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; }
}
}
+25
View File
@@ -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")
};
}
}
}