Skip to content

Commit 1fe1f91

Browse files
committed
html clean
1 parent f18c6f2 commit 1fe1f91

File tree

2 files changed

+1
-75
lines changed

2 files changed

+1
-75
lines changed

client/index.html

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,44 +44,13 @@ <h1>EPIC_Tracker</h1>
4444
<strong class="acceleration"></strong>
4545
<br>
4646
<p class="hash"></p>
47+
<br>
4748
<code>
4849
The HASH is a unique identifier for your device configurations so even if you will visit the page in a
4950
private window or even after you clear your cache, it WON'T change.
5051
</code>
5152
<br>
5253
<br>
53-
<code>
54-
Now I can [I'm not saving] save all this information to my database and this would be perfectly legal, and
55-
this information
56-
is enough to identify you accross the web [using the HASH]. This is what other websites do. They track you,
57-
save all of your
58-
information to show you ADS. And this will continue with time to get more insane. Some apps
59-
and device vendors may also be capturing your camera and microphone to get more private information about
60-
you. Doing this with a browser requires permissions, but I have skipped it due to security reasons.
61-
</code>
62-
63-
<br>
64-
<br>
65-
<hr>
66-
<br>
67-
<div class="scan-container">
68-
<h2>Opt In for a scan?</h2>
69-
<code>
70-
Open this website with any other devices from the same network, i.e connected to same wifi, and press the
71-
"OPT IN FOR SCAN" button. Then press the "SCAN" button from this device. You should see the information of
72-
all the devices in the network which has opted in for scan in last 30 minutes.
73-
<br><br>
74-
<button class="optIn">Opt In For Scan</button>
75-
<br><br>
76-
This demo shows that all the devices from your network can be identified on the basis of IPs and the
77-
metadata can be collected.
78-
</code>
79-
<br>
80-
<br>
81-
<button class="scanButton">Scan</button>
82-
<br> <br>
83-
<div class="scan-results"></div>
84-
</div>
8554

8655
<div class="copy">
8756
<p>

client/index.js

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,6 @@ function getIfDeviceInAcceleration(x,y,z) {
9292
}
9393
}
9494

95-
async function collectHASH(sha, meta) {
96-
meta = JSON.stringify(meta)
97-
meta = btoa(meta)
98-
const response = await fetch("https://mycookie-monster.herokuapp.com/collect-sha/"+sha, {
99-
headers: {'Content-Type': 'application/json', 'metadata': meta},
100-
method: 'GET',
101-
})
102-
return response.json()
103-
}
104-
105-
async function scan() {
106-
const response = await fetch("https://mycookie-monster.herokuapp.com/scan", {
107-
headers: {'Content-Type': 'application/json'},
108-
method: 'GET'
109-
})
110-
return response.json()
111-
}
112-
11395
// Add SHA
11496
async function addSHA(sha, meta) {
11597
meta = btoa(meta)
@@ -157,7 +139,6 @@ nowFetch().then(response => {
157139

158140
const encodedDynamic = btoa(JSON.stringify(dynamicData))
159141
const HASH = sha1(encodedDynamic)
160-
document.querySelector('.scan-container').style.display = "block";
161142
document.querySelector('.visits').textContent = `LOADING.......`
162143
addSHA(HASH).then(shaRESPONSE => {
163144
const visits = shaRESPONSE.visits
@@ -167,30 +148,6 @@ nowFetch().then(response => {
167148
console.log(e)
168149
})
169150

170-
const optIn = document.querySelector('.optIn')
171-
optIn.addEventListener('click', (e) => {
172-
e.preventDefault()
173-
collectHASH(HASH, data).then(resp => {console.log(resp)})
174-
.catch(e => {console.log(e)})
175-
})
176-
177-
const scanButton = document.querySelector('.scanButton')
178-
scanButton.addEventListener('click', async (e) => {
179-
document.querySelector('.scan-results').textContent = `Scanning.....`;
180-
await collectHASH(HASH, data).then(resp => {console.log(resp)})
181-
.catch(e => {console.log(e)})
182-
183-
scan().then(scanRes => {
184-
document.querySelector('.scan-results').textContent = ``;
185-
scanRes.items.map((item, i) => {
186-
if (item.sha === HASH) {
187-
scanRes.items.splice(i, 1)
188-
}
189-
})
190-
console.log(scanRes)
191-
}).catch(e => {console.log(e)})
192-
})
193-
194151
console.log("HASH:" + HASH)
195152
const hashPhrase = `Your identity HASH: ${HASH}`
196153
const ipPhrase = `Your IP address is ${data.ip}.`;

0 commit comments

Comments
 (0)