Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[SOURCE] Pulling IP's from HideMyAss

I did this in response to this thread here:

https://hackforums.net/showthread.php?tid=2649418

It's just a small little function to parse IP's from HMA's shitty semi-obfuscated web source.

[Image: M2LvN.png]


Code
#Region "GetProxies Function"
    Shared Sub Get50Proxies()
  Dim ts As String = String.Empty
  Dim t As String = String.Empty
  ProxyList.Clear()
  Dim s As String = wc.DownloadString("http://hidemyass.com/proxy-list/").Replace("<td rel", "ʘ")
  For i As Integer = 1 To 50
    ts = Split(s, "class=""updatets")(i).Split("ʘ")(0)
    t = String.Empty
    For ip As Integer = 1 To (System.Text.RegularExpressions.Regex.Matches(ts, "<div").Count + System.Text.RegularExpressions.Regex.Matches(ts, "<span").Count + System.Text.RegularExpressions.Regex.Matches(ts, "<td").Count) * 2 + 1
    If Not Split(ts.Replace(" ", ""), "<")(ip).Split(">")(0).Contains(":none") And Not String.IsNullOrEmpty(Split(ts.Replace(" ", ""), ">")(ip + 1).Split("<")(0).Replace(".", String.Empty).Replace(Chr(10), String.Empty).Replace(Chr(9), String.Empty)) Then
    t &= Split(ts.Replace(" ", ""), ">")(ip + 1).Split("<")(0).Replace(".", "").TrimStart(Chr(10)) & "."
    End If
    Next
    t = t.TrimEnd(".")
    t = t.Insert(t.LastIndexOf(".") + 1, ":")
    t = t.Remove(t.LastIndexOf("."), 1)
    MsgBox(t)
    ProxyList.Add(t)
  Next
    End Sub
#End Region


Enjoy guys.
(Jul 6, 2012 12:15 AM)kolec94 Wrote:  someone really sked for this its where most grabber get thier ip's

I'm not sure what you mean, I made this myself.
(Jul 6, 2012 11:35 AM)kolec94 Wrote:  not that hard to make a proxy grabber

It was for this site, take a look at their page source.
That I call a pro with the Split Function.
Lmao, it's so funny how I was making one of these and now you post it.

Cool, nice job!
Hahah, thanks for the feedback and compliments you guys.
How would u display all the ips in a listview
Very nice code, thanks for the share!
(Jul 13, 2012 08:00 AM)li0nsar3c00l Wrote:  could you pls update your snippet? i never really understood regex and its pretty awesome to grab from hidemyass than any other site

Why would I need to update it? It works fine.
I'm sorry if this sounds noobish, but I keep getting outputs like this:
[IMG]http://i72.photobucket.com/albums/i200/hipio/screenshot.png[/IMG]

What can I do to fix this? Ofcourse I can use split to get rid of that display:none shit, but the code doesn't return the port and that is a bit of a problem.
Uhggg they changed their source again already! Jesus christ these guys are annoying. If anybody can figure out a new more easier method such as querying a server file, that would be nice.
I found this too! hackforums.net/showthread.php?tid=1591083

It's made by the user Simran. Not sure whether the Regex works anymore, but it looks easy to use. The source links are down though.
(Jul 13, 2012 01:41 PM)Cody8295 Wrote:  Uhggg they changed their source again already! Jesus christ these guys are annoying. If anybody can figure out a new more easier method such as querying a server file, that would be nice.

I tried to fix it myself, but yeah. That failed..
Holy shit thanks man, iv been trying todo this for ages but i really bad with slipting
if i could rep i would
If anyone is interested this one will work with the new source, it's in C# though.
[Image: IAOc]

Code
static List<string> GetProxy()
  {
    List<string> li = new List<string>();
    string src = new WebClient() { Proxy = null }.DownloadString("http://hidemyass.com/proxy-list/");
    foreach (Match m in Regex.Matches(src, @"<tr class="".*?""  rel=""\d+?"">([\s\S]+?)</style>([\s\S]+?)<td>\s(\d+)</td>"))
    {
    string ws = m.Groups[2].Value;
    foreach (Match _m in Regex.Matches(m.Groups[1].Value, @"\.(.+?)\{(.+?)\}"))
    {
    ws = ws.Replace(string.Format(@"class=""{0}""", _m.Groups[1].Value), string.Format(@"style=""{0}""", _m.Groups[2].Value));
    }
    ws = string.Format("{0}:{1}", Regex.Replace(ws, @"<(div|span) style=""display:none"">.*?</(div|span)>|<[^>]+?>|\s", ""), m.Groups[3].Value);
    li.Add(ws);
    }
    return li;
  }


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by koolkidJan 17, 2018 12:57 PM 1 102 Jan 17, 2018 12:57 PM
Last Post: Anxuein
[Shell] by Tesseract.mkMay 27, 2017 05:39 PM 6 172 May 27, 2017 05:39 PM
Last Post: Hackoo
[C] by M O D E R NMay 25, 2017 12:43 PM 2 205 May 25, 2017 12:43 PM
Last Post: M O D E R N