(self, executable_path=None)
| 406 | return "".join(cdc).encode() |
| 407 | |
| 408 | def is_binary_patched(self, executable_path=None): |
| 409 | executable_path = executable_path or self.executable_path |
| 410 | try: |
| 411 | with io.open(executable_path, "rb") as fh: |
| 412 | return fh.read().find(b"undetected chromedriver") != -1 |
| 413 | except FileNotFoundError: |
| 414 | return False |
| 415 | |
| 416 | def patch_exe(self): |
| 417 | start = time.perf_counter() |