From beb07cacfa24df6795eed9313226470f0eb4ddea Mon Sep 17 00:00:00 2001 From: Kevin F Date: Mon, 9 Aug 2021 00:06:39 +0000 Subject: [PATCH] increased max delay, fixed first run bug --- README.md | 2 +- background.js | 8 ++++++-- manifest.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4422dc1..9d3856f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Did you know that websites can identify you based on the way you type? There are spy libraries that can determine how long keys are held down and the time between keys. This is apparently good enough for spying that it can be used as a form of biometric authentication, by companies like Keytrac and TypingDNA. According to TypingDNA, their software has been used for test proctoring, and in banking apps. -This addon was created to skew the key press timing by limiting the speed of presses. The speed is changed randomly on each page load, with a max of 75ms. +This addon was created to skew the key press timing by limiting the speed of presses. The speed is changed randomly on each page load, with a max of 200ms. It uses a less than ideal thread locking solution, as simply buffering text does not stop event listeners from spies. diff --git a/background.js b/background.js index d0df218..44c980a 100644 --- a/background.js +++ b/background.js @@ -19,7 +19,7 @@ const defaultHosts = ""; let appCode = function (){ - const maxValue = 75 + const maxValue = 100 let mainKeyboardPrivacy = function(){ @@ -28,7 +28,7 @@ let appCode = function (){ while (true){ window.crypto.getRandomValues(buf); - if (buf[0] < maxValue){ + if (buf[0] <= maxValue){ break } buf = new Uint8Array(1); @@ -70,6 +70,10 @@ let appCode = function (){ }, 100) } function shouldRunKeyboardPrivacy(value){ + if (typeof value.keyboardprivacywhitelist !== undefined){ + mainKeyboardPrivacy() + return + } let vals = value.keyboardprivacywhitelist.split(',') for (i = 0; i < vals.length; i++){ if (vals[i] === document.location.hostname || vals[i] === 'www.' + document.location.hostname){ diff --git a/manifest.json b/manifest.json index adc8154..ae936f9 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Private Keyboard", - "version": "1.1", + "version": "1.2", "description": "Protect against keyboard biometrics",