Hack Forums
[C#] [SOURCE] HMA Proxy Grabber and Proxy Checker - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] [SOURCE] HMA Proxy Grabber and Proxy Checker (/showthread.php?tid=2658126)



[SOURCE] HMA Proxy Grabber and Proxy Checker - Narut0xSyn30 - Jul 8, 2012

I made a C# application that grabs proxies from HideMyAss and another application that checks if the proxies is working

Proxy Checker:
[Image: wixwp.png]

Source: Proxy Checker Source - Mediafire

Binary: Binary link - Mediafire

Credits: CaptainBri's Proxy Checker Source (Used the part where it scans the proxies)

Proxy Grabber:
[Image: E7CHl.png]

Source: Proxy Grabber Source - Mediafire

Binary: Binary link - Mediafire

Credits: soft2050's HMA Proxy Grabber Snippet

Cheers! ✌


* - PoRt21 - Jul 9, 2012

holy shit man,,nice share,,thank u mate :)


* - Kazankoph - Dec 25, 2013

Doesn't work anymore:(
it only displays multiple lines of this:

.Xq4U{display:none}
.Twny{display:inline}
.YaPR{display:none}
.aeJq{display:inline}
218.18223.49.366387104167184:9000
.u6L-{display:none}
.uJpY{display:inline}
71.122.2696118140.128212:40623


* - Chunked - Dec 26, 2013

Here's a working snippet I use in my software.

Code
List<string> Proxies = new List<string>();

    for (int i = 1; i <= amountofpagestoscrapfrom; i++)
    {
    foreach (string[] s in Regex.Matches(new WebClient().DownloadString("http://www.hidemyass.com/proxy-list/" + i.ToString()), @"(?:<td class=""leftborder timestamp""(?s).+?<style>)((?s).+?)\s*<td>\s+(\d{2,5})</td>").Cast<Match>().Select(m => new string[] { m.Groups[1].Value, m.Groups[2].Value }))
    {
    Regex.Matches(s[0], @"\.([^\{]+)\{([^\}]+)\}").Cast<Match>().ToList().ForEach(m => s[0] = s[0].Replace(string.Format(@"class=""{0}""", m.Groups[1].Value), string.Format(@"style=""{0}""", m.Groups[2].Value)));
    Proxies.Add(string.Concat(Regex.Matches(Regex.Replace(Regex.Replace(s[0], @"<(span|div) style=""display:none"">[\d\.]+</\1>", string.Empty).Remove(0, s[0].IndexOf("/style>")), @"class=""\d+""", string.Empty), @"[\d\.]+").Cast<Match>().Select(m => m.Value)) + ":" + s[1]);
    }
    }

/thread.


* - x64 - Dec 26, 2013

(Dec 26, 2013 10:57 AM)MonsterVPN Wrote:  Here's a working snippet I use in my software.

Code
List<string> Proxies = new List<string>();

    for (int i = 1; i <= amountofpagestoscrapfrom; i++)
    {
    foreach (string[] s in Regex.Matches(new WebClient().DownloadString("http://www.hidemyass.com/proxy-list/" + i.ToString()), @"(?:<td class=""leftborder timestamp""(?s).+?<style>)((?s).+?)\s*<td>\s+(\d{2,5})</td>").Cast<Match>().Select(m => new string[] { m.Groups[1].Value, m.Groups[2].Value }))
    {
    Regex.Matches(s[0], @"\.([^\{]+)\{([^\}]+)\}").Cast<Match>().ToList().ForEach(m => s[0] = s[0].Replace(string.Format(@"class=""{0}""", m.Groups[1].Value), string.Format(@"style=""{0}""", m.Groups[2].Value)));
    Proxies.Add(string.Concat(Regex.Matches(Regex.Replace(Regex.Replace(s[0], @"<(span|div) style=""display:none"">[\d\.]+</\1>", string.Empty).Remove(0, s[0].IndexOf("/style>")), @"class=""\d+""", string.Empty), @"[\d\.]+").Cast<Match>().Select(m => m.Value)) + ":" + s[1]);
    }
    }

/thread.

Dat code is like one of the most messed up code I've ever seen in my life. xD


* - Ban - Dec 26, 2013

(Dec 26, 2013 11:56 AM)Lambik Wrote:  Dat code is like one of the most messed up code I've ever seen in my life. xD

I was thinking the exact same thing here, aha. Still, if it works it works at the very least. :P