Version 14.7.7.1

This commit is contained in:
jsclary
2014-07-07 11:13:16 -05:00
commit d9112739d8
16 changed files with 361 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Jason S. Clary
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+17
View File
@@ -0,0 +1,17 @@
RubberGlove
===========
Blocks common browser fingerprint techniques to improve your privacy.
RubberGlove aims to reduce the ability of websites to globally fingerprint your browser. The Electronic Frontier Foundation's website, panopticlick.eff.org, and the associated study shows just how effective these techniques are for tracking you even without cookies.
Currently it wraps the window.navigator and window.clientInformation objects to cloak plugins and mime types similar to the way Firefox and IE do.
Planned future features:
* Reduction of detailed version information both in window.navigator and the http User-Agent header.
* Prevention of time skew and drift fingerprinting
* Prevention of canvas based fingerprinting
Currently Chrome does not make it possible to get configuration information early enough in the page load to be useful. This may delay any features which need to be configured or selectively disabled.
Please note that until this plugin or others like it are widely used, Panopticlick will likely still report your browser as unique despite the reduction in bits of identifying information.
+60
View File
@@ -0,0 +1,60 @@
html {
width: 25em;
}
body {
margin: 0.20em;
}
a img {
border: 0;
}
.header {
border-bottom: 1px solid #92adef;
margin-bottom: 0.5em;
}
.footer {
border-top: 1px solid #92adef;
margin-top: 0.5em;
color: #BBBBBB;
font-size: 70%;
text-align: center;
}
.extensionTitle {
font-size: 200%;
font-weight: bold;
color: #92adef;
}
#extensionVersion {
font-size: 40%;
}
.extensionIcon {
float: left;
width: 4em;
}
.donateButton {
float: right;
width: 5em;
}
.quote {
font-size: 75%;
}
.quote .attribution {
font-weight: bold;
text-align: right;
}
.quote .publication {
font-style: italic;
}
.warningBox {
border: 1px solid #92adef;
border-radius: 0.25em;
}
.warningBox:not(:first-of-type) {
margin-top: 0.5em;
}
.warningBox:before {
content: 'WARNING';
display: block;
text-align: center;
background-color: yellow;
border-bottom: 1px solid #92adef;
}
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<script src="/js/options.js"></script>
<link rel="stylesheet" type="text/css" href="/css/options.css">
</head>
<body>
<div class="header">
<a href="bitcoin:14B7hKTgSRKQewJbj8YQLy3nJ7QL36LBJT" target="_blank"><img src="/images/bitcoindonate.png" class="donateButton" /></a>
<img src="/images/icon64.png" class="extensionIcon" />
<div class="extensionTitle">
<span>RubberGlove</span>
<span id="extensionVersion"/>
</div>
<div class="quote">
&ldquo;Just because you're paranoid doesn't mean they aren't after you.&rdquo;
<div class="attribution">&mdash; Joseph Heller, <span class="publication">Catch-22</span></div>
</div>
</div>
<div>
<a href="https://www.panopticlick.com/" target="_blank">Visit panopticlick.com to see it in action.</a>
<p>Third-party cookies make fingerprinting unecessary. Disable third-party cookies in Chrome's privacy settings.</p>
<p>Plugins including Flash, Java, Quicktime and Silverlight expose additional information that's difficult to block. Plugins should be set to "Click to play" or disabled to minimize exposure.</p>
</div>
<div class="footer">Copyright &copy; 2014 Jason S. Clary</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+31
View File
@@ -0,0 +1,31 @@
function resetBadgeCounter(tabId) {
localStorage['RubberGlove_BlockCount_' + tabId] = 0;
chrome.browserAction.setBadgeBackgroundColor({ color: [255, 0, 0, 255] });
chrome.browserAction.setBadgeText({text: '', tabId: tabId});
}
function incrementBadgeCounter(tabId) {
var count = localStorage['RubberGlove_BlockCount_' + tabId] || 0;
localStorage['RubberGlove_BlockCount_' + tabId] = ++count;
chrome.browserAction.setBadgeBackgroundColor({ color: [255, 0, 0, 255] });
chrome.browserAction.setBadgeText({text: count.toString(), tabId: tabId});
}
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
var response = {};
switch(request.type)
{
case "increment-counter":
if(sender && sender.tab && sender.tab.id)
incrementBadgeCounter(sender.tab.id);
else console.error("RubberGlove: onMessage called without sender.tab.id");
break;
}
if(sendResponse) sendResponse(response);
});
chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,tab) {
if(changeInfo.status == "loading") {
resetBadgeCounter(tabId);
}
});
+122
View File
@@ -0,0 +1,122 @@
window.navigator = window.clientInformation = function() {
var oldNavigator = navigator;
var altNav = {};
var propertyNames = Object.getOwnPropertyNames(oldNavigator);
for(var propertyIndex = 0; propertyIndex < propertyNames.length; propertyIndex++) {
propertyName = propertyNames[propertyIndex];
var descriptor = Object.getOwnPropertyDescriptor(navigator, propertyName);
if(typeof descriptor.value != 'undefined')
delete descriptor['value'];
if(typeof descriptor.get != 'undefined')
delete descriptor['get'];
var writable = false;
if(typeof descriptor.set != 'undefined') {
delete descriptor['set'];
writable = true;
}
if(typeof descriptor.writable != 'undefined') {
if(descriptor.writable == 'true') writable = true;
delete descriptor['writable'];
}
if(propertyName == 'plugins') {
console.log('RubberGlove: Cloaking plugins for ' + window.location.href);
var plugins = { };
Object.defineProperty(plugins, 'length', { 'get': function() {
var eventNode = document.currentScript.parentNode;
return function() {
console.error('RubberGlove: Enumeration of navigator.plugins blocked for ' + window.location.href);
window.postMessage({ type: 'RubberGlove', text: 'navigator.plugins' }, '*');
return 0;
};
}(), enumerable: true});
if(typeof descriptor.get == 'function')
delete descriptor['get'];
plugins.item = function() {
var item = function(index) { return; };
item.toString = function() { return "function item() { [native code] }"; };
return item; // function(index) { return item(index); };
}();
plugins.namedItem = function() {
var fakePlugins = plugins;
var namedItem = function(name) { return fakePlugins[name]; };
namedItem.toString = function() { return "function namedItem() { [native code] }"; };
return namedItem; //function(name) { return namedItem(name); };
}();
plugins.refresh = function() {
var fakePlugins = plugins;
var realPlugins = oldNavigator.plugins;
var refresh = function() {
realPlugins.refresh();
for(var property in fakePlugins) {
if(property != 'refresh' && property != 'item' && property != 'namedItem' && property != 'length') {
delete fakePlugins[property];
}
}
for(var n = 0; n < realPlugins.length; n++) {
var plugin = realPlugins[n];
//console.log('RubberGlove: Cloaking \'' + plugin.name + '\'');
if(typeof plugin.name != 'undefined' && plugin.name != null && plugin.name != '' && plugin.name != ' ')
Object.defineProperty(fakePlugins, plugin.name, { 'value': plugin });
}
};
refresh.toString = function() { return "function refresh() { [native code] }"; };
return refresh; //function() { return refresh(name); };
}();
plugins.refresh();
descriptor.value = plugins;
} else if(propertyName == 'mimeTypes') {
console.log('RubberGlove: Cloaking mimeTypes for ' + window.location.href);
var mimeTypes = { };
Object.defineProperty(mimeTypes, 'length', { 'get': function() {
var eventNode = document.currentScript.parentNode;
return function() {
console.error('RubberGlove: Enumeration of navigator.mimeTypes blocked');
window.postMessage({ type: 'RubberGlove', text: 'navigator.mimeTypes' }, '*');
return 0;
};
}(), enumerable: true});
if(typeof descriptor.get == 'function')
delete descriptor['get'];
mimeTypes.item = function() {
var item = function(index) { return; };
item.toString = function() { return "function item() { [native code] }"; };
return item; // function(index) { return item(index); };
}();
for(var n = 0; n < oldNavigator.mimeTypes.length; n++) {
var mimeType = oldNavigator.mimeTypes[n];
//console.log('RubberGlove: Cloaking \'' + mimeType.type + '\'');
if(typeof mimeType.type != 'undefined' && mimeType.type != null && mimeType.type != '' && mimeType.type != ' ')
Object.defineProperty(mimeTypes, mimeType.type, { 'value': mimeType });
}
descriptor.value = mimeTypes;
} else {
//console.log("RubberGlove: wrapping " + propertyName);
descriptor.get = function() {
var prop = propertyName;
var nav = oldNavigator;
return function() { return nav[prop] };
}();
if(writable) {
descriptor.set = function(value) {
var prop = propertyName;
var nav = oldNavigator;
return function() { nav[prop] = value; };
}();
}
}
Object.defineProperty(altNav, propertyName, descriptor);
}
for(propertyName in oldNavigator) {
if(typeof(oldNavigator[propertyName]) == "function") {
//console.log("RubberGlove: Wrapping function " + propertyName + "()");
altNav[propertyName] = oldNavigator[propertyName];
}
}
return altNav;
}();
if(document.currentScript.id == '_RubberGlove_removeHead') {
document.currentScript.parentNode.parentNode.removeChild(document.currentScript.parentNode);
} else {
document.currentScript.parentNode.removeChild(document.currentScript);
}
+37
View File
@@ -0,0 +1,37 @@
//console.log("RubberGlove: Content Script for " + window.location.href);
function loadScript(name) {
var request = new XMLHttpRequest();
request.open('GET', chrome.runtime.getURL(name), false);
request.send(null);
if (request.status === 200) {
return request.responseText;
}
console.error("RubberGlove: Failed to load " + name);
return;
}
var pageScripts = document.createElement('script');
pageScripts.type = 'text/javascript';
pageScripts.async = false;
pageScripts.text = loadScript("js/bomOverride.js");
var html = document.documentElement
var headTags = document.getElementsByTagName("head");
var head = headTags.length > 0 ? head = headTags[0] : null;
if(!head || head != html.firstChild) {
head = document.createElement('head');
html.insertBefore(head, html.firstChild);
pageScripts.id = "_RubberGlove_removeHead";
}
window.addEventListener("message", function(event) {
if(event.source != window) return;
if(event.data.type && event.data.type == "RubberGlove") {
chrome.runtime.sendMessage({
type: "increment-counter",
url: window.location.href,
message: event.data.text
});
}
});
head.insertBefore(pageScripts, head.firstChild);
+7
View File
@@ -0,0 +1,7 @@
window.addEventListener('load', function() {
var extensionVersion = document.getElementById('extensionVersion');
extensionVersion.appendChild(document.createTextNode(chrome.app.getDetails().version));
var bomViewer = document.getElementById("bomViewer");
bomViewer.href = chrome.runtime.getURL("/html/bomViewer.html");
});
+39
View File
@@ -0,0 +1,39 @@
{
"manifest_version": 2,
"name": "RubberGlove",
"author": "Jason S. Clary",
"description": "Blocks common browser fingerprint techniques to improve your privacy.",
"version": "14.7.7.1",
"icons": {
"16": "images/icon16.png",
"19": "images/icon19.png",
"32": "images/icon32.png",
"48": "images/icon48.png",
"64": "images/icon64.png",
"128": "images/icon128.png"
},
"content_scripts": [
{
"matches": [ "*://*/*", "https://*/*", "file://*/*" ],
"js": ["js/injectScripts.js"],
"run_at": "document_start",
"all_frames": true
}
],
"background": {
"scripts": ["js/background.js"],
"persistent": true
},
"browser_action": {
"default_icon": "images/icon19.png",
"default_popup": "html/options.html"
},
"permissions": [
"tabs",
"privacy"
],
"web_accessible_resources": [
"js/bomOverride.js"
],
"incognito": "spanning"
}