How is the RescueTimes function blocked?

I am a big fan and regular user of RescueTime, a time tracking application.

The service requires the installation of a small program that runs in the background and keeps track of which programs and pages have focus at any given time.

In addition, it allows you to β€œFocus”, which redirects all sites to the blacklist to your home page, regardless of which browser I use. That is, I see the homepage that I visit, and then redirects shortly afterwards.

How does this block / redirection work? it seems to be browser independent, and I do not see any changes in the proxy server settings, so it does not intercept traffic in this way.

It is also cross-platform, and it looks like the client for Mac OS and Windows works the same.

Any ideas on how this functionality is implemented?

+6
source share
1 answer

For OSX:

What I found, they use Apple Script.

My guess is that they periodically run a script that gets what the application is first. If it's a browser, they get the URL again through the Apple script.

Example

# Google Chrome tell application "Google Chrome" to return URL of active tab of front window tell application "Google Chrome" to return title of active tab of front window 

On focus, I don't have a premium version. But, as I saw, it loads the website, it redirects you. So I assume that they get the URL and then determine if it should be blocked (by looking at the host URL in the list of invalid websites), then they redirect you ... again using the Apple script.

+2
source

Source: https://habr.com/ru/post/895801/


All Articles