(self, executable_path=None)
| 199 | return "".join(cdc).encode() |
| 200 | |
| 201 | def is_binary_patched(self, executable_path=None): |
| 202 | executable_path = executable_path or self.executable_path |
| 203 | with io.open(executable_path, "rb") as fh: |
| 204 | if re.search( |
| 205 | b"window.cdc_adoQpoasnfa76pfcZLmcfl_" |
| 206 | b"(Array|Promise|Symbol|Object|Proxy|JSON|Window)", |
| 207 | fh.read() |
| 208 | ): |
| 209 | return False |
| 210 | return True |
| 211 | |
| 212 | def patch_exe(self): |
| 213 | """Patches the ChromeDriver binary""" |