0

I made an app in Electron (which uses Chromium to render web content) to help perform some tasks on certain sites like SoundCloud.

Here is the webview code:

<webview partition="persist:default" webpreferences="nodeIntegration=no, contextIsolation=no, enableRemoteModule=yes, worldSafeExecuteJavaScript=yes, webSecurity=yes, allowRunningInsecureContent=no, plugins=yes, scrollBounce=yes, navigateOnDragDrop=yes, safeDialogs=yes, backgroundThrottling=no, nativeWindowOpen=yes, spellcheck=yes" src="https://soundcloud.com/discover" allowpopups=""></webview>

I am using the latest version of Electron and have set the user agent of the webview to what would normally be Chrome's user agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36

Here is the result of logging the navigator object in the console of the webview:

enter image description here

Here is the result of logging navigator on a real Chrome browser on the same computer:

enter image description here

However, some sites are able to somehow detect that the browser is not really Chrome. For example, when attempting to log in to SoundCloud in the webview, it gives an error "Our robots think you are a robot" and this error is not present when logging in on Chrome itself.

enter image description here

What else could SoundCloud (and other sites) be checking that leads it to believe it is not really a legit version of Chrome? The navigator object is all I could think of but it appears to be exactly the same as the navigator object in real Chrome. There is no other code being executed in the webview so the site must be checking something before the login.

T Mack
  • 950
  • 3
  • 12
  • 27

0 Answers0