Advertisement
SlothNGU

Shitty Proxy Code

Dec 5th, 2016
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. public class ProxyShit
  2. {
  3.         public List<ProxyList> ProxyList = new List<ProxyList>();
  4.         private async void loadProxys()
  5.         {
  6.             await Task.Run(() =>
  7.             {
  8.                 using (WebClient wc = new WebClient())
  9.                 {
  10.                     try
  11.                     {
  12.                         string resp = wc.DownloadString("https://hidester.com/proxydata/php/data.php?mykey=csv&country=&port=&type=1&anonymity=7&ping=1&gproxy=2");
  13.                         dynamic Json = JsonConvert.DeserializeObject(resp);
  14.                         int ProxyAmount = Json.Count;
  15.                         Parallel.For(0, ProxyAmount, new ParallelOptions() { MaxDegreeOfParallelism = 1000000 }, ProxyInfo =>
  16.                         { ProxyList.Add(new proxies { IP = Json[ProxyInfo].IP, Port = Json[ProxyInfo].PORT }); });
  17.                     }
  18.                     catch (Exception ex)
  19.                     {
  20.                     }
  21.                 }
  22.             });
  23.         }
  24. }
  25. public class ProxyList
  26. {
  27.         public string IP { get; set; }
  28.         public int Port { get; set; }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement