This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Iniciar cronómetro | |
| var time_start = (new Date()).getTime(); | |
| // Pausar ejecución | |
| debugger; | |
| // Parar cronómetro | |
| var time_end = (new Date()).getTime(); | |
| var diff = time_end - time_start; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function checkDevTools() { | |
| // TODO: hacer cosas | |
| // Preparar la siguiente ejecución | |
| setTimeout(checkDevTools, 250); | |
| } | |
| checkDevTools(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Fingerprint2({ | |
| excludeUserAgent: true | |
| }).get(function(fp) { | |
| console.log('Tu fingerprint es ' + fp); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Fingerprint2().get(function(fp) { | |
| console.log('Tu fingerprint es ' + fp); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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;' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Número de núcleos de la CPU | |
| var cores = navigator.hardwareConcurrency; | |
| fp_sources.hardware.cores = cores; |