forked from samyk/evercookie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
42 lines (35 loc) · 1.65 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html>
<head>
<title>Evercookie - unforgettable cookies</title>
<script type="text/javascript" src="swfobject-2.2.min.js"></script>
<script type="text/javascript" src="evercookie.js"></script>
</head>
<body>
<script>
var val = "573";
var ec = new evercookie();
getC(1);
function getC(dont)
{
ec.get("uid", function(best, all) {
document.getElementById('idtag').innerHTML = best;
var txt = document.getElementById('cookies');
for (var item in all)
txt.innerHTML += item + ' mechanism: ' + (val == all[item] ? '<strong>' + all[item] + '</strong>' : all[item]) + '<br>';
}, dont);
}
</script>
<pre>
<strong>Cookie found:</strong> <em>uid</em> = <span id='idtag'>currently not set</span>
Click to create an evercookie. Don't worry, the cookie is a
random number between 1 and 1000, not enough for me to track
you, just enough to test evercookies.
<input type=button value="Click to create an evercookie" onClick="document.getElementById('idtag').innerHTML = '*creating*'; document.getElementById('cookies').innerHTML = ''; ec.set('uid', val); setTimeout(getC, 1000, 1); ">
<div id='cookies'></div>
Now, try deleting this "uid" cookie anywhere possible, then
<input type=button value="Click to rediscover cookies" onClick="document.getElementById('idtag').innerHTML = '*checking*'; document.getElementById('cookies').innerHTML = ''; setTimeout(getC, 300);">
or
<input type=button value="Click to rediscover cookies WITHOUT reactivating deleted cookies" onClick="document.getElementById('idtag').innerHTML = '*checking*'; document.getElementById('cookies').innerHTML = ''; setTimeout(getC, 300, 1);">
</pre>
</body>
</html>