Results 1 to 6 of 6
  1. #1
    AMDUser1993's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    101
    Reputation
    38
    Thanks
    1,476
    My Mood
    Devilish

    Thumbs up Bo2 | Online SAFE Tools | SOURCE EDITION | MemoryModule

    Final Release and goodbye!

    Many of you have been asking me to come back so I can release some quality content, I have given a very small amount
    of lucky people a free ESP which I had been working back a few weeks ago but as for now I'm leaving and not coming back.

    Here is some source code which the leeches like to use that can be used with BO2, I'm also sharing this as people will try
    to charge you for this shit yet it's aids code.


    Code Below
    Code:
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    using System.Text;
    
    namespace HERE ADD YOUR PROJECT NAME
    {
      [StandardModule]
      internal sealed class MemoryModule
      {
        private static string TargetProcess = "t6mp";
        private static IntPtr ProcessHandle = IntPtr.Zero;
        private static int LastKnownPID = -1;
        private const uint PROCESS_VM_WRITE = 32;
        private const uint PROCESS_VM_READ = 16;
        private const uint PROCESS_VM_OPERATION = 8;
    
        [DllImport("kernel32.dll")]
        private static extern IntPtr OpenProcess(uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
    
        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, IntPtr nSize, out IntPtr lpNumberOfBytesWritten);
    
        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, IntPtr dwSize, ref IntPtr lpNumberOfBytesRead);
    
        [DllImport("kernel32.dll", SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        private static extern bool CloseHandle(IntPtr hObject);
    
        private static bool ProcessIDExists(int pID)
        {
          Process[] processesByName = Process.GetProcessesByName(MemoryModule.TargetProcess);
          int index = 0;
          while (index < processesByName.Length)
          {
            if (processesByName[index].Id == pID)
              return true;
            checked { ++index; }
          }
          return false;
        }
    
        public static void SetProcessName(string processName)
        {
          MemoryModule.TargetProcess = processName;
          if (MemoryModule.ProcessHandle != IntPtr.Zero)
            MemoryModule.CloseHandle(MemoryModule.ProcessHandle);
          MemoryModule.LastKnownPID = -1;
          MemoryModule.ProcessHandle = IntPtr.Zero;
        }
    
        public static string GetCurrentProcessName()
        {
          return MemoryModule.TargetProcess;
        }
    
        public static bool UpdateProcessHandle()
        {
          if (MemoryModule.LastKnownPID == -1 || !MemoryModule.ProcessIDExists(MemoryModule.LastKnownPID))
          {
            if (MemoryModule.ProcessHandle != IntPtr.Zero)
              MemoryModule.CloseHandle(MemoryModule.ProcessHandle);
            Process[] processesByName = Process.GetProcessesByName(MemoryModule.TargetProcess);
            if (processesByName.Length == 0)
              return false;
            MemoryModule.LastKnownPID = processesByName[0].Id;
            MemoryModule.ProcessHandle = MemoryModule.OpenProcess(56U, false, processesByName[0].Id);
            if (MemoryModule.ProcessHandle == IntPtr.Zero)
              return false;
          }
          return true;
        }
    
        public static T ReadMemory<T>(object address)
        {
          return MemoryModule.ReadMemory<T>(Conversions.ToLong(address));
        }
    
        public static T ReadMemory<T>(int address)
        {
          return MemoryModule.ReadMemory<T>(new IntPtr(address), 0, false);
        }
    
        public static T ReadMemory<T>(long address)
        {
          return MemoryModule.ReadMemory<T>(new IntPtr(address), 0, false);
        }
    
        public static T ReadMemory<T>(IntPtr address)
        {
          return MemoryModule.ReadMemory<T>(address, 0, false);
        }
    
        public static byte[] ReadMemory(IntPtr address, int length)
        {
          return MemoryModule.ReadMemory<byte[]>(address, length, false);
        }
    
        public static byte[] ReadMemory(int address, int length)
        {
          return MemoryModule.ReadMemory<byte[]>(new IntPtr(address), length, false);
        }
    
        public static byte[] ReadMemory(long address, int length)
        {
          return MemoryModule.ReadMemory<byte[]>(new IntPtr(address), length, false);
        }
    
        public static T ReadMemory<T>(IntPtr address, int length, bool unicodeString)
        {
          byte[] bytes = (object) typeof (T) != (object) typeof (string) ? ((object) typeof (T) != (object) typeof (byte[]) ? new byte[checked (Marshal.SizeOf(typeof (T)) - 1 + 1)] : new byte[checked (length - 1 + 1)]) : (!unicodeString ? new byte[checked (length - 1 + 1)] : new byte[checked (length * 2 - 1 + 1)]);
          T obj;
          if (!MemoryModule.UpdateProcessHandle())
          {
            obj = default (T);
          }
          else
          {
            IntPtr processHandle = MemoryModule.ProcessHandle;
            IntPtr lpBaseAddress = address;
            byte[] lpBuffer = bytes;
            IntPtr dwSize = new IntPtr(bytes.Length);
            IntPtr zero = IntPtr.Zero;
            // ISSUE: explicit reference operation
            // ISSUE: variable of a reference type
            IntPtr& lpNumberOfBytesRead = @zero;
            if (!MemoryModule.ReadProcessMemory(processHandle, lpBaseAddress, lpBuffer, dwSize, lpNumberOfBytesRead))
              obj = default (T);
            else if ((object) typeof (T) == (object) typeof (byte[]))
              obj = Conversions.ToGenericParameter<T>((object) bytes);
            else if ((object) typeof (T) == (object) typeof (string))
            {
              obj = !unicodeString ? Conversions.ToGenericParameter<T>((object) Encoding.ASCII.GetString(bytes)) : Conversions.ToGenericParameter<T>((object) Encoding.Unicode.GetString(bytes));
            }
            else
            {
              GCHandle gcHandle = GCHandle.Alloc((object) bytes, GCHandleType.Pinned);
              T genericParameter = Conversions.ToGenericParameter<T>(Marshal.PtrToStructure(gcHandle.AddrOfPinnedObject(), typeof (T)));
              gcHandle.Free();
              obj = genericParameter;
            }
          }
          return obj;
        }
    
        private static byte[] GetObjectBytes(object value)
        {
          if ((object) value.GetType() == (object) typeof (byte[]))
            return (byte[]) value;
          byte[] destination = new byte[checked (Marshal.SizeOf(RuntimeHelpers.GetObjectValue(value)) - 1 + 1)];
          IntPtr num = Marshal.AllocHGlobal(destination.Length);
          Marshal.StructureToPtr(RuntimeHelpers.GetObjectValue(value), num, true);
          Marshal.Copy(num, destination, 0, destination.Length);
          Marshal.FreeHGlobal(num);
          return destination;
        }
    
        public static bool WriteMemory<T>(object address, T value)
        {
          return MemoryModule.WriteMemory<T>(Conversions.ToLong(address), value);
        }
    
        public static bool WriteMemory<T>(object address, object value)
        {
          return MemoryModule.WriteMemory<T>(Conversions.ToLong(address), Conversions.ToGenericParameter<T>(value));
        }
    
        public static bool WriteMemory<T>(int address, T value)
        {
          return MemoryModule.WriteMemory<T>(new IntPtr(address), value);
        }
    
        public static bool WriteMemory<T>(int address, object value)
        {
          return MemoryModule.WriteMemory<T>(address, Conversions.ToGenericParameter<T>(value));
        }
    
        public static bool WriteMemory<T>(long address, T value)
        {
          return MemoryModule.WriteMemory<T>(new IntPtr(address), value);
        }
    
        public static bool WriteMemory<T>(long address, object value)
        {
          return MemoryModule.WriteMemory<T>(address, Conversions.ToGenericParameter<T>(value));
        }
    
        public static bool WriteMemory<T>(IntPtr address, T value)
        {
          return MemoryModule.WriteMemory<T>(address, value, false);
        }
    
        public static bool WriteMemory<T>(IntPtr address, object value)
        {
          return MemoryModule.WriteMemory<T>(address, Conversions.ToGenericParameter<T>(value), false);
        }
    
        public static bool WriteMemory<T>(object address, T value, bool unicode)
        {
          return MemoryModule.WriteMemory<T>(Conversions.ToLong(address), value, unicode);
        }
    
        public static bool WriteMemory<T>(int address, T value, bool unicode)
        {
          return MemoryModule.WriteMemory<T>(new IntPtr(address), value, unicode);
        }
    
        public static bool WriteMemory<T>(long address, T value, bool unicode)
        {
          return MemoryModule.WriteMemory<T>(new IntPtr(address), value, unicode);
        }
    
        public static bool WriteMemory<T>(IntPtr address, T value, bool unicode)
        {
          if (!MemoryModule.UpdateProcessHandle())
            return false;
          byte[] numArray = !((object) value is string) ? MemoryModule.GetObjectBytes((object) value) : (!unicode ? Encoding.ASCII.GetBytes(value.ToString()) : Encoding.Unicode.GetBytes(value.ToString()));
          IntPtr processHandle = MemoryModule.ProcessHandle;
          IntPtr lpBaseAddress = address;
          byte[] lpBuffer = numArray;
          IntPtr nSize = new IntPtr(numArray.Length);
          IntPtr zero = IntPtr.Zero;
          // ISSUE: explicit reference operation
          // ISSUE: variable of a reference type
          IntPtr& lpNumberOfBytesWritten = @zero;
          return MemoryModule.WriteProcessMemory(processHandle, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten);
        }
      }
    }
    Your signature has been removed by the MPGH Administration team.

    It violates one of the Forum Rules

  2. #2
    twas brillig's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Southeastern USA
    Posts
    54
    Reputation
    10
    Thanks
    77
    My Mood
    Amused
    Just a note for those that are grabbing this and using it: Be careful when doing comparisons with int and long using the "==" operator. Just make sure you're actually comparing the values and not the reference.
    Software Developer, Educator, and Gamer.

  3. #3
    xXrodionXx's Avatar
    Join Date
    Apr 2017
    Gender
    male
    Posts
    33
    Reputation
    22
    Thanks
    4
    Make it more flexible by making the TargetProcess editable.

  4. #4
    Queezy's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    If this is a code for ESP, how can i use it xD

  5. #5
    sharklord420's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Posts
    63
    Reputation
    121
    Thanks
    161
    My Mood
    Buzzed
    Quote Originally Posted by Queezy View Post
    If this is a code for ESP, how can i use it xD
    It's not directly for a esp, but you could use it to make a esp.

  6. #6
    xYummyless's Avatar
    Join Date
    Apr 2017
    Gender
    male
    Location
    chiraq
    Posts
    74
    Reputation
    10
    Thanks
    540
    My Mood
    Drunk
    thanks for this, i need this

Similar Threads

  1. [Release] Bo2 | Private Match SAFE Tools | BOT NAME CHANGER
    By AMDUser1993 in forum Call of Duty 9 - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 16
    Last Post: 10-05-2017, 02:35 AM
  2. [Detected] Bo2 | Online SAFE Tools | VSAT REBORN | Updated Hack
    By AMDUser1993 in forum Call of Duty 9 - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 278
    Last Post: 11-08-2016, 04:39 PM
  3. [Outdated] Bo2 | Online Tool | ULTIMATE TOOL V1
    By PsychoChester in forum Call of Duty 9 - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 147
    Last Post: 09-23-2016, 11:11 AM
  4. [Detected] Bo2 | Online SAFE Tools | ZOMBIES REBORN
    By Recigy in forum Call of Duty 9 - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 23
    Last Post: 07-28-2016, 02:15 PM
  5. [Outdated] Bo2 | Online SAFE Tools | VSAT | Killstreaks
    By AMDUser1993 in forum Call of Duty 9 - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 104
    Last Post: 06-17-2016, 05:19 AM