Jun 18, 2017 12:18 AM
(This post was last modified: Jun 18, 2017 12:22 AM by w4zt3d.)
I was able to pull 30K proxies with that
Theory
It's simple.
1. The tool searches for some querys like "proxylist" on Bing
2. Then it visits all the pages.
3. It grabs all proxies on each page using Regular Expressions (Regex).
Done!
NOTE: WE HAVEN'T CHECKED THE PROXYLIST YET!
Source
Theory
It's simple.
1. The tool searches for some querys like "proxylist" on Bing
2. Then it visits all the pages.
3. It grabs all proxies on each page using Regular Expressions (Regex).
Done!
NOTE: WE HAVEN'T CHECKED THE PROXYLIST YET!
Source
PHP Code
<?php
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Net;
using System.IO;
namespace w4zt3d_ProxyGRB
{
class Program
{
static void Main(string[] args)
{
string[] querys = { "fresh proxies", "pastebin proxies", "grayhatforum proxylist", "pastebin proxylist", ".txt proxylist", "pastebin proxy ip port" };
Console.Title = "ProxyGRB by w4zt3d for GrayHatForum.org";
int count = 15;//pages to scrape (all on first page npt looping this time)
Regex linkRegex = new Regex("<a href=\"(.*?)\" h=");
Regex proxyRegex = new Regex(@"\d{1,3}(\.\d{1,3}){3}:\d{1,5}");
Regex proxyRegex2 = new Regex(@"\d{1,3}(\.\d{1,3}){3}</td><td>\d{1,5}");
WebClient webClient = new WebClient();
List<string> alreadyFound = new List<string>();
string filename = "scraped_proxylist.txt";
File.WriteAllText(filename, "");
int counter = 0;
foreach (string tofind in querys)
{
string url = "https://www.bing.com/search?q=" + tofind + "\"&count=#count#";
try
{
string code = webClient.DownloadString(url.Replace("#count#", count.ToString()));
MatchCollection matches1 = linkRegex.Matches(code);
foreach (Match match in matches1)
{
try
{
string s = match.Groups[1].Value;
if (s.StartsWith("http") & !s.Contains("amp") & !s.Contains("microsoft"))//amp & microsoft to avoid shit from Bing
{
string html = webClient.DownloadString(s);
MatchCollection matches = proxyRegex.Matches(html);
foreach (Match m in matches)
{
string proxy = m.Groups[0].Value;
if (!alreadyFound.Contains(proxy))
{
counter++;
alreadyFound.Add(proxy);
Console.WriteLine(proxy);
File.AppendAllText(filename, proxy + Environment.NewLine);
}
}
matches = proxyRegex2.Matches(html);
foreach (Match m in matches)
{
string proxy = m.Groups[0].Value.Replace("</td><td>", ":");
if (!alreadyFound.Contains(proxy))
{
counter++;
alreadyFound.Add(proxy);
Console.WriteLine(proxy);
File.AppendAllText(filename, proxy + Environment.NewLine);
}
}
Console.Title = "ProxyGRB " + "\"" + tofind + "\" Proxys = " + counter + " Url: " + s;
}
}
catch { }
}
}
catch { }
}
Console.Beep();
Console.WriteLine("Done!");
Console.Title = "ProxyGRB by w4zt3d " + counter + " proxies found.";
while (true) { }
}
}
}



![[Image: GV2NJtcHSV6ovkbcGsPR3w.png]](https://image.prntscr.com/image/GV2NJtcHSV6ovkbcGsPR3w.png)