Run all Puppeteer commands in an Isolated World
See original GitHub issueAttempting to address this issue below and looking for feedback and ideas on any potential ways to achieve this more cleanly: https://github.com/berstend/puppeteer-extra/issues/209
The goal is to have Puppeteer run every command in a Isolated Worlds to avoid detection scripts being able to monitor execution.
The concept write up is here (sorry, needed too much detail to include within the issue text): https://github.com/prescience-data/harden-puppeteer
The only way I can figure out how to achieve this is by modifying the vanilla Puppeteer files directly in the node_modules
folder, so hoping someone with experience writing Puppteer-Extra plugins can advise a way to do with with a plugin instead.
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
What is the best way to run multiple instances of Node app at ...
For a "multi-threaded" Puppeteer app, consider using multiple BrowserContext objects, which should allow you to efficiently run Puppeteer ...
Read more >End-to-End testing with Puppeteer and Jest - Medium
Let's run Puppeteer for the first time on it's own, so you will actually see how it works alone without Jest in the...
Read more >Run end-to-end test with Jest and Puppeteer | Sanity.io guide
You'll start by installing Jest and Puppeteer in your project directory. Open the project in your cli and run the following commands.
Read more >Running Services — Apptainer User Guide main documentation
This command causes Apptainer to create an isolated environment for the ... So make sure to run all instance commands either with or...
Read more >browserless, the headless Chrome/Chromium performance ...
You can use it next to puppeteer , puppeteer-core or puppeteer-firefox , interchangeably. Usage. This is a full example for showcase all the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok so I can confirm that the patch works as intended.
I’ve made a test for it here that uses Vastel’s execution monitoring technique to figure out if the host site has any visibility into the patched context:
Puppeteer Test: https://github.com/prescience-data/puppeteer-botcheck/blob/b6848845b8b5887608784caa2fe7a078db866e9b/Botcheck.js#L45 Host Monitoring Execution: https://github.com/prescience-data/prescience-data.github.io/blob/master/execution-monitor.html
URL of the live test: https://prescience-data.github.io/execution-monitor.html
Here’s the differences between unpatched and patched:
Unpatched
Patched
You can see that the patched version only detects the inserted elements (which was left deliberately unisolated to allow user to inject scripts into the main context (ie all the extra-stealth modifications).
However, anything other than that is running isolated and outside the security scope of any bot detection script.
Naturally they would be able to observe changes you make to the DOM, but only the outcome, not how the execution is occurring.
Have you looked/tried https://github.com/ds300/patch-package ?