Beispiel #1
0
 public static bool isPeHeader(System.Diagnostics.Process process, ulong p, MEMORY_PROTECT memoryProtection)
 {
     // We don't want to set off a page guard exception!
     if (memoryProtection.ToString().ToUpper().Contains("GUARD"))
     {
         return(false);
     }
     else
     {
         return(isPeHeader(process, p));
     }
 }
Beispiel #2
0
 /// <summary>
 /// Sets the memory protection. ie. read, write, execute
 /// </summary>
 /// <param name="process"></param>
 /// <param name="address"></param>
 /// <param name="length"></param>
 /// <param name="protection">The protection code: </param>
 public static bool SetMemoryProtection(Process process, IntPtr address, uint length, MEMORY_PROTECT protection)
 {
     uint oldProtection = 0;
     bool result = VirtualProtectEx(process.Handle, (IntPtr)address, (UIntPtr)length, (uint)protection, out oldProtection);
     return result;
 }
Beispiel #3
0
 public HEAP_INFO(ulong heapAddress, ulong heapLength, string heapProtection, string extra, ProcessModule associatedModule, StateEnum state, MEMORY_PROTECT protect)
 {
     this.heapAddress = heapAddress;
     this.heapLength = heapLength;
     this.heapProtection = heapProtection;
     this.extra = extra;
     this.associatedModule = associatedModule;
     this.state = state;
     this.protect = protect;
 }
 public static bool isPeHeader(System.Diagnostics.Process process, ulong p, MEMORY_PROTECT memoryProtection)
 {
     // We don't want to set off a page guard exception!
       if (memoryProtection.ToString().ToUpper().Contains("GUARD"))
     return false;
       else
     return isPeHeader(process, p);
 }