error while improving Chromedriver undetectability

Viewed 284

Using C#, I have driver = new ChromeDriver();

It gives:

System.ComponentModel.Win32Exception: The specified executable is not a valid application for this OS platform.

It worked before I changed something. This answer specifies that to improve undetectability of Selenium, you have to run a certain PERL script. I ran it like so:

perl -pi -e 's/cdc_/dog_/g' C:\Users\user\source\repos\SleeveAce\packages\Selenium.WebDriver.ChromeDriver.91.0.4472.10100\driver\win32\chromedriver.exe

What do I do now? Before, the C# app was working perfectly, now it has that error. When I open the .exe as a notepad++ and search for cdc_, I find multiple instances, so I suppose the script is not working? I might be wrong though if the script was not supposed to do that.

EDIT: I have just tried changing all the cdc_ values in a hex editor as well with dog_. They were modified successfully. However, the error is still there.

EDIT2: Solved! See comments for explanation.

Additional info

  • Using Perl 5 v32
  • After running the script, nothing was shown (no errors too!)
0 Answers
Related