puppeteer-sharp icon indicating copy to clipboard operation
puppeteer-sharp copied to clipboard

EvaluationScriptSuffix modfication is not possible

Open IRusio opened this issue 1 year ago • 2 comments

Description

hey @kblok there is still a problem when we talk about stealth mode, as mentioned in #1709 This behaviour is a problem when we try to pass DataDome, as it sends source, so it's quite hard to pass their validation if we can't modify it: image

In quite old version we were able to modify it via reflection.

Expected behavior:

We are able to modify EvaluationScriptSuffix from Execution Context

Actual behavior:

We can't modify that value, as it is const.

Additional Links:

https://github.com/rebrowser/rebrowser-patches?tab=readme-ov-file#change-default-utility-world-name - this guy prepared a solution on that leak. https://datadome.co/threat-research/how-new-headless-chrome-the-cdp-signal-are-impacting-bot-detection/ - datadome article how they detect automation

IRusio avatar Oct 22 '24 15:10 IRusio

I think we could implement this https://github.com/puppeteer/puppeteer/pull/10114/files#diff-c7ce55941ba75a4411db2277bb2f54b56869778ae538ee8bb5543f891dd17c3a and make PuppeteerURL.INTERNAL_URL read/write

kblok avatar Oct 22 '24 16:10 kblok

I think we could implement this https://github.com/puppeteer/puppeteer/pull/10114/files#diff-c7ce55941ba75a4411db2277bb2f54b56869778ae538ee8bb5543f891dd17c3a and make PuppeteerURL.INTERNAL_URL read/write

@IRusio if you fell comfortable trying to implement this, go for it. If not let me know and I'll add this to my list.

kblok avatar Oct 22 '24 16:10 kblok