Skip to content

Setting up BrowserCore.py

Dirk-jan edited this page Nov 8, 2022 · 2 revisions

Prerequisites:

Configuring the PRT

In this case I'm setting things up in the c:\browsercore\ directory. You should copy the files from the browsercore directory in ROADtools to here (the manifest.json and browsercore.py itself).

First install roadlib. Make sure it's the latest version:

pip install roadlib

Then copy an existing roadtx.prt file (must have that name, or you must change it in the browsercore.py source) to the same directory.

You can run bctest.py to make sure it works without errors (should give you a PRT cookie in the output, not a stacktrace with errors).

Also, make sure that python files will be opened with python.exe from the installation location of your python install C:\Users\youruse\AppData\Local\Programs\Python\Python311\python.exe or your local equivalent.

Configuring the Chrome extension

Now we need to point the extension to our custom manifest c:\browsercore\manifest.json. This should be done in the registry since Chrome stores extension handlers there.

Open the key HKEY_CURRENT_USER\Software\Google\Chrome\NativeMessagingHosts\com.microsoft.browsercore the default key will contain a path, most likely to a directory in c:\windows or c:\program files. image

This should be changed to c:\browsercore\manifest.json: image

On recent Windows versions, this key is owned by TrustedInstaller, so you have to change ownership first to your own user:

image

If you restart chrome, SSO should work. Sometimes you need to enter the username of the account first, or perform a sign-in/sign-out with a different user. If it does not work, try clearing the cookies for login.microsoftonline.com.