Open demian85 opened 5 years ago
Interesting. It's possible Chrome changed the binding so the getter doesn't work any longer. Will need some investigation.
Because it doesn't remove navigator.webdriver, it simply returns false. Thus, if you do feature detection the following way if(navigator.webdriver)
you can escape the detection. Nevertheless, if you do it like this if('webdriver' in navigator)
you are detected since it does't care about the value of webdriver (true/false).
So can we delete a non-writable property using Object.defineProperty
? I don't get the point of having a non-writable property that can be rewritten -_- (but sounds good to me, since I want to bypass detection!)
You can delete the webdriver property using this code:
await page.evaluateOnNewDocument(() => {
const newProto = navigator.__proto__;
delete newProto.webdriver;
navigator.__proto__ = newProto;
});
That works like a charm! I've been trying to delete a non-configurable property with no luck. Is that property non-configurable? I'd love to understand how it can be deleted anyway using the proto hack. Thanks!
On Fri, Sep 14, 2018 at 6:14 AM antoine vastel notifications@github.com wrote:
You can delete the webdriver property using this code: await page.evaluateOnNewDocument(() => { const newProto = navigator.proto; delete newProto.webdriver; navigator.proto = newProto; });
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paulirish/headless-cat-n-mouse/issues/16#issuecomment-421287057, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcuZnbhxv2CeKVc-7Fvi2BkBqltBQH1ks5ua3NfgaJpZM4WjseD .
I created a PR based on the new proto method https://github.com/paulirish/headless-cat-n-mouse/pull/17
Unfortunately, the fix is still not enough to pass headless detection from Spotify. Please check my project if you have time. Sounds challenging!
https://github.com/demian85/spotify-cli
On Wed, Sep 19, 2018 at 8:31 AM Joachim notifications@github.com wrote:
I created a PR based on the new proto method
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paulirish/headless-cat-n-mouse/issues/16#issuecomment-422766263, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcuZv9ich3nLz4dkcc38HdK6rU2qxc2ks5ucislgaJpZM4WjseD .
Unfortunately, the fix is still not enough to pass headless detection from Spotify. Please check my project if you have time. Sounds challenging! https://github.com/demian85/spotify-cli … On Wed, Sep 19, 2018 at 8:31 AM Joachim @.**> wrote: I created a PR based on the new proto* method — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#16 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcuZv9ich3nLz4dkcc38HdK6rU2qxc2ks5ucislgaJpZM4WjseD .
FYI spotify have binded local API when you open the app, that's how you can play/pause from web to app (windows app) i have tested.
Sorry, I don't understand. What do you mean with 'binded local API'?
@demian85 if your project do a simple job like play/pause a track from spotify, so u can check out "SpotifyWebHelper".
This project : https://github.com/onetune/spotify-web-helper
Hope it help
how can re-initializate navigator ?? 'webdriver' in navigator;
return true here... https://antoinevastel.com/bots/ because the def is undefined...
My results are:
Why is this logic not working? https://github.com/paulirish/headless-cat-n-mouse/blob/master/apply-evasions.js#L13