Skip to content

Commit 5a4f4a1

Browse files
authored
Merge branch 'main' into patch-1
2 parents f3e55e2 + 7672ee4 commit 5a4f4a1

File tree

4 files changed

+57
-10
lines changed

4 files changed

+57
-10
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ip-sniff
1+
# EpicTracker [ip-sniff]
22
Demo: https://epictracker.now.sh
33
- It is a demontstration project of how can I track you using fingerprinting and some automated lookups and stuff.
44
- It uses modern Javascript APIs to intentify your metadata and keeps the information in a cookie, encrypting it.
@@ -17,10 +17,22 @@ Demo: https://epictracker.now.sh
1717
- Device Acceleration.
1818
- Weather information of your area.
1919

20+
## How can stop we stop you from tracking us?
21+
- Use A VPN [your information wont be visible but probably I will detect if you are using one ;) ]
22+
- Find ways to disable fingerprinting in your browser, which is tough.
23+
24+
## How can I stop Google and Facebook from tracking us?
25+
- *You Can't*
26+
2027
## Is this illegal ?
2128
- No, it's not.
2229
- The data is not enough to track you in real life (it's not public) , they are just to identify your device. And this is just for demonstration purposes so I'm not going to show you any ADs.
2330

2431
## Current Arch-
2532
I use some javascript APIs which is listed in the `client` folder, as [index.js](https://github.com/ujjwal-kr/ip-sniff/blob/main/client/index.js) and sends to to a HEROKU backend, the source is in the `index.js` of the root directory. The server takes in your IP and does a quick IP lookup, also acccepts the cookie and logs in the server.
2633

34+
### Todos
35+
- Try to detect VPN connections from another country.
36+
- Tell user how many time they visited the page. (cookie mode).
37+
- Tell user how many times they visited the page. (magic mode).
38+
- Add some styles.

client/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body {
1919
}
2020

2121
.wrapper {
22-
font-size: 1.1em;
22+
font-size: 1.2em;
2323
}
2424

2525
p {

client/index.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const languagePhrase = `Your device language is ${language}.`;
1313
const dimentionPhrase = `Your device dimensions are ${deviceHeight} X ${deviceWidth}.`;
1414
const colorDepthPhrase = `Your device's color depth is ${colorDepth}.`;
1515
document.querySelector('.headers').textContent = `LOADING.............`
16-
document.querySelector('.pin').textContent = `LOADING...............`
16+
document.querySelector('.pin').textContent = `LOADING...............`;
1717
// Put info
1818
document.querySelector('.memory').textContent = memeoryPhrase;
1919
document.querySelector('.platform').textContent = platformPhrase;
@@ -41,6 +41,7 @@ function getGraphicalUnitExtensions(gl){
4141
return unMaskedInfo;
4242
}
4343
document.querySelector(".graphics").textContent = graphicsInfoPhrase;
44+
// Device Acceleration go brrrrr
4445
if (deviceWidth < 990) {
4546
if (window.DeviceMotionEvent) {
4647
window.addEventListener('devicemotion', function(event) {
@@ -49,7 +50,6 @@ if (deviceWidth < 990) {
4950
Math.round(event.rotationRate.beta),
5051
Math.round(event.rotationRate.alpha),
5152
Math.round(event.rotationRate.gamma))
52-
5353
getIfDeviceInAcceleration(
5454
Math.round(event.acceleration.x),
5555
Math.round(event.acceleration.y),
@@ -69,23 +69,30 @@ function getIfDeviceInAcceleration(x,y,z) {
6969
let a = x*x;
7070
let b = y*y;
7171
let c = z*z;
72-
7372
if(a+b+c > 0) {
7473
return document.querySelector('.acceleration').textContent = `Your device is in accelerated motion`;
7574
}
7675
document.querySelector('.acceleration').textContent = `Your device isnt accelerating`;
7776
}
7877
// cookie string send
7978
async function bakeCookie(data) {
80-
const response = await fetch("https://mycookie-monster.herokuapp.com/generate/"+ btoa(JSON.stringify(data)) , {
79+
const response = await fetch("http://localhost:5000/generate/"+ btoa(JSON.stringify(data)) , {
8180
headers: {'Content-Type': 'application/json'},
8281
method: 'GET',
8382
})
8483
return response.json()
8584
}
85+
// VPN
86+
async function ifVpn(data) {
87+
const response = await fetch("http://localhost:5000/if-vpn/"+ btoa(JSON.stringify(data)), {
88+
method: 'GET',
89+
headers: {'Content-Type': 'application/json'}
90+
})
91+
return response.json()
92+
}
8693
// init req
8794
async function nowFetch() {
88-
const response = await fetch("https://mycookie-monster.herokuapp.com/", {
95+
const response = await fetch("http://localhost:5000/", {
8996
headers: {'Content-Type': 'application/json'},
9097
method: 'GET'
9198
})
@@ -125,4 +132,10 @@ nowFetch().then(response => {
125132
const cookiePhrase = `The cookie I stored to identify you: ${res.cookie}.`;
126133
document.querySelector('.cookie').textContent = cookiePhrase;
127134
})
135+
})
136+
const date = Date.now()
137+
console.log(date)
138+
const vpnData = {timezone: data.timezone}
139+
console.log(vpnData)
140+
ifVpn(vpnData).then(res => { console.log(res) })
128141
})

index.js

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ app.get('/', async (req, res) => {
2121
const ip = req.headers['x-forwarded-for']
2222
const agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36';
2323

24-
const url = "https://api.ip8.com/ip/lookup/"+ip;
24+
// const url = "https://api.ip8.com/ip/lookup/"+ip;
25+
const url = "https://api.ip8.com/ip/lookup/176.10.112.40";
2526

2627
await Axios.get(url, {
2728
headers: {
@@ -58,13 +59,34 @@ app.get('/', async (req, res) => {
5859
});
5960

6061

61-
app.get('/generate/:data', async (req, res) => {
62+
app.get('/generate/:data', async (req, res) => { // Because URL PARAMS ARE COOLER
6263
// this can be stored in the Database now
6364
console.log(atob(req.params.data));
6465
res.json({cookie: req.params.data})
6566
})
6667

68+
app.get('/if-vpn/:data', async(req, res) => {
69+
const data = JSON.parse(atob(req.params.data))
70+
console.log(data)
71+
// Timezone Stuff
72+
let options = {
73+
timeZone: data.timezone,
74+
hour: 'numeric',
75+
minute: 'numeric',
76+
month: 'numeric',
77+
second: 'numeric',
78+
year: 'numeric',
79+
day: 'numeric'
80+
},
81+
formatter = new Intl.DateTimeFormat([], options);
82+
const stringTime = formatter.format(new Date());
83+
const IPtime = Date.parse(stringTime)
84+
console.log(IPtime)
85+
console.log(stringTime)
86+
return res.json({message: "yay i work"})
87+
})
88+
6789
const port = process.env.PORT || 4000;
6890
app.listen(port, () => {
69-
console.log('Example app listening on port ' + port);
91+
console.log(`Waiting on port for someone :) ${port}`);
7092
});

0 commit comments

Comments
 (0)