Detecting NW.js from inside a webview

163 views
Skip to first unread message

Igor Bukanov

unread,
May 23, 2023, 3:13:36 AM5/23/23
to nw.js
Hi,

If NW.js application uses <webview> to show an arbitrary webpage, can that page detect that in runs inside NW.js and a not under a plain Chromium? 

In particular, does NW.js JS runtime exposes some extra properties that any web page can  access?

Regards, Igor

Roger Wang

unread,
May 23, 2023, 11:18:18 PM5/23/23
to Igor Bukanov, nw.js
Hello,

It should not be detected. Or please file a bug report.

Thanks,
Roger 

--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nwjs-general/810700c1-6c7c-4bf8-ac4d-b0555a09f593n%40googlegroups.com.

Igor Bukanov

unread,
May 24, 2023, 2:40:22 AM5/24/23
to Roger Wang, nw.js
Hi,

I filed https://github.com/nwjs/nw.js/issues/8074 about this.

Alexander Sunvas

unread,
May 28, 2023, 8:29:34 PM5/28/23
to nw.js
I assume it detects via this bug 
среда, 24 мая 2023 г. в 09:40:22 UTC+3, Igor Bukanov:

Igor Bukanov

unread,
May 29, 2023, 1:50:15 PM5/29/23
to nw.js
Regarding https://github.com/nwjs/nw.js/issues/7970 . Yes, the reason for this post was Cloudflare's captcha. However, a Chromium build that reports the same data as NW,js including navigator.userAgentData.brands passes the captcha. So Cloudflare is able to distinguish between NW.js and Chromium, not even Chrome, that reported exactly the same fingerprinting information according to https://amiunique.org/fp.

Also, if one just adds --user-agent="exact string as used by Firefox or Safary or a string like bla-bla-bla"  to NW.js invocation, the capture can be passed. So it seems Cloudflare tries particularly hard to detect the real browser when the user agent and the related data tells it is Chrome or Chromium.

Regards, Igor

Nicolas Garfinkiel

unread,
Jul 13, 2023, 11:41:04 AM7/13/23
to nw.js
Hi all!

@roger, any thoughts on this thread? Currently, prominent sites like ChatGPT are using Cloudflare's CAPTCHA challenge and it fails getting stuck in a loop. Since the site is a hot potato right now, it's creating a lot of noise out there. Any chance you can help us here?

Thanks!

Roger Wang

unread,
Jul 13, 2023, 5:02:41 PM7/13/23
to Nicolas Garfinkiel, nw.js
Will see this soon.

Thanks,
Roger

Roger Wang

unread,
Jul 17, 2023, 12:41:22 PM7/17/23
to Igor Bukanov, nw.js
Could you list the difference of HTTP headers in the requests and responses between the scenarios?

Thanks,
Roger

Igor Bukanov

unread,
Jul 17, 2023, 3:23:11 PM7/17/23
to nw.js
According to sites like https://amiunique.org/fp and manual checking we do not see a difference in HTTP headers and other easy detectable differences between Chrome and nw.js built from the same version.

Regards, Igor

Roger Wang

unread,
Jul 17, 2023, 3:55:07 PM7/17/23
to Igor Bukanov, nw.js
Thanks. What about the headers with https://youcontrol.com.ua/ ?

Cloudflare servers could be different.

Regards,
Roger 

Reply all
Reply to author
Forward
0 new messages