-
-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathsample.html
76 lines (75 loc) · 2.83 KB
/
sample.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
<head>
<title>Echolog sample</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
color: #333;
}
h1 {
color: #0066cc;
text-align: left;
margin: 20px 0;
}
h2 {
color: #0066cc;
text-align: left;
margin: 20px 0;
}
p {
font-size: 18px;
line-height: 1.5;
margin: 20px 0;
}
</style>
</head>
<body>
<h1>Echolog sample</h1>
<p>Quick and simple IP logger that gets results from a public and open source API, no server needed, just plain HTML and JavaScript fun.</p>
<p>This is a example page with Echolog, no data is sent to any servers. You can use the "echolog" variable to access information from the logger.</p>
<h2>Raw code</h2>
<pre><code style="word-wrap: break-word;overflow-wrap: break-word;white-space: pre-wrap;font-size: 16px;background-color: #e7ecf0;">Loading...</code></pre>
<script>
let echolog = {};
// here is the fun
fetch("https://wtfismyip.com/json")
.then((response) => response.json())
.then((data) => {
let echolog = {
ipAddress: data.YourFuckingIPAddress,
location: data.YourFuckingLocation,
hostname: data.YourFuckingHostname,
isp: data.YourFuckingISP,
city: data.YourFuckingCity,
country: data.YourFuckingCountry,
countryCode: data.YourFuckingCountryCode,
userAgent: navigator.userAgent,
windowProp: Object.keys(window).length,
windowWidth: window.innerWidth,
windowHeight: window.innerHeight,
windowRatio: window.innerWidth / window.innerHeight,
screenWidth: window.screen.availWidth,
screenHeight: window.screen.availHeight,
screenRatio: window.screen.availWidth / window.screen.availHeight,
DPI: window.devicePixelRatio,
colorDepth: window.screen.colorDepth,
orientation: window.screen.orientation.type,
orientationAngle: window.screen.orientation.angle,
os: navigator.platform,
threads: navigator.hardwareConcurrency,
memory: navigator.deviceMemory,
systemLanguages: navigator.languages.join(", "),
languages: navigator.language,
};
var codeBlock = document.querySelector("code");
codeBlock.innerText = JSON.stringify(echolog, null, 1);
hljs.highlightAll();
})
.catch((error) => console.error(error));
</script>
</body>
</html>