Пример #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="DebugEngineProxy" /> class.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <param name="client">The client.</param>
 /// <param name="registers">The registers.</param>
 /// <param name="systemObjects">The system objects.</param>
 /// <param name="debugDataSpaces">The debug data spaces.</param>
 public DebugEngineProxy(IDebugControl6 control, IDebugClient5 client, IDebugRegisters2 registers,
     IDebugSystemObjects systemObjects, IDebugDataSpaces debugDataSpaces, IExecuteWrapper executeWrapper)
 {
     Control = control;
     Client = client;
     Registers = registers;
     Dataspaces = debugDataSpaces;
     ExecuteWrapper = executeWrapper;
     RegisterEngine = new RegisterEngine(); // todo: inject
     MemoryEngine = new MemoryEngine();
     SystemObjects = systemObjects;
     Is32Bit =
         Regex.Match(ExecuteWrapper.Execute("!peb"), @"PEB at (?<peb>[a-fA-F0-9]+)").Groups["peb"].Value
             .Length == 8;
 }
Пример #2
0
 /// <summary>
 ///     Reads the virtual memory.
 /// </summary>
 /// <param name="memoryRange">The memory range.</param>
 /// <returns>System.Byte[].</returns>
 /// <inheritdoc />
 public byte[] ReadVirtualMemory(MemoryRange memoryRange)
 {
     return MemoryEngine.ReadMemory(memoryRange.LowAddress, memoryRange.HighAddress, Dataspaces);
 }