Fix small offset error in is64BitDll

This commit is contained in:
Nick Landers
2019-07-31 12:57:42 -06:00
parent b2981d5e2f
commit 7e73a4285b
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -467,7 +467,7 @@ namespace RDIShellcodeLoader
IntPtr scPointer = scHandle.AddrOfPinnedObject();
Int32 headerOffset = Marshal.ReadInt32(scPointer, 60);
UInt16 magic = (UInt16)Marshal.ReadInt16(scPointer, 60 + headerOffset);
UInt16 magic = (UInt16)Marshal.ReadInt16(scPointer, headerOffset + 4);
if (magic == (UInt16)512 || magic == (UInt16)34404)
is64Bit = true;
+1 -2
View File
@@ -41,7 +41,7 @@ public class sRDI
IntPtr scPointer = scHandle.AddrOfPinnedObject();
Int32 headerOffset = Marshal.ReadInt32(scPointer, 60);
UInt16 magic = (UInt16)Marshal.ReadInt16(scPointer, 60 + headerOffset);
UInt16 magic = (UInt16)Marshal.ReadInt16(scPointer, headerOffset + 4);
if (magic == (UInt16)512 || magic == (UInt16)34404)
is64Bit = true;
@@ -51,7 +51,6 @@ public class sRDI
return is64Bit;
}
public static byte[] ConvertToShellcode(byte[] dllBytes, uint functionHash, byte[] userData, uint flags)
{
//MARKER:S