Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random domains from Chrome #32

Open
suqitian opened this issue May 3, 2017 · 0 comments
Open

Random domains from Chrome #32

suqitian opened this issue May 3, 2017 · 0 comments

Comments

@suqitian
Copy link
Member

suqitian commented May 3, 2017

 // Start three fetchers on random hostnames.
  for (size_t i = 0; i < 3; ++i) {
    std::string url_string("http://");
    // We generate a random hostname with between 7 and 15 characters.
    const int num_chars = base::RandInt(7, 15);
    for (int j = 0; j < num_chars; ++j)
      url_string += ('a' + base::RandInt(0, 'z' - 'a'));
    GURL random_url(url_string + '/');
    std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create(
        random_url, net::URLFetcher::HEAD, this, traffic_annotation);
    // We don't want these fetches to affect existing state in the profile.
    fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE |
                          net::LOAD_DO_NOT_SAVE_COOKIES |
                          net::LOAD_DO_NOT_SEND_COOKIES |
                          net::LOAD_DO_NOT_SEND_AUTH_DATA);
    fetcher->SetRequestContext(g_browser_process->system_request_context());
    fetcher->Start();
    net::URLFetcher* fetcher_ptr = fetcher.get();
    fetchers_[fetcher_ptr] = std::move(fetcher);
  }
  • Maybe generate three domains per hour.
    Copy "chrome://net-internals/#dns" into Chrome address bar, I saw something like this.
Hostname Family Addresses Expires
gypqzwgfzykdv IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2017-05-03 15:09:50.104
ocypnqxhtcuy IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2017-05-03 15:09:50.106
ojiunnm IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2017-05-03 15:09:50.107
eupziohh IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2017-05-03 16:09:51.233
kbhwwbxhyxsvbb IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2017-05-03 16:09:51.233
vgfsnohsnqeyeg IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2017-05-03 16:09:51.234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant