Beispiel #1
0
        public PatternScan(Process process, ProcessModule module)
        {
            memory = new ProcessMemory(process);

            baseAddress = module.BaseAddress;
            size        = module.ModuleMemorySize;

            dump = memory.ReadByteArray(baseAddress, size);
        }
        public bool Execute <T>(ProcessMemory mem, T param) where T : struct
        {
            bool ret = false;

            using (RemoteAllocation ralloc = RemoteAllocation.CreateNew <T>(mem, param))
            {
                ret = Execute(ralloc.Address);
            }
            return(ret);
        }
Beispiel #3
0
        public PatternScan(ProcessMemory processMemory, string moduleName)
        {
            memory = processMemory;

            module = memory.ModuleFromName(moduleName);

            baseAddress = module.BaseAddress;
            size        = module.ModuleMemorySize;

            dump = memory.ReadByteArray(baseAddress, size);
        }
Beispiel #4
0
        public PatternScan(Process process, string moduleName)
        {
            process.Refresh();
            memory = new ProcessMemory(process);

            module = memory.ModuleFromName(moduleName);

            baseAddress = module.BaseAddress;
            size        = module.ModuleMemorySize;

            dump = memory.ReadByteArray(baseAddress, size);
        }
        public static RemoteAllocation CreateNew <T>(ProcessMemory memory, T data) where T : struct
        {
            RemoteAllocation ralloc = new RemoteAllocation(memory.Process);

            if (!ralloc.Allocate(TypeCache <T> .Size))
            {
                return(null);
            }

            memory.Write(ralloc.Address, data);

            return(ralloc);
        }
        public static bool Execute <T>(ProcessMemory memory, IntPtr address, T param) where T : struct
        {
            RemoteFunction fn = new RemoteFunction(memory.Process, address);

            return(fn.Execute(memory, param));
        }