Method to test google passed proxies

audioguy

Power Member
Joined
Jun 12, 2010
Messages
608
Reaction score
224
How do they do that?

I bet it's not only to open Google's home page, just like when testing a proxy if it works, and then search for specific strings.

Do they perform random searches?

The reason I asked is I want to automate this thing. Using ScrapeBox to test this a few times a day becomes boring.
 

WayneInc

BANNED
Joined
Sep 20, 2012
Messages
1,193
Reaction score
1,137
This is perfect method..Even Scrapebox is also easy men..

it's dead simple you can make a serach on google any you want and copy that url and copy any striong which present on that url if it exist means proxy is google passed:

URL:
https://www.google.com/search?q=google&oq=google&aqs=chrome.0.57j0j60l2j0j61.3473j0&sourceid=chrome&ie=UTF-8

String:
About

It will work ;)
 

audioguy

Power Member
Joined
Jun 12, 2010
Messages
608
Reaction score
224
It's already answered. If you want, please DO read the post first.

Yeah I use SB now. And no it's not the answer.
 

audioguy

Power Member
Joined
Jun 12, 2010
Messages
608
Reaction score
224
Using SB, the results are more than 200 Google-passed proxies. With my custom script: 48.

Still needs tweaking, I guess.
 

NIXMY

Regular Member
Joined
Sep 26, 2010
Messages
481
Reaction score
322
How do they do that?

I bet it's not only to open Google's home page, just like when testing a proxy if it works, and then search for specific strings.

Do they perform random searches?

The reason I asked is I want to automate this thing. Using ScrapeBox to test this a few times a day becomes boring.

I hear you. Just find any software for windows that allow you to debug HTTP traffic. Now just use any software to test with any google passed proxy and you'll basically get the method on how to test against google. Here's how I do it:

Codes below are my own codes and therefore I've reserved the right to share you guys with this information.

Example first request. This is the fastest way that allow you to determine a google passed just using two request. The other software's usually use 3 requests making this test a lot slower and unreliable.

You need to have coding skills to understand this example because this is a bit tricky. However hopefully you can get your own google passed bot coded using this example.

First request using google's 'NCR' No Country Redirect

Code:
$headers = "GET [URL]http://www.google.com/ncr[/URL] HTTP/1.0\r\n";
    $headers .= "Host: $host\r\n";
    $headers .= "User-Agent: $user_agent\r\n";
    $headers .= 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n';
    $headers .= 'Accept-Language: en-gb,en;q=0.5\r\n';
    $headers .= "Connection: Close\r\n\r\n";

After first request you'll have to parse headers and grab cookies from content. The code that grabs content and the headers is ugly but works, feel free to cleanup yourself if you want ;)

Code:
function parse_results($content = '') {

    $headers = null;
    $results = array();
    $occurrences = substr_count($content, 'HTTP/');

    if ($occurrences == 1) {

        $headers = substr($content, strpos($content, "HTTP/"), strpos($content, "\r\n\r\n") - strpos($content, "HTTP/"));
        $content = str_replace("\r\n\r\n", "", substr($content, strlen($headers), strlen($content)));

    } elseif ($occurrences == 2) {

        $headers1 = substr($content, strpos($content, "HTTP/"), strpos($content, "\r\n\r\n") - strpos($content, "HTTP/"));

        $content = trim(substr($content, strpos($content, "\r\n\r\n"), strlen($content)));
        $headers2 = substr($content, strpos($content, "HTTP/"), strpos($content, "\r\n\r\n") - strpos($content, "HTTP/"));

        $content = str_replace($headers2, "", $content);
        $content = str_replace("\r\n\r\n", "", $content);

        $headers = $headers1."\n\n";
        $headers .= $headers2;
    } else {
        return false;
    }

    $results["content"] = $content;
    $results["headers"] = $headers;

    return $results;
}

function get_cookies($cookies = null) {

    $string_cookies = null;

    if (preg_match_all('/Set-Cookie:(.*?)\n/i', $cookies, $matches, PREG_PATTERN_ORDER)) {

        if (count($matches[1]) >= 1) {

            foreach ($matches[1] as $key => $cookie) {
                $cookie = trim($cookie);
                $string_cookies .= "Cookie: $cookie"."\r\n";
            }
        }
    }

    return $string_cookies;
}

If the proxy was already banned in google, you will be redirected url similar to 'http://www.google.com/sorry/?continue='. In order to go further with this test, we must now append the received cookies to the headers. You will receive cookies similar to:

Cookie: PREF=ID=c3771499d2b71d84:FF=0:LD=en:CR=2:TM=1370539397:LM=1370539397:S=SGq4Y02H1lMLOCeF; expires=Sat, 06-Jun-2015 17:23:17 GMT; path=/; domain=.google.com

Cookie: NID=67=UoN4Bvv50QxQxfWI2Yxizh7hb-IcaMLgm3294IvABURhHl2cK8fE4RGhtQr-lLCiEJgqvEuLRwHYY5BYHezEYGWQz1TWp86thd2YnqELqLhM2DOaGrg1BkEp_Ba8kee8; expires=Fri, 06-Dec-2013 17:23:17 GMT; path=/; domain=.google.com; HttpOnly

The above get_cookies function will be able to parse the required cookies without any issue. Now for the second request you just append those cookies to the final request:

Code:
$headers = "GET $location HTTP/1.0\r\n";
            $headers .= "Host: $host\r\n";
            $headers .= "User-Agent: USER_AGENT\r\n";
            $headers .= 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n';
            $headers .= 'Accept-Language: en-gb,en;q=0.5\r\n';
            $headers .= "Referer: $referer\r\n";

$headers .= $cookies;

$location variable: http://www.google.com/search?complete=0&filter=0&output=ie&hl=en&num=10&q=URL_ENCODED_QUERY&start=0

URL_ENCODED_QUERY is a string you want to query for and parse output you got what you wanted (google passed proxy)

I did not provided full example but this should be enough for those who know how to code in your preferred scripting or programming language.

Shorthand version:

1) First query http://www.google.com/ncr and grab location header and cookies

You can easily grab location from headers using:

Code:
if (preg_match('/Location:(.*?)\n/i', $headers, $m)) {

                            $location = trim($m[1]);
}

2) Sent the final request with received cookies to the following URL:


3) If your regexp will find a keyword similar to your query, you know the proxy was google passed.
 
Last edited:
Top