Example #1
0
        public static void WriteMemoryValue(string name, IntPtr baseadress, long value)
        {
            IntPtr hprocess = OpenProcess(0x1F0FFF, false, ECHelper.GetPIDByProcessName(name));

            WriteProcessMemory(hprocess, baseadress, new long [] { value }, 4, IntPtr.Zero);
            CloseHandle(hprocess);
        }
Example #2
0
        private void timBlood_Tick(object sender, EventArgs e)
        {
            timBlood.Interval = 100;
            int adress1 = ECHelper.ReadMemoryValue(name, (IntPtr)baseadress);

            adress1 = adress1 + 0x1E0;
            ECHelper.WriteMemoryValue(name, (IntPtr)adress1, 1139999456);          //cs血无限1139999456
        }
Example #3
0
        private void btnBoom_Click(object sender, EventArgs e)
        {
            int adress1 = ECHelper.ReadMemoryValue(name, (IntPtr)baseadress);

            adress1 = adress1 + 0x7C;
            int adress2 = ECHelper.ReadMemoryValue(name, (IntPtr)adress1);

            adress2 = adress2 + 0x628;
            ECHelper.WriteMemoryValue(name, (IntPtr)adress2, 0x3E7);          //cs高爆手雷无限
        }
Example #4
0
        private void timMoney_Tick(object sender, EventArgs e)
        {
            timMoney.Interval = 500;
            int adress1 = ECHelper.ReadMemoryValue(name, (IntPtr)baseadress);

            adress1 = adress1 + 0x7C;
            int adress2 = ECHelper.ReadMemoryValue(name, (IntPtr)adress1);

            adress2 = adress2 + 0x1CC;
            ECHelper.WriteMemoryValue(name, (IntPtr)adress2, 0x1869F);          //cs钱无线
        }
Example #5
0
        private void timDefence_Tick(object sender, EventArgs e)
        {
            timDefence.Interval = 200;
            int adress1 = ECHelper.ReadMemoryValue(name, (IntPtr)baseadress);

            adress1 = adress1 + 0x7c;
            int adress2 = ECHelper.ReadMemoryValue(name, (IntPtr)adress1);

            adress2 = adress2 + 0x4;
            int adress3 = ECHelper.ReadMemoryValue(name, (IntPtr)adress2);

            adress3 = adress3 + 0x1bc;
            ECHelper.WriteMemoryValue(name, (IntPtr)adress3, 1139999456);          //cs护甲无限1139999456
        }
Example #6
0
        private void timShoot_Tick(object sender, EventArgs e)
        {
            timShoot.Interval = 300;
            int adress1 = ECHelper.ReadMemoryValue(name, (IntPtr)baseadress);

            adress1 = adress1 + 0x7C;
            int adress2 = ECHelper.ReadMemoryValue(name, (IntPtr)adress1);

            adress2 = adress2 + 0x5EC;
            int adress3 = ECHelper.ReadMemoryValue(name, (IntPtr)adress2);

            adress3 = adress3 + 0xCC;
            ECHelper.WriteMemoryValue(name, (IntPtr)adress3, 0x64);          //cs子弹无线
        }
Example #7
0
 public static int ReadMemoryValue(string name, IntPtr baseadress)
 {
     try
     {
         byte[] buffer       = new byte[4];
         IntPtr bufferadress = Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0);
         IntPtr hprocess     = OpenProcess(0x1F0FFF, false, ECHelper.GetPIDByProcessName(name));
         ReadProcessMemory(hprocess, baseadress, bufferadress, 4, IntPtr.Zero);
         CloseHandle(hprocess);
         return(Marshal.ReadInt32(bufferadress));
     }
     catch
     {
         return(0);
     }
 }
Example #8
0
 private void btnGame_Click(object sender, EventArgs e)
 {
     if (ECHelper.GetPIDByProcessName(name) == 0)
     {
         MessageBox.Show("在这之前总要启动游戏吧~~~~");
     }
     else
     {
         btnBlood.Enabled   = true;
         btnBoom.Enabled    = true;
         btnDefence.Enabled = true;
         btnMoney.Enabled   = true;
         btnShoot.Enabled   = true;
         btnGame.Text       = "已启动";
     }
 }