For Mac Users

Replacing cdc_ variable using Vim or Perl

You can use vim, or as @Vic Seedoubleyew has pointed out in the answer by @Erti-Chris Eelmaa, perl, to replace the cdc_ variable in chromedriver(See post by @Erti-Chris Eelmaa to learn more about that variable). Using vim or perl prevents you from having to recompile source code or use a hex-editor. Make sure to make a copy of the original chromedriver before attempting to edit it. Also, the methods below were tested on chromedriver version 2.41.578706.

Using Vim

vim /path/to/chromedriver

After running the line above, you'll probably see a bunch of gibberish. Do the following:

  1. Search for cdc_ by typing /cdc_ and pressing return.
  2. Enable editing by pressing a.
  3. Delete any amount of $cdc_lasutopfhvcZLmcfl and replace what was deleted with an equal amount characters. If you don't, chromedriver will fail.
  4. After you're done editing, press esc.
  5. To save the changes and quit, type :wq! and press return.
  6. If you don't want to save the changes, but you want to quit, type :q! and press return.
  7. You're done.

Go to the altered chromedriver and double click on it. A terminal window should open up. If you don't see killed in the output, you successfully altered the driver.

Using Perl

The line below replaces cdc_ with dog_:

perl -pi -e 's/cdc_/dog_/g' /path/to/chromedriver

Make sure that the replacement string has the same number of characters as the search string, otherwise the chromedriver will fail.

Perl Explanation

s///g denotes that you want to search for a string and replace it globally with another string (replaces all occurrences).

e.g., s/string/replacment/g


s/// denotes searching for and replacing a string.

cdc_ is the search string.

dog_ is the replacement string.

g is the global key, which replaces every occurrence of the string.

How to check if the Perl replacement worked

The following line will print every occurrence of the search string cdc_:

perl -ne 'while(/cdc_/g){print "$&\n";}' /path/to/chromedriver

If this returns nothing, then cdc_ has been replaced.

Conversely, you can use the this:

perl -ne 'while(/dog_/g){print "$&\n";}' /path/to/chromedriver

to see if your replacement string, dog_, is now in the chromedriver binary. If it is, the replacement string will be printed to the console.

Go to the altered chromedriver and double click on it. A terminal window should open up. If you don't see killed in the output, you successfully altered the driver.

Wrapping Up

After altering the chromedriver binary, make sure that the name of the altered chromedriver binary is chromedriver, and that the original binary is either moved from its original location or renamed.

My Experience With This Method

I was previously being detected on a website while trying to log in, but after replacing cdc_ with an equal sized string, I was able to log in. Like others have said though, if you've already been detected, you might get blocked for a plethora of other reasons even after using this method. So you may have to try accessing the site that was detecting you using a VPN, different network, or what have you.

ChromeDriver - WebDriver for Chrome

ChromeDriver. WebDriver is an open source tool for automated testing of webapps across many browsers. It provides capabilities ...

Chrome driver

Name, Last modified, Size, ETag. [DIR], 2.0, -, -, -. [DIR], 2.1, -, -, -. [DIR], 2.10, -, -, -. [DIR], 2.11, -, -, -. [DIR], 2.12, -, -, -. [DIR], 2.13, -, -, -. [DIR], 2.14, -, -, -. [DIR] ...

Downloads - ChromeDriver - WebDriver for Chrome

ChromeDriver 88.0.4324.96. Supports Chrome version 88. Resolved issue 3641: Page not getting loaded/rendered when browser window is not in focus with ...

chromedriver - npm

Jan 22, 2021 ... Building and Installing. npm install chromedriver. Or grab the source and. node ./ install.js. What this is really doing ...

ChromeDriver Mirror

Mirror index of ../ 2.0/ 2013-09- 25T22:57:39.349Z - 2.1/ 2013-09-25T22:57:49.481Z - 2.10/ ...

Using Chromedriver - Appium

To get around this it is necessary to provide Appium with a proper Chromedriver binary, that matches to the Chrome engine version running on the device under ...


To avoid unnecessarily restarting the ChromeDriver server with each instance, use a RemoteWebDriver coupled with the desired ChromeDriverService , which  ...

Selenium.WebDriver.ChromeDriver 88.0.4324.9600 - NuGet Gallery

Install Chrome Driver (Win32, macOS, and Linux64) for Selenium WebDriver into your Unit Test Project. "chromedriver(.exe)" is copied to the bin folder from the ...

Can a website detect when you are using Selenium with ...

Replacing cdc_ string. You can use vim or perl to replace the cdc_ string in chromedriver . See answer by @Erti-Chris Eelmaa to learn more about that string  ...