Beispiel #1
0
        public string clickip(int port)
        {
            string listViewItem;

            if (!Vip72.Vip72Process.HasExited)
            {
                IntPtr intPtr  = Vip72.FindWindowInProcess(Vip72.Vip72Process, (string s) => s.StartsWith("VIP72 Socks Client"));
                int    num     = 4328465;
                int    num1    = 4324304;
                IntPtr intPtr1 = Vip72.ControlGetHandle(intPtr, "Button", 7817);
                if (Vip72.ControlGetCheck(intPtr1))
                {
                    Vip72.ControlClick(intPtr1);
                }
                IntPtr intPtr2 = Vip72.OpenProcess(2035711, false, Vip72.Vip72Process.Id);
                int    num2    = 0;
                IntPtr zero    = IntPtr.Zero;
                zero = Marshal.AllocHGlobal(4);
                Vip72.ReadProcessMemory(intPtr2, (IntPtr)num, zero, 4, out num2);
                Random random  = new Random();
                uint   id      = (uint)Vip72.Vip72Process.Id;
                IntPtr intPtr3 = Vip72.ControlGetHandle(intPtr, "SysListView32", 117);
                int    num3    = 0;
                while (ListViewItem1.GetListViewItem(intPtr3, id, num3, 4) != "")
                {
                    string str = ListViewItem1.GetListViewItem(intPtr3, id, num3, 4);
                    if ((str.Contains(port.ToString()) ? false : !str.Contains("main stream")))
                    {
                        num3++;
                    }
                    else
                    {
                        ListViewItem1.SelectListViewItem(intPtr3, id, num3);
                        int num4 = 0;
                        Vip72.SendMessageTimeout(intPtr3, 256, (IntPtr)46, IntPtr.Zero, 2, 5000, out num4);
                    }
                }
                num3 = 0;
                int    num5    = -1;
                IntPtr intPtr4 = Vip72.ControlGetHandle(intPtr, "SysListView32", 116);
                while (ListViewItem1.GetListViewItem(intPtr4, id, num3, 0) != "")
                {
                    num3++;
                }
                int num6 = num3;
                if (num6 != 0)
                {
                    num3 = 0;
                    num5 = -1;
                    while (ListViewItem1.GetListViewItem(intPtr4, id, num3, 0) != "")
                    {
                        if (!ListViewItem1.GetListViewItem(intPtr4, id, num3, 0).Contains(".**"))
                        {
                            num3++;
                        }
                        else
                        {
                            num5 = random.Next(0, num6);
                            while (!ListViewItem1.GetListViewItem(intPtr4, id, num5, 0).Contains(".**"))
                            {
                                num5 = random.Next(0, num6);
                            }
                            break;
                        }
                    }
                    if (num5 != -1)
                    {
                        int[] numArray = new int[] { num5 };
                        int   num7     = 0;
                        Vip72.WriteProcessMemory((int)intPtr2, num1, numArray, 4, ref num7);
                        ListViewItem1.SelectListViewItem(intPtr4, id, num5);
                        Vip72.ControlDoubleClick(intPtr4);
                        Thread.Sleep(500);
                        IntPtr   intPtr5 = Vip72.ControlGetHandle(intPtr, "Button", 7303);
                        IntPtr   intPtr6 = Vip72.ControlGetHandle(intPtr, "Edit", 131);
                        DateTime now     = DateTime.Now;
                        while (!Vip72.ControlGetCheck(intPtr5))
                        {
                            if (Vip72.ControlGetText(intPtr6).Contains("ffline"))
                            {
                                listViewItem = "dead";
                                return(listViewItem);
                            }
                            else if (Vip72.ControlGetText(intPtr6).Contains("limit"))
                            {
                                try
                                {
                                    if (!Vip72.Vip72Process.HasExited)
                                    {
                                        Vip72.Vip72Process.Kill();
                                    }
                                }
                                catch (Exception exception)
                                {
                                }
                                listViewItem = "limited";
                                return(listViewItem);
                            }
                            else if (Vip72.ControlGetText(intPtr6).Contains("can't"))
                            {
                                listViewItem = "dead";
                                return(listViewItem);
                            }
                            else if (Vip72.ControlGetText(intPtr6).Contains("disconnect"))
                            {
                                listViewItem = "dead";
                                return(listViewItem);
                            }
                            else if (Vip72.ControlGetText(intPtr6).Contains("aximum"))
                            {
                                listViewItem = "maximum";
                                return(listViewItem);
                            }
                            else if ((DateTime.Now - now).TotalSeconds > 15)
                            {
                                listViewItem = "timeout";
                                return(listViewItem);
                            }
                        }
                        Thread.Sleep(500);
                        intPtr3 = Vip72.ControlGetHandle(intPtr, "SysListView32", 117);
                        num3    = 0;
                        while (ListViewItem1.GetListViewItem(intPtr3, id, num3, 4) != "")
                        {
                            if (!ListViewItem1.GetListViewItem(intPtr3, id, num3, 4).Contains("main stream"))
                            {
                                num3++;
                            }
                            else
                            {
                                listViewItem = ListViewItem1.GetListViewItem(intPtr3, id, num3, 0);
                                return(listViewItem);
                            }
                        }
                        listViewItem = "limited";
                    }
                    else
                    {
                        listViewItem = "no IP";
                    }
                }
                else
                {
                    listViewItem = "no IP";
                }
            }
            else
            {
                listViewItem = "not running";
            }
            return(listViewItem);
        }
Beispiel #2
0
        // Token: 0x0600047A RID: 1146 RVA: 0x00029D50 File Offset: 0x00027F50
        public string clickip(int port)
        {
            int value          = 4328465;
            int lpBaseAddress  = 4324611;
            int lpBaseAddress2 = 4324304;
            int lpBaseAddress3 = 4253085;

            Process[] processByName = this.GetProcessByName("vip72socks");
            bool      flag          = processByName.Count <Process>() == 0;
            string    result;

            if (flag)
            {
                result = "not running";
            }
            else
            {
                Process             arg_66_0 = processByName[0];
                Func <string, bool> arg_66_1;
                if ((arg_66_1 = Vip72Chung.< > c.< > 9__35_0) == null)
                {
                    arg_66_1 = (Vip72Chung.< > c.< > 9__35_0 = new Func <string, bool>(Vip72Chung.< > c.< > 9. < clickip > b__35_0));
                }
                IntPtr parentHandle = Vip72Chung.FindWindowInProcess(arg_66_0, arg_66_1);
                IntPtr intPtr       = Vip72Chung.ControlGetHandle(parentHandle, "Button", 7817);
                bool   flag2        = Vip72Chung.ControlGetCheck(intPtr);
                if (flag2)
                {
                    Vip72Chung.ControlClick(intPtr);
                }
                IntPtr intPtr2  = Vip72Chung.OpenProcess(2035711, false, processByName[0].Id);
                int    num      = 0;
                IntPtr lpBuffer = IntPtr.Zero;
                lpBuffer = Marshal.AllocHGlobal(4);
                Vip72Chung.ReadProcessMemory(intPtr2, (IntPtr)value, lpBuffer, 4, out num);
                Random random  = new Random();
                uint   id      = (uint)processByName[0].Id;
                IntPtr intPtr3 = Vip72Chung.ControlGetHandle(parentHandle, "SysListView32", 117);
                int    num2    = 0;
                while (ListViewItem1.GetListViewItem(intPtr3, id, num2, 4) != "")
                {
                    string listViewItem = ListViewItem1.GetListViewItem(intPtr3, id, num2, 4);
                    bool   flag3        = listViewItem.Contains(port.ToString()) || listViewItem.Contains("main stream");
                    if (flag3)
                    {
                        ListViewItem1.SelectListViewItem(intPtr3, id, num2);
                        int num3 = 0;
                        Vip72Chung.SendMessageTimeout(intPtr3, 256, (IntPtr)46, IntPtr.Zero, 2, 5000, out num3);
                    }
                    else
                    {
                        num2++;
                    }
                }
                IntPtr hwnd = Vip72Chung.ControlGetHandle(parentHandle, "SysListView32", 116);
                while (ListViewItem1.GetListViewItem(hwnd, id, num2, 0) != "")
                {
                    num2++;
                }
                int  num4  = num2;
                bool flag4 = num4 == 0;
                if (flag4)
                {
                    result = "no IP";
                }
                else
                {
                    num2 = 0;
                    int num5 = -1;
                    while (ListViewItem1.GetListViewItem(hwnd, id, num2, 0) != "")
                    {
                        string listViewItem2 = ListViewItem1.GetListViewItem(hwnd, id, num2, 0);
                        bool   flag5         = listViewItem2.Contains(".**");
                        if (flag5)
                        {
                            num5 = random.Next(0, num4);
                            while (!ListViewItem1.GetListViewItem(hwnd, id, num5, 0).Contains(".**"))
                            {
                                num5 = random.Next(0, num4);
                            }
                            break;
                        }
                        num2++;
                    }
                    bool flag6 = num5 == -1;
                    if (flag6)
                    {
                        result = "no IP";
                    }
                    else
                    {
                        int[] array = new int[]
                        {
                            472809
                        };
                        int[] lpBuffer2 = new int[]
                        {
                            port
                        };
                        int[] lpBuffer3 = new int[]
                        {
                            num5
                        };
                        int num6 = 0;
                        Vip72Chung.WriteProcessMemory((int)intPtr2, lpBaseAddress, lpBuffer2, 4, ref num6);
                        Vip72Chung.WriteProcessMemory((int)intPtr2, lpBaseAddress3, array, 4, ref num6);
                        Vip72Chung.WriteProcessMemory((int)intPtr2, lpBaseAddress2, lpBuffer3, 4, ref num6);
                        ListViewItem1.SelectListViewItem(hwnd, id, num5);
                        Vip72Chung.ControlDoubleClick(hwnd);
                        Thread.Sleep(500);
                        array[0] = 21529871;
                        Vip72Chung.WriteProcessMemory((int)intPtr2, lpBaseAddress3, array, 4, ref num6);
                        IntPtr   controlhand = Vip72Chung.ControlGetHandle(parentHandle, "Button", 7303);
                        IntPtr   hwnd2       = Vip72Chung.ControlGetHandle(parentHandle, "Edit", 131);
                        DateTime now         = DateTime.Now;
                        while (!Vip72Chung.ControlGetCheck(controlhand))
                        {
                            bool flag7 = Vip72Chung.ControlGetText(hwnd2).Contains("ffline");
                            if (flag7)
                            {
                                result = "dead";
                                return(result);
                            }
                            bool flag8 = Vip72Chung.ControlGetText(hwnd2).Contains("limit");
                            if (flag8)
                            {
                                try
                                {
                                    bool flag9 = !processByName[0].HasExited;
                                    if (flag9)
                                    {
                                        processByName[0].Kill();
                                    }
                                }
                                catch (Exception)
                                {
                                }
                                result = "limited";
                                return(result);
                            }
                            bool flag10 = Vip72Chung.ControlGetText(hwnd2).Contains("can't");
                            if (flag10)
                            {
                                result = "dead";
                                return(result);
                            }
                            bool flag11 = Vip72Chung.ControlGetText(hwnd2).Contains("disconnect");
                            if (flag11)
                            {
                                result = "dead";
                                return(result);
                            }
                            bool flag12 = Vip72Chung.ControlGetText(hwnd2).Contains("aximum");
                            if (flag12)
                            {
                                result = "maximum";
                                return(result);
                            }
                            bool flag13 = (DateTime.Now - now).TotalSeconds > 15.0;
                            if (flag13)
                            {
                                result = "timeout";
                                return(result);
                            }
                        }
                        Thread.Sleep(500);
                        intPtr3 = Vip72Chung.ControlGetHandle(parentHandle, "SysListView32", 117);
                        num2    = 0;
                        while (ListViewItem1.GetListViewItem(intPtr3, id, num2, 4) != "")
                        {
                            string listViewItem3 = ListViewItem1.GetListViewItem(intPtr3, id, num2, 4);
                            bool   flag14        = listViewItem3.Contains(port.ToString());
                            if (flag14)
                            {
                                result = ListViewItem1.GetListViewItem(intPtr3, id, num2, 0);
                                return(result);
                            }
                            num2++;
                        }
                        result = "limited";
                    }
                }
            }
            return(result);
        }