-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
211 lines (200 loc) · 12.7 KB
/
index.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Info</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #1a1a1a;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
color: #fff;
transition: all 0.3s ease;
}
.container {
width: 80%;
max-width: 1200px;
background-color: #2d2d2d;
padding: 20px;
border-radius: 12px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
transition: transform 0.3s ease;
margin: 40px 0;
}
.container:hover {
transform: translateY(-5px);
}
h1 {
text-align: center;
color: #fff;
margin-bottom: 30px;
}
.info-section {
margin-bottom: 25px;
padding: 15px;
background-color: #363636;
border-radius: 8px;
transition: all 0.3s ease;
}
.info-section:hover {
background-color: #404040;
transform: translateX(5px);
}
.info-section h2 {
color: #4CAF50;
margin-bottom: 15px;
}
.info-section p {
font-size: 14px;
margin: 8px 0;
transition: all 0.2s ease;
}
.info-section p:hover {
transform: translateX(5px);
}
.info-section p strong {
color: #fff;
}
.info-section p span {
color: #b3b3b3;
}
.data-value {
color: #4CAF50;
}
</style>
</head>
<body>
<div class="container">
<h1>User Information</h1>
<!-- Network Information -->
<div class="info-section" id="network-info">
<h2>Network Information</h2>
<p><strong>IP Address (IPv4):</strong> <span id="ip-address">Loading...</span></p>
<p><strong>IP Address (IPv6 Short):</strong> <span id="ip-address-v6short">Loading...</span></p>
<p><strong>IP Address (IPv6 Long):</strong> <span id="ip-address-v6long">Loading...</span></p>
<p><strong>IP Address (Integer):</strong> <span id="ip-address-integer">Loading...</span></p>
<p><strong>IP Address (Hex):</strong> <span id="ip-address-hex">Loading...</span></p>
<p><strong>Hostname:</strong> <span id="hostname">Loading...</span></p>
<p><strong>Country:</strong> <span id="country">Loading...</span></p>
<p><strong>City:</strong> <span id="city">Loading...</span></p>
<p><strong>Region:</strong> <span id="region">Loading...</span></p>
<p><strong>Latitude:</strong> <span id="latitude">Loading...</span></p>
<p><strong>Longitude:</strong> <span id="longitude">Loading...</span></p>
<p><strong>Location:</strong> <span id="location">Loading...</span></p>
<p><strong>Download Speed:</strong> <span id="download-speed">Loading...</span></p>
<p><strong>Connection Generation:</strong> <span id="connection-generation">Loading...</span></p>
<p><strong>Ping Info:</strong> <span id="ping-info">Loading...</span></p>
</div>
<!-- System Information -->
<div class="info-section" id="system-info">
<h2>System Information</h2>
<p><strong>Platform:</strong> <span id="platform">Loading...</span></p>
<p><strong>Browser Name:</strong> <span id="browser-name">Loading...</span></p>
<p><strong>Browser Version:</strong> <span id="browser-version">Loading...</span></p>
<p><strong>Mobile:</strong> <span id="mobile">Loading...</span></p>
<p><strong>GPU Vendor:</strong> <span id="gpu-vendor">Loading...</span></p>
<p><strong>GPU Renderer:</strong> <span id="gpu-renderer">Loading...</span></p>
<p><strong>CPU Threads:</strong> <span id="cpu-threads">Loading...</span></p>
<p><strong>Device Memory:</strong> <span id="device-memory">Loading...</span></p>
<p><strong>Battery Level:</strong> <span id="battery-level">Loading...</span></p>
<p><strong>Battery Charging:</strong> <span id="battery-charging">Loading...</span></p>
<p><strong>Battery Charging Time:</strong> <span id="battery-charging-time">Loading...</span></p>
<p><strong>Battery Discharging Time:</strong> <span id="battery-discharging-time">Loading...</span></p>
</div>
<!-- Screen Information -->
<div class="info-section" id="screen-info">
<h2>Screen Information</h2>
<p><strong>Window Width:</strong> <span id="window-width">Loading...</span></p>
<p><strong>Window Height:</strong> <span id="window-height">Loading...</span></p>
<p><strong>Screen Width:</strong> <span id="screen-width">Loading...</span></p>
<p><strong>Screen Height:</strong> <span id="screen-height">Loading...</span></p>
<p><strong>Pixel Depth:</strong> <span id="pixel-depth">Loading...</span></p>
<p><strong>Orientation:</strong> <span id="orientation">Loading...</span></p>
</div>
<!-- Time Information -->
<div class="info-section" id="time-info">
<h2>Time Information</h2>
<p><strong>Timezone:</strong> <span id="timezone">Loading...</span></p>
<p><strong>IP Timezone:</strong> <span id="ip-timezone">Loading...</span></p>
<p><strong>Current Time:</strong> <span id="current-time">Loading...</span></p>
<p><strong>Potential Proxy:</strong> <span id="potential-proxy">Loading...</span></p>
</div>
<!-- Browser State -->
<div class="info-section" id="browser-state">
<h2>Browser State</h2>
<p><strong>Online:</strong> <span id="online">Loading...</span></p>
<p><strong>Touch Support:</strong> <span id="touch-support">Loading...</span></p>
<p><strong>Referrer:</strong> <span id="referrer">Loading...</span></p>
<p><strong>Do Not Track:</strong> <span id="do-not-track">Loading...</span></p>
<p><strong>Cookies Enabled:</strong> <span id="cookies-enabled">Loading...</span></p>
<p><strong>Private Browsing:</strong> <span id="is-private">Loading...</span></p>
<p><strong>Local Storage Supported:</strong> <span id="local-storage-supported">Loading...</span></p>
<p><strong>Ad Blocker:</strong> <span id="ad-blocker">Loading...</span></p>
</div>
</div>
<script src="./main.js"></script>
<script>
async function displayUserInfo() {
const info = await collectUserInfo();
console.log(info);
// Update Network Info
document.getElementById('ip-address').textContent = info.networkInfo.ip.v4 || 'N/A';
document.getElementById('ip-address-v6short').textContent = info.networkInfo.ip.v6short || 'N/A';
document.getElementById('ip-address-v6long').textContent = info.networkInfo.ip.v6long || 'N/A';
document.getElementById('ip-address-integer').textContent = info.networkInfo.ip.integer || 'N/A';
document.getElementById('ip-address-hex').textContent = info.networkInfo.ip.hex || 'N/A';
document.getElementById('hostname').textContent = info.networkInfo.ip.hostname || 'N/A';
document.getElementById('country').textContent = info.networkInfo.location.country || 'N/A';
document.getElementById('city').textContent = info.networkInfo.location.city || 'N/A';
document.getElementById('region').textContent = info.networkInfo.location.region || 'N/A';
document.getElementById('latitude').textContent = info.networkInfo.location.latitude || 'N/A';
document.getElementById('longitude').textContent = info.networkInfo.location.longitude || 'N/A';
document.getElementById('location').textContent = `${info.networkInfo.location.city}, ${info.networkInfo.location.region}, ${info.networkInfo.location.country}` || 'N/A';
document.getElementById('download-speed').textContent = info.networkInfo.downloadSpeed || 'N/A';
document.getElementById('connection-generation').textContent = info.networkInfo.generation || 'N/A';
document.getElementById('ping-info').textContent = info.networkInfo.PingInfo.ping || 'N/A'; // Update System Info
document.getElementById('platform').textContent = info.systemInfo.platform || 'N/A';
document.getElementById('browser-name').textContent = info.systemInfo.browser.name || 'N/A';
document.getElementById('browser-version').textContent = info.systemInfo.browser.version || 'N/A';
document.getElementById('mobile').textContent = info.systemInfo.browser.mobile ? 'Yes' : 'No';
document.getElementById('gpu-vendor').textContent = info.systemInfo.gpu.vendor || 'N/A';
document.getElementById('gpu-renderer').textContent = info.systemInfo.gpu.renderer || 'N/A';
document.getElementById('cpu-threads').textContent = info.systemInfo.cpu.threads || 'N/A';
document.getElementById('device-memory').textContent = info.systemInfo.memory.device || 'N/A';
document.getElementById('battery-level').textContent = info.systemInfo.batteryInfo.level ? `${Math.round(info.systemInfo.batteryInfo.level * 100)}%` : 'N/A';
document.getElementById('battery-charging').textContent = info.systemInfo.batteryInfo.charging ? 'Yes' : 'No';
document.getElementById('battery-charging-time').textContent = info.systemInfo.batteryInfo.chargingTime ? `${Math.round(info.systemInfo.batteryInfo.chargingTime / 60)} minutes` : 'N/A';
document.getElementById('battery-discharging-time').textContent = info.systemInfo.batteryInfo.dischargingTime ? `${Math.round(info.systemInfo.batteryInfo.dischargingTime / 60)} minutes` : 'N/A';
// Update Screen Info
document.getElementById('window-width').textContent = info.screenInfo.size.window.width || 'N/A';
document.getElementById('window-height').textContent = info.screenInfo.size.window.height || 'N/A';
document.getElementById('screen-width').textContent = info.screenInfo.size.screen.width || 'N/A';
document.getElementById('screen-height').textContent = info.screenInfo.size.screen.height || 'N/A';
document.getElementById('pixel-depth').textContent = info.screenInfo.display.pixelDepth || 'N/A';
document.getElementById('orientation').textContent = info.screenInfo.display.orientation || 'N/A';
// Update Time Info
document.getElementById('timezone').textContent = info.timeInfo.timezone || 'N/A';
document.getElementById('ip-timezone').textContent = info.timeInfo.ipTimezone || 'N/A';
document.getElementById('current-time').textContent = info.timeInfo.currentTime ? `${info.timeInfo.currentTime.date.monthName} ${info.timeInfo.currentTime.date.day}, ${info.timeInfo.currentTime.date.year} ${info.timeInfo.currentTime.time.hours}:${info.timeInfo.currentTime.time.minutes}:${info.timeInfo.currentTime.time.seconds}` : 'N/A';
document.getElementById('potential-proxy').textContent = info.timeInfo.potentialProxy ? 'Yes' : 'No';
// Update Browser State
document.getElementById('online').textContent = info.browserState.online ? 'Yes' : 'No';
document.getElementById('touch-support').textContent = info.browserState.touchSupport ? 'Yes' : 'No';
document.getElementById('referrer').textContent = info.browserState.referrer || 'N/A';
document.getElementById('do-not-track').textContent = info.browserState.doNotTrack.window || 'N/A';
document.getElementById('cookies-enabled').textContent = info.browserState.cookiesEnabled ? 'Yes' : 'No';
document.getElementById('is-private').textContent = info.browserState.isPrivate ? 'Yes' : 'No';
document.getElementById('local-storage-supported').textContent = info.browserState.localStorageSupported ? 'Yes' : 'No';
document.getElementById('ad-blocker').textContent = info.browserState.adBlocker ? 'Yes' : 'No';
}
// Call the function to display user info when the page loads
displayUserInfo();
</script>
</body>
</html>