Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am josemmo on github.
  • I am josemmo (https://keybase.io/josemmo) on keybase.
  • I have a public key whose fingerprint is C682 DE96 BC11 DA37 F599 C409 B66A A458 1742 36B2

To claim this, I am signing this object:

// Definimos un objeto donde guardar los datos
var fp_sources = {};
// Ahora ya podemos guardar los datos que hemos obtenido
fp_sources.metadata = {
appCodeName: navigator.appCodeName,
appName: navigator.appName,
cookieEnabled: navigator.cookieEnabled,
doNotTrack: navigator.doNotTrack,
defaultLanguage: navigator.language,
// Número de núcleos de la CPU
var cores = navigator.hardwareConcurrency;
fp_sources.hardware.cores = cores;
// Datos de la GPU via WebGL
var canvas = document.createElement('canvas');
var gl = canvas.getContext('webgl');
var GL_TAG = 'WEBGL_debug_renderer_info';
var gl_info = gl.getExtension(GL_TAG);
var TAG1 = gl_info.UNMASKED_RENDERER_WEBGL;
var TAG2 = gl_info.UNMASKED_VENDOR_WEBGL;
fp_sources.hardware = {
renderer: gl.getParameter(TAG1),
vendor: gl.getParameter(TAG2)
// Canvas fingerprint
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
var canvasTxt = 'Texto de prueba';
ctx.textBaseline = 'top';
ctx.font = '16px Arial';
ctx.textBaseline = 'alphabetic';
ctx.fillStyle = '#f60';
ctx.fillRect(125, 1, 62, 20);
ctx.fillStyle = '#069';
// Fuentes instaladas
fp_sources.fonts = {};
var fonts2Check = ['Arial', 'Arial Black', 'Arial Rounded MT Bold', 'Book Antiqua', 'Bookman Old Style', 'Calibri'];
var defaultFont = 'Comic Sans MS, Comic Sans, cursive';
var defaultText = 'mmmmmmmmmmambo';
var defaultWidth = 611;
for (var i=0; i<fonts2Check.length; i++) {
var fontName = fonts2Check[i];
var el = document.createElement('div');
el.style.cssText = 'position:absolute;' +
// Extensiones instaladas en Google Chrome
fp_sources.extensions = {};
var exposed_resources = [
['chrome-extension://.../f1.png', 'AdBlock'],
['chrome-extension://.../f2.png', 'Ghostery'],
['chrome-extension://.../f3.png', 'WOT']
];
var checkChromeExtension = function(i) {
if (i < exposed_resources.length) {
var ex = exposed_resources[i];
// Convertir objeto en fingerprint
var fp = JSON.stringify(fp_sources);
var shaObj = new jsSHA('SHA-1', 'TEXT');
shaObj.update(fp);
fp = shaObj.getHash('HEX');
alert('Tu fingerprint es ' + fp);
new Fingerprint2().get(function(fp) {
console.log('Tu fingerprint es ' + fp);
});
new Fingerprint2({
excludeUserAgent: true
}).get(function(fp) {
console.log('Tu fingerprint es ' + fp);
});