Beispiel #1
0
        private void MaingInspectingWorking()
        {
            bool flag = false;

            if (!this.MainInspectingThread.IsAlive)
            {
                return;
            }
            while (!flag)
            {
                Process process = this.findExistMapleProccess();
                if (process == null || process.HasExited || !(process.MainWindowHandle != IntPtr.Zero))
                {
                    continue;
                }
                IntPtr intPtr = this.findExistBypassProccess();
                if (intPtr == IntPtr.Zero)
                {
                    continue;
                }
                MapleStoryInspector.ShowWindow(intPtr, 0);
                MapleStoryInspector.SetWindowText(process.MainWindowHandle, "小喵谷");
                Thread.Sleep(5000);
                IntPtr intPtr1 = MapleStoryInspector.OpenProcess(2035711, false, process.Id);
                byte[] bytes   = BitConverter.GetBytes(1999999);
                int    num     = 0;
                MapleStoryInspector.WriteProcessMemory((int)intPtr1, 11887312, bytes, (int)bytes.Length, ref num);
                flag = true;
                this.SendMessage("破攻完成");
                this.SendMessage("啟動成功!");
            }
        }
Beispiel #2
0
        private void MaingReceiveWorking()
        {
Label1:
            while (this.MainReceiveThread.IsAlive)
            {
                KeyValuePair <short, string> keyValuePair = this.cb.ReceiveMsg(this.tcpClient);
                short key = keyValuePair.Key;
                if (key == 10)
                {
                    Process process = this.findExistMapleProccess();
                    int     num     = 0;
                    try
                    {
                        num = int.Parse(keyValuePair.Value);
                    }
                    catch (FormatException formatException)
                    {
                        StringBuilder stringBuilder = new StringBuilder();
                        char[]        array         = keyValuePair.Value.ToArray <char>();
                        for (int i = 0; i < (int)array.Length; i++)
                        {
                            char chr = array[i];
                            if (!char.IsNumber(chr))
                            {
                                break;
                            }
                            stringBuilder.Append(chr);
                        }
                        num = int.Parse(stringBuilder.ToString());
                    }
                    if (this.bkd == num)
                    {
                        continue;
                    }
                    IntPtr intPtr = MapleStoryInspector.OpenProcess(2035711, false, process.Id);
                    byte[] bytes  = BitConverter.GetBytes((double)(1999999 + num));
                    int    num1   = 0;
                    MapleStoryInspector.WriteProcessMemory((int)intPtr, 11887312, bytes, (int)bytes.Length, ref num1);
                    this.bkd = num;
                    this.SendMessage(string.Concat("破攻完成 - 頂傷", 1999999 + num));
                }
                else
                {
                    switch (key)
                    {
                    case 20:
                    {
                        Process.Start(keyValuePair.Value);
                        this.SendMessage(string.Concat("您的贊助網址 : ", keyValuePair.Value));
                        continue;
                    }

                    case 21:
                    {
                        this.SendMessage(string.Concat("GM幫忙開的贊助網址 : ", keyValuePair.Value));
                        continue;
                    }

                    case 22:
                    {
                        string str = this.MapleStoryExe.Substring(0, this.MapleStoryExe.Length - "MapleStory.Exe".Length);
                        if (!File.Exists(string.Concat(str, "Skill.wz")))
                        {
                            Console.WriteLine(str);
                            this.SendMessage("主程式資料夾檔案不全!");
                            Aries.Lib.OnMapleStoryStartFail onMapleStoryStartFail = this.OnMapleStoryStartFail;
                            if (onMapleStoryStartFail == null)
                            {
                                return;
                            }
                            onMapleStoryStartFail();
                            return;
                        }
                        try
                        {
                            byte[]        numArray = new byte[16384];
                            Stream        stream   = File.Open(string.Concat(str, "Skill.wz"), FileMode.Open, FileAccess.Read, FileShare.Read);
                            HashAlgorithm mD5CryptoServiceProvider = new MD5CryptoServiceProvider();
                            int           num2      = 0;
                            byte[]        numArray1 = new byte[16384];
                            while (true)
                            {
                                int num3 = stream.Read(numArray, 0, (int)numArray.Length);
                                num2 = num3;
                                if (num3 <= 0)
                                {
                                    break;
                                }
                                mD5CryptoServiceProvider.TransformBlock(numArray, 0, num2, numArray1, 0);
                            }
                            mD5CryptoServiceProvider.TransformFinalBlock(numArray, 0, 0);
                            string str1 = BitConverter.ToString(mD5CryptoServiceProvider.Hash);
                            mD5CryptoServiceProvider.Clear();
                            stream.Close();
                            if (str1.Replace("-", "") != MapleStoryInspector.check_md5)
                            {
                                this.Stop();
                                this.SendMessage("檢測到您的遊戲檔案與伺服器不符合,可能為惡意修改WZ或系統錯誤。");
                            }
                            continue;
                        }
                        catch (FileNotFoundException fileNotFoundException)
                        {
                            this.SendMessage("權限不足,請以管理員模式開啟登入器!");
                            continue;
                        }
                        break;
                    }

                    default:
                    {
                        if (key == 666)
                        {
                            break;
                        }
                        else
                        {
                            goto Label1;
                        }
                    }
                    }
                    this.SendMessage(keyValuePair.Value);
                }
            }
        }