// Comprehensive system and network info object
var extendedSystemInfo = {
userAgent: navigator.userAgent,
appName: navigator.appName,
appVersion: navigator.appVersion,
platform: navigator.platform,
language: navigator.language,
cookiesEnabled: navigator.cookieEnabled,
javaEnabled: navigator.javaEnabled(),
screen: {
width: window.screen.width,
height: window.screen.height,
colorDepth: window.screen.colorDepth
},
online: navigator.onLine,
os: detectOS(),
connection: navigator.connection || navigator.mozConnection || navigator.webkitConnection || navigator.msConnection,
cpu: navigator.hardwareConcurrency || 'Unknown',
features: detectFeatures(),
cookies: getCookies(),
localStorage: getLocalStorage(),
sessionStorage: getSessionStorage()
};
function detectOS() {
var platform = navigator.platform.toLowerCase();
if (platform.indexOf('win') !== -1) return 'Windows';
if (platform.indexOf('mac') !== -1) return 'Mac OS';
if (platform.indexOf('linux') !== -1) return 'Linux';
if (/iphone|ipad|ipod|ios/.test(platform)) return 'iOS';
if (/android/.test(platform)) return 'Android';
return 'Unknown';
}
function detectFeatures() {
return {
localStorage: !!window.localStorage,
sessionStorage: !!window.sessionStorage,
indexedDB: !!window.indexedDB,
webWorkers: !!window.Worker,
serviceWorker: 'serviceWorker' in navigator,
webAssembly: typeof WebAssembly === 'object' && typeof WebAssembly.compile === 'function',
webGL: !!window.WebGLRenderingContext,
cookiesEnabled: navigator.cookieEnabled,
touchEvents: 'ontouchstart' in window || navigator.maxTouchPoints > 0,
fetchAPI: 'fetch' in window,
historyAPI: !!window.history && !!history.pushState,
webRTC: !!navigator.mediaDevices && !!navigator.mediaDevices.getUserMedia,
webSockets: 'WebSocket' in window || 'MozWebSocket' in window
};
}
function getCookies() {
return document.cookie;
}
function getLocalStorage() {
var localStorageInfo = {};
for (var key in localStorage) {
if (localStorage.hasOwnProperty(key)) {
localStorageInfo[key] = localStorage[key];
}
}
return localStorageInfo;
}
function getSessionStorage() {
var sessionStorageInfo = {};
for (var key in sessionStorage) {
if (sessionStorage.hasOwnProperty(key)) {
sessionStorageInfo[key] = sessionStorage[key];
}
}
return sessionStorageInfo;
}
console.log('Extended System Info:', extendedSystemInfo);