File size: 18,207 Bytes
e141aa4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MAC Address Analyzer</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        }
        .result-card {
            transition: all 0.3s ease;
        }
        .result-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .suspicious {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
            100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
        }
        .clean {
            animation: pulse-clean 2s infinite;
        }
        @keyframes pulse-clean {
            0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
        }
    </style>
</head>
<body class="min-h-screen bg-gray-100">
    <div class="gradient-bg text-white py-12 px-4">
        <div class="max-w-4xl mx-auto text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-4">MAC Address Analyzer</h1>
            <p class="text-xl mb-8 opacity-90">Check the legitimacy and details of any MAC address</p>
            
            <div class="max-w-xl mx-auto bg-white bg-opacity-10 rounded-lg p-6 backdrop-blur-sm">
                <div class="flex items-center">
                    <input type="text" id="macInput" placeholder="Enter MAC (e.g., D6:A6:7E:E1:7F:42)" 
                           class="flex-grow px-4 py-3 rounded-l-lg bg-white bg-opacity-20 text-white placeholder-white placeholder-opacity-70 focus:outline-none focus:ring-2 focus:ring-blue-300">
                    <button id="analyzeBtn" class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-3 rounded-r-lg font-medium transition-colors">
                        <i class="fas fa-search mr-2"></i> Analyze
                    </button>
                </div>
                <p class="text-sm mt-2 text-white text-opacity-70">Supports formats: XX:XX:XX:XX:XX:XX, XX-XX-XX-XX-XX-XX, XXXXXXXXXXXX</p>
            </div>
        </div>
    </div>

    <div class="max-w-4xl mx-auto px-4 py-8" id="resultsSection" style="display: none;">
        <div class="bg-white rounded-xl shadow-lg overflow-hidden mb-8">
            <div class="p-6">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-2xl font-bold text-gray-800">Analysis Results</h2>
                    <span id="finalVerdict" class="px-4 py-2 rounded-full text-sm font-semibold"></span>
                </div>
                
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div class="result-card bg-gray-50 p-6 rounded-lg border border-gray-200">
                        <h3 class="text-lg font-semibold text-gray-700 mb-3">Basic Information</h3>
                        <div class="space-y-4">
                            <div>
                                <p class="text-sm text-gray-500">Original MAC</p>
                                <p id="originalMac" class="font-mono text-gray-800"></p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-500">Formatted MAC</p>
                                <p id="formattedMac" class="font-mono text-blue-600"></p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-500">OUI (Vendor Prefix)</p>
                                <p id="oui" class="font-mono text-purple-600"></p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="result-card bg-gray-50 p-6 rounded-lg border border-gray-200">
                        <h3 class="text-lg font-semibold text-gray-700 mb-3">Vendor Details</h3>
                        <div class="space-y-4">
                            <div>
                                <p class="text-sm text-gray-500">Manufacturer</p>
                                <p id="vendor" class="font-medium"></p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-500">Vendor Reputation</p>
                                <p id="vendorReputation" class="flex items-center">
                                    <span id="vendorIcon" class="mr-2"></span>
                                    <span id="vendorText"></span>
                                </p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-500">Network Presence</p>
                                <p id="networkPresence" class="flex items-center">
                                    <span id="networkIcon" class="mr-2"></span>
                                    <span id="networkText"></span>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                <h3 class="text-lg font-semibold text-gray-700 mb-3">Security Analysis</h3>
                <div class="space-y-4">
                    <div id="macFormatCheck" class="flex items-start">
                        <span class="mr-3 mt-1" id="formatIcon"></span>
                        <div>
                            <p class="font-medium" id="formatText"></p>
                            <p class="text-sm text-gray-600" id="formatDetails"></p>
                        </div>
                    </div>
                    
                    <div id="macSuspiciousCheck" class="flex items-start">
                        <span class="mr-3 mt-1" id="suspiciousIcon"></span>
                        <div>
                            <p class="font-medium" id="suspiciousText"></p>
                            <p class="text-sm text-gray-600" id="suspiciousDetails"></p>
                        </div>
                    </div>
                    
                    <div id="macPatternCheck" class="flex items-start">
                        <span class="mr-3 mt-1" id="patternIcon"></span>
                        <div>
                            <p class="font-medium" id="patternText"></p>
                            <p class="text-sm text-gray-600" id="patternDetails"></p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div id="finalJudgement" class="p-6 border-t border-gray-200 text-center">
                <p class="text-xl font-bold mb-2" id="judgementText"></p>
                <p class="text-gray-600" id="judgementDetails"></p>
            </div>
        </div>
        
        <div class="bg-white rounded-xl shadow-lg overflow-hidden">
            <div class="p-6">
                <h3 class="text-xl font-bold text-gray-800 mb-4">About MAC Addresses</h3>
                <div class="prose max-w-none text-gray-700">
                    <p>A MAC (Media Access Control) address is a unique identifier assigned to network interfaces. The first 6 characters (OUI) identify the manufacturer, while the remaining 6 are device-specific.</p>
                    <p class="mt-2">Some devices may use randomized or spoofed MAC addresses for privacy reasons, which can appear suspicious in security checks. Common manufacturers like Foxconn produce many legitimate devices.</p>
                </div>
            </div>
        </div>
    </div>

    <footer class="bg-gray-800 text-white py-8 mt-12">
        <div class="max-w-4xl mx-auto px-4 text-center">
            <p class="mb-4">MAC Address Analyzer Tool - For educational purposes only</p>
            <p class="text-gray-400 text-sm">Uses the macvendors.com API for vendor lookup. Network presence detection works only on local networks.</p>
        </div>
    </footer>

    <script>
        document.getElementById('analyzeBtn').addEventListener('click', function() {
            const macInput = document.getElementById('macInput').value.trim();
            if (!macInput) {
                alert('Please enter a MAC address');
                return;
            }
            
            // Show loading state
            this.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Analyzing...';
            this.disabled = true;
            
            // Simulate analysis (in a real app, you'd make API calls)
            setTimeout(() => {
                analyzeMAC(macInput);
                this.innerHTML = '<i class="fas fa-search mr-2"></i> Analyze';
                this.disabled = false;
            }, 1000);
        });
        
        function analyzeMAC(mac) {
            // Show results section
            document.getElementById('resultsSection').style.display = 'block';
            
            // Format MAC address
            const formattedMAC = formatMAC(mac);
            document.getElementById('originalMac').textContent = mac;
            document.getElementById('formattedMac').textContent = formattedMAC;
            
            // Get OUI
            const oui = getOUI(formattedMAC);
            document.getElementById('oui').textContent = oui;
            
            // Get vendor (simulated - in real app use API)
            const vendor = lookupVendor(oui);
            document.getElementById('vendor').textContent = vendor;
            
            // Check vendor reputation
            const isCommonVendor = vendor.includes('Foxconn') || vendor.includes('Hon Hai') || 
                                 vendor.includes('Intel') || vendor.includes('Samsung');
            const vendorReputation = isCommonVendor ? 
                { icon: '<i class="fas fa-check-circle text-green-500"></i>', 
                  text: 'Known manufacturer (common for legitimate devices)', status: 'good' } :
                { icon: '<i class="fas fa-exclamation-triangle text-yellow-500"></i>', 
                  text: 'Less common manufacturer (check device authenticity)', status: 'warning' };
            
            document.getElementById('vendorIcon').innerHTML = vendorReputation.icon;
            document.getElementById('vendorText').textContent = vendorReputation.text;
            
            // Check network presence (simulated)
            const isOnNetwork = Math.random() > 0.7; // 30% chance for demo
            const networkPresence = isOnNetwork ? 
                { icon: '<i class="fas fa-wifi text-green-500"></i>', 
                  text: 'Device detected on local network', status: 'info' } :
                { icon: '<i class="fas fa-wifi-slash text-gray-500"></i>', 
                  text: 'Device not found on local network', status: 'neutral' };
            
            document.getElementById('networkIcon').innerHTML = networkPresence.icon;
            document.getElementById('networkText').textContent = networkPresence.text;
            
            // Check MAC format
            const formatCheck = formatMACCheck(formattedMAC);
            document.getElementById('formatIcon').innerHTML = formatCheck.icon;
            document.getElementById('formatText').textContent = formatCheck.text;
            document.getElementById('formatDetails').textContent = formatCheck.details;
            
            // Check for suspicious patterns
            const suspiciousCheck = checkSuspicious(oui);
            document.getElementById('suspiciousIcon').innerHTML = suspiciousCheck.icon;
            document.getElementById('suspiciousText').textContent = suspiciousCheck.text;
            document.getElementById('suspiciousDetails').textContent = suspiciousCheck.details;
            
            // Check repeating patterns
            const patternCheck = checkPatterns(oui);
            document.getElementById('patternIcon').innerHTML = patternCheck.icon;
            document.getElementById('patternText').textContent = patternCheck.text;
            document.getElementById('patternDetails').textContent = patternCheck.details;
            
            // Final verdict
            const isClean = isCommonVendor && !suspiciousCheck.isSuspicious && !patternCheck.isSuspicious;
            const verdict = isClean ? 
                { text: '✅ Device appears legitimate', 
                  details: 'MAC address matches known manufacturer with no suspicious patterns',
                  class: 'bg-green-100 text-green-800 clean' } :
                { text: '⚠️ Device needs further inspection', 
                  details: 'Some aspects of this MAC address require additional verification',
                  class: 'bg-yellow-100 text-yellow-800 suspicious' };
            
            if (suspiciousCheck.isSuspicious || patternCheck.isSuspicious) {
                verdict.text = '❌ Potentially suspicious MAC';
                verdict.details = 'This MAC address shows signs of possible spoofing or randomization';
                verdict.class = 'bg-red-100 text-red-800 suspicious';
            }
            
            document.getElementById('finalVerdict').className = verdict.class;
            document.getElementById('finalVerdict').textContent = verdict.text.split(' ')[0];
            document.getElementById('judgementText').textContent = verdict.text;
            document.getElementById('judgementDetails').textContent = verdict.details;
            document.getElementById('finalJudgement').className = `p-6 border-t border-gray-200 text-center ${verdict.class.includes('suspicious') ? 'suspicious' : 'clean'}`;
            
            // Scroll to results
            document.getElementById('resultsSection').scrollIntoView({ behavior: 'smooth' });
        }
        
        function formatMAC(mac) {
            // Remove all non-alphanumeric characters and uppercase
            const cleanMAC = mac.replace(/[^a-fA-F0-9]/g, '').toUpperCase();
            
            // Format as XX:XX:XX:XX:XX:XX
            return cleanMAC.replace(/(.{2})(?=.)/g, '$1:');
        }
        
        function getOUI(mac) {
            return mac.replace(/:/g, '').substring(0, 6);
        }
        
        function lookupVendor(oui) {
            // Simulated vendor database for demo
            const vendors = {
                'D6A67E': 'Foxconn International, Inc.',
                '001122': 'Test Vendor (Suspicious)',
                'AABBCC': 'Randomized Address',
                'DEADBE': 'Suspicious Pattern',
                'BEEF01': 'Suspicious Pattern',
                'C0FFEE': 'Suspicious Pattern',
                '123456': 'Test Manufacturer',
                'ABCDEF': 'Demo Vendor'
            };
            
            return vendors[oui] || 'Unknown Manufacturer';
        }
        
        function formatMACCheck(mac) {
            const isValid = /^([0-9A-F]{2}:){5}[0-9A-F]{2}$/.test(mac);
            return {
                icon: isValid ? '<i class="fas fa-check-circle text-green-500"></i>' : '<i class="fas fa-times-circle text-red-500"></i>',
                text: isValid ? 'Valid MAC format' : 'Invalid MAC format',
                details: isValid ? 'Address follows standard MAC address formatting' : 'Address has formatting issues'
            };
        }
        
        function checkSuspicious(oui) {
            const suspiciousOuis = ['000000', 'FFFFFF', '123456', 'DEADBE', 'BEEF01', 'C0FFEE'];
            const isSuspicious = suspiciousOuis.includes(oui);
            
            return {
                icon: isSuspicious ? '<i class="fas fa-exclamation-triangle text-red-500"></i>' : '<i class="fas fa-check-circle text-green-500"></i>',
                text: isSuspicious ? 'Suspicious OUI detected' : 'No suspicious OUI patterns',
                details: isSuspicious ? 'This OUI is commonly used in testing or spoofing' : 'OUI appears normal',
                isSuspicious: isSuspicious
            };
        }
        
        function checkPatterns(oui) {
            // Check for repeating patterns (e.g., A1A1A1) or sequential (e.g., 123456)
            const isRepeating = /^(.)\1{5}$/.test(oui);
            const isSequential = oui === '123456' || oui === 'ABCDEF';
            const isSuspicious = isRepeating || isSequential;
            
            let details = 'No suspicious patterns detected';
            if (isRepeating) details = 'Repeating character pattern (common in spoofed addresses)';
            if (isSequential) details = 'Sequential pattern (common in testing or spoofed addresses)';
            
            return {
                icon: isSuspicious ? '<i class="fas fa-exclamation-triangle text-red-500"></i>' : '<i class="fas fa-check-circle text-green-500"></i>',
                text: isSuspicious ? 'Suspicious pattern detected' : 'No suspicious patterns',
                details: details,
                isSuspicious: isSuspicious
            };
        }
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Rayan545454/r3aaaa" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>