Exemple #1
0
        public static string proxy_sellect()
        {
            string result;

            for (; ;)
            {
                InManager.smethod_0();
                Colorful.Console.Write("[1]HTTP/[2]SOCKS4/[3]SOCKS5 : ", Color.DarkSlateBlue);
                Colorful.Console.ForegroundColor = Color.White;
                try
                {
                    string text = Colorful.Console.ReadKey().KeyChar.ToString();
                    Colorful.Console.WriteLine();
                    Colorful.Console.ResetColor();
                    if (!(text == "1") && !(text == "2") && !(text == "3"))
                    {
                        Colorful.Console.ForegroundColor = Color.Yellow;
                        Colorful.Console.WriteLine("[Error: Must be an integer between 1 and 3]");
                        Colorful.Console.ResetColor();
                        continue;
                    }
                    result = text;
                }
                catch
                {
                    Colorful.Console.ForegroundColor = Color.Yellow;
                    Colorful.Console.WriteLine("[Error: Must be an integer]");
                    Colorful.Console.ResetColor();
                    continue;
                }
                break;
            }
            return(result);
        }
Exemple #2
0
        // Takes User Input for thread Count;
        public static int thread_count()
        {
            int result;

            for (; ;)
            {
                InManager.smethod_0();
                Colorful.Console.Write("Threads amount : ", Color.DarkSlateBlue);
                Colorful.Console.ForegroundColor = Color.White;
                try
                {
                    int num = Convert.ToInt32(Colorful.Console.ReadLine());
                    Colorful.Console.ResetColor();
                    result = num;
                }
                catch
                {
                    Colorful.Console.ForegroundColor = Color.Yellow;
                    Colorful.Console.WriteLine("[Error: Must be an integer]");
                    Colorful.Console.ResetColor();
                    continue;
                }
                break;
            }
            return(result);
        }