All pastes #623621 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-17 18:58 UTC
rendered paste body
 #region "Long Proxy Rotating ;("
                        listBox5.Items.Add("Login Blocked. Ziro C# is rotating proxies...");
                    TryAgain:
                        if (Stopped == true) { goto End; }
                        if (checkBox4.Checked == false)
                        {
                            Count++;
                            if (Count == TotalCount)
                            {
                                listBox5.Items.Add("Ziro is checking to see if your IP is working again...");
                                WC.Proxy = null;
                                Count = 0;
                                goto Retry;
                            }
                        }
                        //Switch Proxy
                        try
                        {
                            listBox3.SelectedIndex++;
                        }
                        catch
                        {
                            listBox3.SelectedIndex = -1;
                            listBox3.SelectedIndex++;
                        }
                        try
                        {
                            Port = Convert.ToInt32(Split(listBox3.Text, ":"));
                            Host = Remove(listBox3.Text, ":");
                        }
                        catch
                        {
                            goto TryAgain;
                        }
                        Thread Thread2 = new Thread(Proxy);
                        ProxyBool = false;
                        Thread2.Start();
                        while (ProxyBool == false)
                        {
                            Application.DoEvents();
                            continue;
                        }
                        while (Thread2.IsAlive == true)
                        {
                            Application.DoEvents();
                            continue;
                        }
                        if (Stopped == true) { goto End; }
                        //Test Proxy
                        Thread Thread3 = new Thread(Test);
                        Thread3.Start();
                        int Timeout = int.Parse(textBox5.Text);
                        System.Diagnostics.Stopwatch SW = new System.Diagnostics.Stopwatch();
                        SW.Start();
                        TestBool = false;
                        while (TestBool == false)
                        {
                            Application.DoEvents();
                            if (SW.ElapsedMilliseconds == Timeout)
                            {
                                listBox5.Items.Add("Ziro C# has timed-out the proxy, rotating...");
                                DestoryWC();
                                SW.Reset();
                                goto TryAgain;
                            }
                            else
                            {
                                continue;
                            }
                        }
                        SW.Reset();
                        while (Thread3.IsAlive == true)
                        {
                            Application.DoEvents();
                            continue;
                        }
                        if (TestString == "")
                        {
                            goto TryAgain;
                        }
                        else
                        {
                            listBox5.Items.Add("Ziro C# has found a working proxy!" + " Continuing...");
                            WC.Credentials = CredentialCache.DefaultCredentials;
                            WC.Headers.Add("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5");
                            CountRetry = 0;
                            OnProxy = true;
                            goto Retry;
                        }
                        #endregion