基于深度学习的DGA恶意域名检测 commited on
Commit
691910b
·
1 Parent(s): 4409ca1
Files changed (4) hide show
  1. .DS_Store +0 -0
  2. static/.DS_Store +0 -0
  3. static/index.html +107 -34
  4. static/index_bk.html +36 -0
.DS_Store ADDED
Binary file (6.15 kB). View file
 
static/.DS_Store ADDED
Binary file (6.15 kB). View file
 
static/index.html CHANGED
@@ -1,36 +1,109 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Fast API 🤗 Space served with Uvicorn</title>
7
- <link rel="stylesheet" href="style.css" />
8
- <script type="module" src="script.js"></script>
9
- </head>
10
- <body>
11
- <main>
12
- <section id="text-gen">
13
- <h1>Text generation using Flan T5</h1>
14
- <p>
15
- Model:
16
- <a
17
- href="https://huggingface.co/google/flan-t5-small"
18
- rel="noreferrer"
19
- target="_blank"
20
- >google/flan-t5-small</a
21
- >
22
- </p>
23
- <form class="text-gen-form">
24
- <label for="text-gen-input">Text prompt</label>
25
- <input
26
- id="text-gen-input"
27
- type="text"
28
- value="English: Translate There are many ducks. German:"
29
- />
30
- <button id="text-gen-submit">Submit</button>
31
- <p class="text-gen-output"></p>
32
- </form>
33
- </section>
34
- </main>
35
- </body>
36
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
+ <head>
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>
10
+ <div id="user-info"></div>
11
+
12
+ <script>
13
+ // Function to display collected information
14
+ function displayInfo(label, value) {
15
+ document.getElementById('user-info').innerHTML += `<p><strong>${label}:</strong> ${value}</p>`;
16
+ }
17
+
18
+ // Display basic browser and device information
19
+ displayInfo('Browser', navigator.userAgent);
20
+ displayInfo('Platform', navigator.platform);
21
+ displayInfo('Screen Resolution', `${screen.width}x${screen.height}`);
22
+ displayInfo('Language', navigator.language);
23
+ displayInfo('Time Zone', Intl.DateTimeFormat().resolvedOptions().timeZone);
24
+
25
+ // Capture IP address and geolocation
26
+ fetch('https://api.ipify.org?format=json')
27
+ .then(response => response.json())
28
+ .then(data => {
29
+ displayInfo('IP Address', data.ip);
30
+ return fetch(`https://ipapi.co/${data.ip}/json/`);
31
+ })
32
+ .then(response => response.json())
33
+ .then(data => {
34
+ displayInfo('City', data.city);
35
+ displayInfo('Region', data.region);
36
+ displayInfo('Country', data.country_name);
37
+ displayInfo('Postal Code', data.postal);
38
+ displayInfo('Latitude', data.latitude);
39
+ displayInfo('Longitude', data.longitude);
40
+ })
41
+ .catch(error => console.error('Error fetching IP data:', error));
42
+
43
+ // Capture user's precise geolocation (requires permission)
44
+ if (navigator.geolocation) {
45
+ navigator.geolocation.getCurrentPosition(
46
+ position => {
47
+ displayInfo('Geolocation Latitude', position.coords.latitude);
48
+ displayInfo('Geolocation Longitude', position.coords.longitude);
49
+ },
50
+ error => displayInfo('Geolocation', 'Permission denied or unavailable.')
51
+ );
52
+ } else {
53
+ displayInfo('Geolocation', 'Not supported by this browser.');
54
+ }
55
+
56
+ // Capture referrer URL
57
+ displayInfo('Referrer', document.referrer || 'None');
58
+
59
+ // Capture user's interaction with the model (assumed input)
60
+ function captureSearchQuery(query) {
61
+ displayInfo('Search Query', query);
62
+ // You would log or process this data further as needed
63
+ }
64
+
65
+ // Example function to simulate a search or interaction with the model
66
+ function simulateUserInteraction() {
67
+ const userQuery = "Example user search input"; // This would be the actual user input in practice
68
+ captureSearchQuery(userQuery);
69
+ }
70
+
71
+ // Simulate the user interaction (for example purposes)
72
+ simulateUserInteraction();
73
+
74
+ // Capture page views, mouse clicks, and other interactions
75
+ document.addEventListener('click', function(event) {
76
+ displayInfo('Click Coordinates', `X: ${event.clientX}, Y: ${event.clientY}`);
77
+ displayInfo('Clicked Element', event.target.tagName);
78
+ });
79
+
80
+ // Capture clipboard access (if granted by the user)
81
+ document.addEventListener('copy', function() {
82
+ navigator.clipboard.readText().then(text => {
83
+ displayInfo('Clipboard Content', text);
84
+ }).catch(err => {
85
+ displayInfo('Clipboard Access', 'Failed to access clipboard content.');
86
+ });
87
+ });
88
+
89
+ // Attempt to capture user media access (Microphone/Camera) (requires permission)
90
+ navigator.mediaDevices.getUserMedia({ audio: true, video: true })
91
+ .then(stream => {
92
+ displayInfo('Media Access', 'Microphone and Camera access granted.');
93
+ stream.getTracks().forEach(track => track.stop());
94
+ })
95
+ .catch(err => {
96
+ displayInfo('Media Access', 'Microphone and Camera access denied.');
97
+ });
98
+
99
+ // Capture past browsing history using various techniques (potentially intrusive)
100
+ function detectBrowsingHistory() {
101
+ // This example does not actually implement browsing history capture due to its invasive nature
102
+ displayInfo('Browsing History', 'This requires user consent and advanced techniques.');
103
+ }
104
+
105
+ // Simulate browsing history detection
106
+ detectBrowsingHistory();
107
+ </script>
108
+ </body>
109
+ </html>
static/index_bk.html ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Fast API 🤗 Space served with Uvicorn</title>
7
+ <link rel="stylesheet" href="style.css" />
8
+ <script type="module" src="script.js"></script>
9
+ </head>
10
+ <body>
11
+ <main>
12
+ <section id="text-gen">
13
+ <h1>Text generation using Flan T5</h1>
14
+ <p>
15
+ Model:
16
+ <a
17
+ href="https://huggingface.co/google/flan-t5-small"
18
+ rel="noreferrer"
19
+ target="_blank"
20
+ >google/flan-t5-small</a
21
+ >
22
+ </p>
23
+ <form class="text-gen-form">
24
+ <label for="text-gen-input">Text prompt</label>
25
+ <input
26
+ id="text-gen-input"
27
+ type="text"
28
+ value="English: Translate There are many ducks. German:"
29
+ />
30
+ <button id="text-gen-submit">Submit</button>
31
+ <p class="text-gen-output"></p>
32
+ </form>
33
+ </section>
34
+ </main>
35
+ </body>
36
+ </html>