public void TestPEB() { ProcessEnvironmentBlock peb = new ProcessEnvironmentBlock(); try { Console.WriteLine(peb.BeingDebugged); } catch (InvalidSymbolsException) { // Ignore this exception } try { Console.WriteLine(peb.ProcessHeap.GetPointerAddress()); } catch (InvalidSymbolsException) { // Ignore this exception } try { Console.WriteLine(peb.ProcessHeaps.Length); } catch (InvalidSymbolsException) { // Ignore this exception } try { Console.WriteLine(peb.ProcessParameters.CommandLine); } catch (InvalidSymbolsException) { // Ignore this exception } try { Console.WriteLine(peb.ProcessParameters.EnvironmentVariables.Length); } catch (InvalidSymbolsException) { // Ignore this exception } try { Console.WriteLine(peb.ProcessParameters.ImagePathName); } catch (InvalidSymbolsException) { // Ignore this exception } }
/// <summary> /// Get a remote module by it's name /// </summary> /// <param name="moduleName"></param> /// <returns></returns> public RemoteModule GetModule(string moduleName) => new RemoteModule(this, ProcessEnvironmentBlock.GetModule(moduleName));