Disable Google Incognito Mode

24 posts in this topic

Sapient 0

Seeker

Members

0

18 posts

#1 ·
Posted 21 Nov 2010
(edited)

Here is the source code for a program to detect and kill any Google Incognito windows that pop-up. This is useful for people who are relying on extensions such as Chrome Nanny to help the users be more productive. To set it up, save the code as "SpyVsSpy.au3" then open the code with SciTE Editor and Build the executabe (Tools->Build), then schedule it through Windows Task Scheduler. (If you think of a better way to run it in the background to prevent non-admin task kill, let me know.)

{edit: note, a new and improved version of this code has been posted below. continue reading the thread for details }

Edited 11 Feb 2011 by Sapient

Share this post

Link to post

Share on other sites

James 340

Pessimist

MVPs

340

10,145 posts

#2 ·
Posted 21 Nov 2010

This is useful for people who are relying on extensions such as Chrome Nanny to help the users be more productive.

But surely if they had the willpower not to be in Incognito mode whilst using Google Nanny, they wouldn't need this. And if they did need this, they'd still be able to disable it and so we're in a cycle.

Share this post

Link to post

Share on other sites

Sapient 0

Seeker

Members

0

18 posts

#3 ·
Posted 21 Nov 2010

But surely if they had the willpower not to be in Incognito mode whilst using Google Nanny, they wouldn't need this. And if they did need this, they'd still be able to disable it and so we're in a cycle.

If you are someone who uses Chrome Nanny extension then you are aware that the user CAN disable it, but it requires prolonged conscious effort to do so (typing out a long series of keystrokes). However, they can work around the whole thing with one click by entering incognito mode, which makes it take almost no time or conscious thought. This is an attempt to fix that.

If there is no value in such an approach to you, then fine, but I assure you some people (maybe a small minority) who do find it useful and you can read the feedback on that extension for more details. Now I'm no expert on human psychology but I do know that some people find it useful. If you don't, then that's fine, don't download it. Your choice.

Share this post

Link to post

Share on other sites

UEZ 561

Never say never

MVPs

561

5,672 posts

#4 ·
Posted 21 Nov 2010

Spy vs. Spy - hmmm an old C64 game...

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Share this post

Link to post

Share on other sites

Werty 50

Spy vs Spy was from MAD magazine, which was made into a computer game, I read the mags and played the game, not on C64 but on ZX Spectrum.

http://en.wikipedia.org/wiki/Spy_vs._Spy

Share this post

Link to post

Share on other sites

James 340

Pessimist

MVPs

340

10,145 posts

#6 ·
Posted 21 Nov 2010

If there is no value in such an approach to you, then fine, but I assure you some people (maybe a small minority) who do find it useful and you can read the feedback on that extension for more details. Now I'm no expert on human psychology but I do know that some people find it useful. If you don't, then that's fine, don't download it. Your choice.

Sorry, I didn't mean to offend you.

The code is nice and does what it's intended to do. But I just see it as another thing to turn off before I can continue my wrong doings on the Internet whilst I should be working.

Share this post

Link to post

Share on other sites

snowboarder1087 0

Seeker

Members

0

3 posts

#7 ·
Posted 2 Jan 2011
(edited)

Thanks a million for making this!! I had avoided using ChromeNanny simply because anytime I would want to "crack" ChomeNanny all I had to do was hit control + shift + n and bam I could circumvent ChromeNanny and then procrastinate all I wanted.

The problem is I'm not hugely programmer savvy... I mean I downloaded the "single file executable called Sc1 (610K)" here

Once downloaded I end up with a file called "Sc223.exe" which opens fine, I can open the "SpyVsSpy.au3" in it which had created by copying your script into Notepad and saving it as "SpyVsSpy.au3" obviously. I also tried saving it in SciTE Editor - (neither notepad nor SciTE have an option to choose .au3 as the file extension though.)

What did I do wrong?? -- Edit: Also sorry for bringing back a thread that was a little over a month old, but I really need help!

Edited 2 Jan 2011 by snowboarder1087

Share this post

Link to post

Share on other sites

snowboarder1087 0

Seeker

Members

0

3 posts

#8 ·
Posted 2 Jan 2011
(edited)

I`m sorry, but I feel like I`ve done everything correctly now.

Downloaded SciTE4AutoIt3.exe

Created the SpyVsSpy.au3 file.

Built the SpyVsSpy.exe Application in SciEditor.

Even whitelisted it in my Spyware programs so it wasn`t marked as malware.

Opened Task scheduler, created a task and named it Disable Incognito (configured for Windows 7, Windows Server 2008 R2), Set the trigger for it to run at System Startup. Set the action to be `Start a program` and the program to start being ``C:\Users\Phillip\Documents\SpyVsSpy.exe`` with no Conditions set for it.

But I can still hit Control + Shift + n and get incognito...

Edited 2 Jan 2011 by snowboarder1087

Share this post

Link to post

Share on other sites

snowboarder1087 0

Seeker

Members

0

3 posts

#9 ·
Posted 5 Jan 2011

Bump... Anyone know why I can't get this script to work and block my ability to use Chrome incognito?

Share this post

Link to post

Share on other sites

Sapient 0

Seeker

Members

0

18 posts

#10 ·
Posted 13 Jan 2011
(edited)

Bump... Anyone know why I can't get this script to work and block my ability to use Chrome incognito?

Hey snowboarder. Sorry I just noticed this reply.

Looks like you've done everything correctly so far, but the Task Scheduler in Windows 7 is a pain to configure correctly (I know because I'm also using Windows 7). My guess is that SpyVsSpy.exe isn't even running.

Try double-clicking SpyVsSpy.exe to run it, so that way you at least know it is running.

Then see if you can launch incognito windows.

This way you can isolate the problem to the script or the task scheduler.

I'm not an expert on the Windows Task Scheduler so I will only be able to give limited advice on it, but there are other resources and forums out there if that is the issue.

I will say to make sure you turn off all conditions that disable the task, for example when on battery power, when idle, etc. I set it to run every five minutes and at logon.

Edited 13 Jan 2011 by Sapient

Share this post

Link to post

Share on other sites

rmkbow 0

Seeker

Members

0

3 posts

#11 ·
Posted 1 Feb 2011

it looks like it's attempting to find the incognito head on the right side of the browser instead of the left side.

could you fix this?

Share this post

Link to post

Share on other sites

TheDarkLord 0

Seeker

Members

0

2 posts

#12 ·
Posted 10 Feb 2011

Hey Sapient, great post. It was exactly what I was looking for, but I'm stuck right now.

The part where you have to Build the .exe file...I get this:

>C:\program files\autoit3\aut2exe\aut2exe.exe /in "C:\Users\Admin\Documents\Vignesh\SpyVsSpy.au3"
'C:\program' is not recognized as an internal or external command,
operable program or batch file.
>Exit code: 1

Could anyone help me on what I'm doing wrong? I'm not much of a programmer or anything..

Share this post

Link to post

Share on other sites

Manadar 245

MVPs

245

10,525 posts

#13 ·
Posted 10 Feb 2011

Hey Sapient, great post. It was exactly what I was looking for, but I'm stuck right now.

The part where you have to Build the .exe file...I get this:

>C:\program files\autoit3\aut2exe\aut2exe.exe /in "C:\Users\Admin\Documents\Vignesh\SpyVsSpy.au3"
'C:\program' is not recognized as an internal or external command,
operable program or batch file.
>Exit code: 1

Could anyone help me on what I'm doing wrong? I'm not much of a programmer or anything..

if you have AutoIt installed, right click the Source code (SpyVsSpy.au3) and press Compile script.

Share this post

Link to post

Share on other sites

Manadar 245

MVPs

245

10,525 posts

#14 ·
Posted 10 Feb 2011
(edited)

The post by rmkbow suggests that it checks the presence of the incognito head. That is not the case at all. It checks how far the address bar stretches to the right side of the window. The address bar width is affected by the presence of any addons, that place buttons next to the wrench. Like this one:

Extensions are by default disabled in incognito mode as seen here:

So, in order for to work:

1. You must have an extension installed that will place a button next to the wrench.

2. The extension must be disabled when the browser enters incognito mode (default).

This breaks when:

1. You disable all extensions (closes the window all the time)

2. You allow extensions to work in incognito mode (never closes the window)

All of this explains the comment in the first post: "useful for people who are relying on extensions such as Chrome Nanny". Because Chrome Nanny adds a similar button.

Proposed solution: Check the presence of the incognito mode head instead.

Share this post

Link to post

Share on other sites

Sapient 0

Seeker

Members

0

18 posts

#17 ·
Posted 11 Feb 2011
(edited)

Proposed solution: Check the presence of the incognito mode head instead.

Thanks for the feedback. I went with that simplistic approach because I didn't want to worry about all the possible skins out there or potential artistic tweaks to the incognito icon which may be pushed with future google updates.

However, here is version 2.2 below and it does address your concerns (and detects another vulnerability you didn't mention yet).

Share this post

Link to post

Share on other sites

maddhater 0

The running the compiled executable closes all chrome windows, regardless if they were incognito or not.

Is this an issue you've heard or seen before? Is there a fix or workaround?

Thanks

~madd

Share this post

Link to post

Share on other sites

Sapient 0

Seeker

Members

0

18 posts

#19 ·
Posted 25 Apr 2011
(edited)

Sapient,

The running the compiled executable closes all chrome windows, regardless if they were incognito or not.

Is this an issue you've heard or seen before? Is there a fix or workaround?

Thanks

~madd

Hi, that could happen for a couple of reasons. You could be using an odd skin that makes it fail the color reference checks. Or your computer is very slow and so it can't sample a valid color reference within the allowed threshold of time. Or your version of chrome renders the browser differently from mine.

The first thing I would try is go back to the default skin and increase the $ref_fails threshold. Find the line where it says $ref_fails > 4 and increase that number to 8, then recomopile.

If that doesn't solve your problem then uncomment both of the MsgBox lines, recompile, and let me know what messages pop up.

Also, remember you have to kill the running SpyVsSpy program and restart it for the changes to take effect.

If it turns out the problem was the skin, please let me know which skin you were using so I can adjust the algorithm. So far it works for all the ones I tested.

Edited 26 Apr 2011 by Sapient

Share this post

Link to post

Share on other sites

PAEz 1

Seeker

Active Members

1

26 posts

#20 ·
Posted 14 Aug 2011

Dont want to spoil your fun or anything, but theres a more Chrome way of doing this.....

http://dev.chromium.org/administrators/policy-list-3#IncognitoEnabled

....so on windows (only tested in xp) you can create a reg entry to disable incognito.

Create a text file called noIncognito.reg and enter this as its text.....

...the extension cant be installed before adding this policy, or just uninstall the extension after adding the policy and it will install the extension and they wont be able to uninstall or disable it.

These settings will apply to all instances of chrome regardless of what profile they are using.