コード例 #1
0
        private bool SSHServerFakeIp()
        {
            bool           result   = false;
            bool           _checkip = false;
            string         offer_id = "";
            InterfaceVip72 vip72    = getVip72Instance();

            vip72.clearIpWithPort((int)this.numProxyPort.Value);
            sshcommand.closebitvise((int)this.numProxyPort.Value);

            string curcontry = "";

            this.lblStatusMsg.Invoke(new MethodInvoker(delegate
            {
                this.lblStatusMsg.Text = "Getting SSH from the server...";
                curcontry = this.comboProxyGeo.Text;
                _checkip  = this.checkBox8.Checked;
            }));

            while (true)
            {
                string[] sshInfo = getSSHFromServer(curcontry);
                if (sshInfo == null)
                {
                    base.Invoke(new MethodInvoker(delegate
                    {
                        this.lblStatusMsg.Text = "SSh server return null";
                    }));
                    result = false;
                    break;
                }

                base.Invoke(new MethodInvoker(delegate
                {
                    this.lblStatusMsg.Text = "Connecting to ssh: " + sshInfo[0];
                }));

                bool setSShResult = sshcommand.SetSSH(sshInfo[0], sshInfo[1], sshInfo[2], this.ipProxyHost.Text, this.numProxyPort.Value.ToString(), ref this.bitproc);
                if (setSShResult)
                {
                    base.Invoke(new MethodInvoker(delegate
                    {
                        this.lblStatusMsg.Text = "Connected success";
                    }));
                    result = true;
                    break;
                }
                else
                {
                    base.Invoke(new MethodInvoker(delegate
                    {
                        this.lblStatusMsg.Text = "Connect failed";
                    }));
                }
            }

            return(result);
        }
コード例 #2
0
        private bool Vip72FakeIp()
        {
            bool       result = false;
            vipaccount vipacc = null;

            try
            {
                sshcommand.closebitvise((int)this.numProxyPort.Value);
                bool flag17 = !this.bitproc.HasExited;
                if (flag17)
                {
                    this.bitproc.Kill();
                }
            }
            catch (Exception)
            {
            }
            this.lblStatusMsg.Invoke(new MethodInvoker(delegate
            {
                this.lblStatusMsg.Text = "Đang đợi Để sử dụng Vip72...";
            }));
            InterfaceVip72 vip72 = getVip72Instance();

            this.lblStatusMsg.Invoke(new MethodInvoker(delegate
            {
                this.lblStatusMsg.Text = "Getting Vip72 IP...";
            }));

START_VIP72_FAKEIP:

            while (true)
            {
                vipacc = chooseVip72Account();
                if (vipacc == null)
                {
                    MessageBox.Show("All vip72 are limited or there is no account, Please add other Vip72 account to use",
                                    Application.ProductName,
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Hand);

                    this.lblStatusMsg.Invoke(new MethodInvoker(delegate
                    {
                        this.lblStatusMsg.Text = "Vip72 account is out";
                    }));
                    return(false);
                }
                else
                {
                    this.listViewVip72.Invoke(new MethodInvoker(delegate
                    {
                        this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Yellow;
                        this.listViewVip72.Refresh();
                    }));

                    bool loginResult = vip72.vip72login(vipacc.username, vipacc.password, (int)this.numProxyPort.Value);
                    if (!loginResult)
                    {
                        vipacc.limited = true;
                        vip72.killVipProcess();
                        Thread.Sleep(5000);

                        this.listViewVip72.Invoke(new MethodInvoker(delegate
                        {
                            this.lblStatusMsg.Text = "Vip acc: " + vipacc.username + " login failed";
                            this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Red;
                            this.listViewVip72.Refresh();
                        }));
                    }
                    else
                    {
                        this.listViewVip72.Invoke(new MethodInvoker(delegate
                        {
                            this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Lime;
                            this.listViewVip72.Refresh();
                        }));
                        break;
                    }
                }
            }

            while (true)
            {
                string countryTxt = "";
                this.lblStatusMsg.Invoke(new MethodInvoker(delegate
                {
                    countryTxt = this.comboProxyGeo.Text;
                }));
                if (!vip72.getip(countryTxt))
                {
                    result = true;
                    break;
                }

                string clickResult = vip72.clickip((int)this.numProxyPort.Value);
                if (clickResult == "not running")
                {
                    result = false;
                    break;
                }
                else if (clickResult == "no IP")
                {
                    continue;
                }
                else if (clickResult == "dead")
                {
                    continue;
                }
                else if (clickResult == "limited")
                {
                    vipacc.limited = true;
                    this.listViewVip72.Items[this.listvipacc.IndexOf(vipacc)].BackColor = Color.Red;
                    this.listViewVip72.Refresh();
                    goto START_VIP72_FAKEIP;
                }
                else if (clickResult == "maximum")
                {
                    vip72.clearip();
                    continue;
                }
                else if (clickResult == "timeout")
                {
                    goto START_VIP72_FAKEIP;
                }
                else
                {
                    //OK
                    if (NetworkHelper.validateIP(clickResult))
                    {
                        NetworkHelper.currentFakeIP = clickResult;
                        result = true;
                        break;
                    }
                }
            }

            return(result);
        }
コード例 #3
0
        private bool SSHFakeIP()
        {
            InterfaceVip72 vip72 = getVip72Instance();

            vip72.waitiotherVIP72();
            vip72.clearIpWithPort((int)this.numProxyPort.Value);

            sshcommand.closebitvise((int)this.numProxyPort.Value);
            try
            {
                if (!this.bitproc.HasExited)
                {
                    this.bitproc.Kill();
                }
            }
            catch (Exception)
            {
            }

            bool setSshOK = false;
            bool _checkip = false;

            this.checkBox8.Invoke(new MethodInvoker(delegate
            {
                _checkip = this.checkBox8.Checked;
            }));

            while (true)
            {
                string curcontry = "";
                this.lblStatusMsg.Invoke(new MethodInvoker(delegate
                {
                    curcontry = this.comboProxyGeo.Text;
                    this.lblStatusMsg.Text = "Checking SSH....";
                }));

                ssh _getssh = this.listssh.FirstOrDefault((ssh x) => x.live != "dead" && !x.used && x.country == curcontry);
                if (_getssh == null)
                {
                    if (this.cbRefreshSSH.Checked && this.listssh.Count != 0)
                    {
                        foreach (ssh x in this.listssh)
                        {
                            x.live = "alive";
                            x.used = false;
                        }
                        _getssh = this.listssh.FirstOrDefault((ssh x) => x.live != "dead" && !x.used && x.country == curcontry);
                    }
                    else
                    {
                        MessageBox.Show("All SSH are used or dead, please update new SSH list!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                        setSshOK = false;
                        break;
                    }
                }

                Random random2   = new Random();
                int    randomssh = random2.Next(0, this.listssh.Count);
                while (this.listssh.ElementAt(randomssh).live == "dead" || this.listssh.ElementAt(randomssh).used || this.listssh.ElementAt(randomssh).country != curcontry)
                {
                    randomssh = random2.Next(0, this.listssh.Count);
                }
                _getssh      = this.listssh.ElementAt(randomssh);
                _getssh.used = true;
                NetworkHelper.currentFakeIP = _getssh.IP;

                this.listView2.Invoke(new MethodInvoker(delegate
                {
                    this.listView2.Items[randomssh].BackColor = Color.Aqua;
                    this.listView2.Refresh();
                    this.savessh();
                    this.ssh_uncheck.Text = "Uncheck:" + this.listssh.Count((ssh x) => x.live == "uncheck").ToString();
                    this.ssh_used.Text    = "Used:" + this.listssh.Count((ssh x) => x.used).ToString();
                    this.ssh_live.Text    = "Live:" + this.listssh.Count((ssh x) => x.live == "alive").ToString();
                    this.ss_dead.Text     = "Dead:" + this.listssh.Count((ssh x) => x.live == "dead").ToString();
                }));

                NetworkHelper.currentFakeIP = _getssh.IP;

                bool flag12 = sshcommand.SetSSH(_getssh.IP, _getssh.username, _getssh.password, this.ipProxyHost.Text, this.numProxyPort.Value.ToString(), ref this.bitproc);
                if (flag12)
                {
                    setSshOK = true;
                    break;
                }
                _getssh.live = "dead";
                this.listView2.Invoke(new MethodInvoker(delegate
                {
                    this.listView2.Items[this.listssh.IndexOf(_getssh)].BackColor = Color.Red;
                    this.listView2.Refresh();
                    this.savessh();
                    this.ssh_uncheck.Text = "Uncheck:" + this.listssh.Count((ssh x) => x.live == "uncheck").ToString();
                    this.ssh_used.Text    = "Used:" + this.listssh.Count((ssh x) => x.used).ToString();
                    this.ssh_live.Text    = "Live:" + this.listssh.Count((ssh x) => x.live == "alive").ToString();
                    this.ss_dead.Text     = "Dead:" + this.listssh.Count((ssh x) => x.live == "dead").ToString();
                }));
            }

            return(setSshOK);
        }