increased time and reverted back to per page load

This commit is contained in:
Kevin F 2021-08-10 05:57:27 +00:00
parent fbb6e804cf
commit 9485d43800
3 changed files with 10 additions and 10 deletions

View File

@ -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 200ms.
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 min of 150ms and a max of 300ms.
It uses a less than ideal thread locking solution, as simply buffering text does not stop event listeners from spies.

View File

@ -19,8 +19,8 @@
const defaultHosts = "<all_urls>";
let appCode = function (){
const maxValue = 150
const minValue = 25
let minValue = 75
let maxValue = 150
let mainKeyboardPrivacy = function(){
@ -36,6 +36,8 @@ let appCode = function (){
}
return buf[0];
}
let up = getRandNum()
let down = getRandNum()
console.debug('Protecting keyboard biometrics on ' + document.location.href)
@ -56,7 +58,7 @@ let appCode = function (){
if (e.key.startsWith('Arrow') || e.key.startsWith('Page')){
return true;
}
pausecomp(getRandNum());
pausecomp(up);
return true;
}, )
@ -64,7 +66,7 @@ let appCode = function (){
if (e.key.startsWith('Arrow') || e.key.startsWith('Page')){
return true;
}
pausecomp(getRandNum());
pausecomp(down); we
return true;
})
@ -72,7 +74,7 @@ let appCode = function (){
}, 100)
}
function shouldRunKeyboardPrivacy(value){
if (typeof value.keyboardprivacywhitelist == undefined){
if (typeof value.keyboardprivacywhitelist === 'undefined'){
mainKeyboardPrivacy()
return
}
@ -85,11 +87,10 @@ let appCode = function (){
}
mainKeyboardPrivacy()
}
function noKeyboardPrivacySettings(){
function noKeyboardPrivacySettings(value){
mainKeyboardPrivacy()
}
let whitelist = browser.storage.sync.get("keyboardprivacywhitelist");
whitelist.then(shouldRunKeyboardPrivacy, noKeyboardPrivacySettings)
@ -99,7 +100,6 @@ const dummyStr = ''
let defaultCode = dummyStr + appCode;
defaultCode = defaultCode.replace('function (){', 'function keyboardPrivacy(){')
console.debug(defaultCode)
async function register(hosts, code) {

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Private Keyboard",
"version": "1.4",
"version": "1.5",
"description": "Protect against keyboard biometrics",