Esempio n. 1
0
        public void write()
        {
            try
            {
                ProcessMemoryReaderLib.ProcessMemoryReader preader = new ProcessMemoryReaderLib.ProcessMemoryReader();
                ProcessMemoryReader Reader    = new ProcessMemoryReader();
                Process[]           MyProcess = Process.GetProcessesByName(textBox1.Text);
                preader.ReadProcess = MyProcess[0];
                preader.OpenProcess();

                int    byteswritten;
                long   value;
                byte[] memory;
                string wadress     = textBox2.Text;
                IntPtr writeadress = new IntPtr(Convert.ToInt32(wadress, 16));

                value  = Convert.ToInt64(textBox3.Text);
                memory = BitConverter.GetBytes(value);
                preader.WriteProcessMemory((IntPtr)writeadress, memory, out byteswritten);


                label5.ForeColor = Color.Green;
                label5.Text      = "Değerleriniz Aktarıldı!...";
            }

            catch
            {
                label5.ForeColor = Color.Red;
                label5.Text      = "Hata Oluştu!...";
            }
        }
 public PlayerDataManager()
 {
     try
     {
         proc = Process.GetProcessesByName(gameName)[0];
         memReader = new ProcessMemoryReader();
         memReader.ReadProcess = proc;
         memReader.OpenProcess();
         offsets = new Offsets(memReader.MainModuleBase);
         memReader.GetModuleBase();
     }
     catch (IndexOutOfRangeException)
     {
         MessageBox.Show("Please open Assault Cube before starting the hack!");
         Environment.Exit(0);
     }
     catch (Exception i)
     {
         MessageBox.Show("Exception", i.GetType().ToString() + ": " + i.Message + "\n" + i.StackTrace, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Environment.Exit(0);
     }
     entityPlayerData = new PlayerData[maxPlayers];
     localPlayerData = new PlayerData();
 }