Add 3 files
Browse files- README.md +7 -5
- index.html +766 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: bigwhale2
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,766 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Fraud System Dashboard</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.gradient-bg {
|
| 11 |
+
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
|
| 12 |
+
}
|
| 13 |
+
.card-shadow {
|
| 14 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 15 |
+
}
|
| 16 |
+
.sidebar {
|
| 17 |
+
transition: all 0.3s ease;
|
| 18 |
+
}
|
| 19 |
+
.sidebar.collapsed {
|
| 20 |
+
width: 80px;
|
| 21 |
+
}
|
| 22 |
+
.sidebar.collapsed .sidebar-text {
|
| 23 |
+
display: none;
|
| 24 |
+
}
|
| 25 |
+
.sidebar.collapsed .logo-text {
|
| 26 |
+
display: none;
|
| 27 |
+
}
|
| 28 |
+
.sidebar.collapsed .expand-icon {
|
| 29 |
+
transform: rotate(180deg);
|
| 30 |
+
}
|
| 31 |
+
.card-number {
|
| 32 |
+
font-family: 'Courier New', monospace;
|
| 33 |
+
letter-spacing: 2px;
|
| 34 |
+
}
|
| 35 |
+
.status-badge {
|
| 36 |
+
font-size: 0.75rem;
|
| 37 |
+
padding: 0.25rem 0.5rem;
|
| 38 |
+
border-radius: 9999px;
|
| 39 |
+
}
|
| 40 |
+
.live {
|
| 41 |
+
background-color: #10b981;
|
| 42 |
+
color: white;
|
| 43 |
+
}
|
| 44 |
+
.dead {
|
| 45 |
+
background-color: #ef4444;
|
| 46 |
+
color: white;
|
| 47 |
+
}
|
| 48 |
+
.flagged {
|
| 49 |
+
background-color: #f59e0b;
|
| 50 |
+
color: white;
|
| 51 |
+
}
|
| 52 |
+
.tab-content {
|
| 53 |
+
display: none;
|
| 54 |
+
}
|
| 55 |
+
.tab-content.active {
|
| 56 |
+
display: block;
|
| 57 |
+
animation: fadeIn 0.3s ease;
|
| 58 |
+
}
|
| 59 |
+
@keyframes fadeIn {
|
| 60 |
+
from { opacity: 0; }
|
| 61 |
+
to { opacity: 1; }
|
| 62 |
+
}
|
| 63 |
+
.tooltip {
|
| 64 |
+
position: relative;
|
| 65 |
+
}
|
| 66 |
+
.tooltip-text {
|
| 67 |
+
visibility: hidden;
|
| 68 |
+
width: 120px;
|
| 69 |
+
background-color: #333;
|
| 70 |
+
color: #fff;
|
| 71 |
+
text-align: center;
|
| 72 |
+
border-radius: 6px;
|
| 73 |
+
padding: 5px;
|
| 74 |
+
position: absolute;
|
| 75 |
+
z-index: 1;
|
| 76 |
+
bottom: 125%;
|
| 77 |
+
left: 50%;
|
| 78 |
+
margin-left: -60px;
|
| 79 |
+
opacity: 0;
|
| 80 |
+
transition: opacity 0.3s;
|
| 81 |
+
}
|
| 82 |
+
.tooltip:hover .tooltip-text {
|
| 83 |
+
visibility: visible;
|
| 84 |
+
opacity: 1;
|
| 85 |
+
}
|
| 86 |
+
</style>
|
| 87 |
+
</head>
|
| 88 |
+
<body class="bg-gray-100 font-sans">
|
| 89 |
+
<div class="flex h-screen overflow-hidden">
|
| 90 |
+
<!-- Sidebar -->
|
| 91 |
+
<div id="sidebar" class="sidebar gradient-bg text-white w-64 flex flex-col">
|
| 92 |
+
<div class="p-4 flex items-center justify-between border-b border-blue-700">
|
| 93 |
+
<div class="flex items-center">
|
| 94 |
+
<i class="fas fa-shield-alt text-2xl mr-3"></i>
|
| 95 |
+
<span class="logo-text text-xl font-bold">FraudShield</span>
|
| 96 |
+
</div>
|
| 97 |
+
<button id="toggle-sidebar" class="text-white hover:text-blue-200 focus:outline-none">
|
| 98 |
+
<i class="fas fa-chevron-left expand-icon"></i>
|
| 99 |
+
</button>
|
| 100 |
+
</div>
|
| 101 |
+
<div class="flex-1 overflow-y-auto">
|
| 102 |
+
<nav class="p-4">
|
| 103 |
+
<div class="mb-8">
|
| 104 |
+
<div class="text-xs uppercase font-semibold text-blue-300 mb-2 sidebar-text">Main</div>
|
| 105 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg bg-blue-800 text-white mb-1">
|
| 106 |
+
<i class="fas fa-tachometer-alt mr-3"></i>
|
| 107 |
+
<span class="sidebar-text">Dashboard</span>
|
| 108 |
+
</a>
|
| 109 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg hover:bg-blue-800 text-blue-100 mb-1">
|
| 110 |
+
<i class="fas fa-credit-card mr-3"></i>
|
| 111 |
+
<span class="sidebar-text">Card Generator</span>
|
| 112 |
+
</a>
|
| 113 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg hover:bg-blue-800 text-blue-100 mb-1">
|
| 114 |
+
<i class="fas fa-search-dollar mr-3"></i>
|
| 115 |
+
<span class="sidebar-text">Card Validator</span>
|
| 116 |
+
</a>
|
| 117 |
+
</div>
|
| 118 |
+
<div class="mb-8">
|
| 119 |
+
<div class="text-xs uppercase font-semibold text-blue-300 mb-2 sidebar-text">Transactions</div>
|
| 120 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg hover:bg-blue-800 text-blue-100 mb-1">
|
| 121 |
+
<i class="fas fa-exchange-alt mr-3"></i>
|
| 122 |
+
<span class="sidebar-text">History</span>
|
| 123 |
+
</a>
|
| 124 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg hover:bg-blue-800 text-blue-100 mb-1">
|
| 125 |
+
<i class="fas fa-coins mr-3"></i>
|
| 126 |
+
<span class="sidebar-text">Buy Credits</span>
|
| 127 |
+
</a>
|
| 128 |
+
</div>
|
| 129 |
+
<div>
|
| 130 |
+
<div class="text-xs uppercase font-semibold text-blue-300 mb-2 sidebar-text">Settings</div>
|
| 131 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg hover:bg-blue-800 text-blue-100 mb-1">
|
| 132 |
+
<i class="fas fa-user-cog mr-3"></i>
|
| 133 |
+
<span class="sidebar-text">Profile</span>
|
| 134 |
+
</a>
|
| 135 |
+
<a href="#" class="flex items-center py-2 px-3 rounded-lg hover:bg-blue-800 text-blue-100 mb-1">
|
| 136 |
+
<i class="fas fa-cog mr-3"></i>
|
| 137 |
+
<span class="sidebar-text">Settings</span>
|
| 138 |
+
</a>
|
| 139 |
+
</div>
|
| 140 |
+
</nav>
|
| 141 |
+
</div>
|
| 142 |
+
<div class="p-4 border-t border-blue-700">
|
| 143 |
+
<div class="flex items-center">
|
| 144 |
+
<img src="https://ui-avatars.com/api/?name=Admin+User&background=1e40af&color=fff" alt="User" class="w-10 h-10 rounded-full">
|
| 145 |
+
<div class="ml-3 sidebar-text">
|
| 146 |
+
<div class="font-medium">Admin User</div>
|
| 147 |
+
<div class="text-xs text-blue-300">admin@example.com</div>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<!-- Main Content -->
|
| 154 |
+
<div class="flex-1 overflow-auto">
|
| 155 |
+
<!-- Top Navigation -->
|
| 156 |
+
<header class="bg-white shadow-sm">
|
| 157 |
+
<div class="flex items-center justify-between px-6 py-4">
|
| 158 |
+
<h1 class="text-2xl font-bold text-gray-800">Dashboard</h1>
|
| 159 |
+
<div class="flex items-center space-x-4">
|
| 160 |
+
<div class="relative">
|
| 161 |
+
<button class="p-2 rounded-full hover:bg-gray-100 focus:outline-none">
|
| 162 |
+
<i class="fas fa-bell text-gray-600"></i>
|
| 163 |
+
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
|
| 164 |
+
</button>
|
| 165 |
+
</div>
|
| 166 |
+
<div class="relative">
|
| 167 |
+
<button class="p-2 rounded-full hover:bg-gray-100 focus:outline-none">
|
| 168 |
+
<i class="fas fa-envelope text-gray-600"></i>
|
| 169 |
+
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-blue-500"></span>
|
| 170 |
+
</button>
|
| 171 |
+
</div>
|
| 172 |
+
<div class="border-l border-gray-200 h-8"></div>
|
| 173 |
+
<button class="flex items-center space-x-2 focus:outline-none">
|
| 174 |
+
<span class="text-gray-700 font-medium">Admin</span>
|
| 175 |
+
<i class="fas fa-chevron-down text-gray-500"></i>
|
| 176 |
+
</button>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
</header>
|
| 180 |
+
|
| 181 |
+
<!-- Dashboard Content -->
|
| 182 |
+
<main class="p-6">
|
| 183 |
+
<!-- Stats Cards -->
|
| 184 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
|
| 185 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 186 |
+
<div class="flex items-center justify-between">
|
| 187 |
+
<div>
|
| 188 |
+
<p class="text-gray-500">Available Credits</p>
|
| 189 |
+
<h3 class="text-2xl font-bold text-gray-800">1,024</h3>
|
| 190 |
+
</div>
|
| 191 |
+
<div class="p-3 rounded-full bg-blue-100 text-blue-600">
|
| 192 |
+
<i class="fas fa-coins text-xl"></i>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
<div class="mt-4">
|
| 196 |
+
<div class="flex items-center text-sm text-green-500">
|
| 197 |
+
<i class="fas fa-arrow-up mr-1"></i>
|
| 198 |
+
<span>12% from last month</span>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 203 |
+
<div class="flex items-center justify-between">
|
| 204 |
+
<div>
|
| 205 |
+
<p class="text-gray-500">Generated Cards</p>
|
| 206 |
+
<h3 class="text-2xl font-bold text-gray-800">342</h3>
|
| 207 |
+
</div>
|
| 208 |
+
<div class="p-3 rounded-full bg-green-100 text-green-600">
|
| 209 |
+
<i class="fas fa-credit-card text-xl"></i>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
<div class="mt-4">
|
| 213 |
+
<div class="flex items-center text-sm text-red-500">
|
| 214 |
+
<i class="fas fa-arrow-down mr-1"></i>
|
| 215 |
+
<span>5% from last month</span>
|
| 216 |
+
</div>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 220 |
+
<div class="flex items-center justify-between">
|
| 221 |
+
<div>
|
| 222 |
+
<p class="text-gray-500">Valid Cards</p>
|
| 223 |
+
<h3 class="text-2xl font-bold text-gray-800">287</h3>
|
| 224 |
+
</div>
|
| 225 |
+
<div class="p-3 rounded-full bg-purple-100 text-purple-600">
|
| 226 |
+
<i class="fas fa-check-circle text-xl"></i>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="mt-4">
|
| 230 |
+
<div class="flex items-center text-sm text-green-500">
|
| 231 |
+
<i class="fas fa-arrow-up mr-1"></i>
|
| 232 |
+
<span>8% from last month</span>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
<div class="bg-white rounded-lg shadow p-6">
|
| 237 |
+
<div class="flex items-center justify-between">
|
| 238 |
+
<div>
|
| 239 |
+
<p class="text-gray-500">Fraud Attempts</p>
|
| 240 |
+
<h3 class="text-2xl font-bold text-gray-800">42</h3>
|
| 241 |
+
</div>
|
| 242 |
+
<div class="p-3 rounded-full bg-red-100 text-red-600">
|
| 243 |
+
<i class="fas fa-shield-alt text-xl"></i>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
<div class="mt-4">
|
| 247 |
+
<div class="flex items-center text-sm text-green-500">
|
| 248 |
+
<i class="fas fa-arrow-down mr-1"></i>
|
| 249 |
+
<span>15% from last month</span>
|
| 250 |
+
</div>
|
| 251 |
+
</div>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
<!-- Recent Cards and Activity -->
|
| 256 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
|
| 257 |
+
<!-- Recent Cards -->
|
| 258 |
+
<div class="lg:col-span-2 bg-white rounded-lg shadow overflow-hidden">
|
| 259 |
+
<div class="p-6 border-b border-gray-200">
|
| 260 |
+
<div class="flex items-center justify-between">
|
| 261 |
+
<h2 class="text-lg font-semibold text-gray-800">Recent Generated Cards</h2>
|
| 262 |
+
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">View All</button>
|
| 263 |
+
</div>
|
| 264 |
+
</div>
|
| 265 |
+
<div class="overflow-x-auto">
|
| 266 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 267 |
+
<thead class="bg-gray-50">
|
| 268 |
+
<tr>
|
| 269 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Card Number</th>
|
| 270 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
| 271 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Expiry</th>
|
| 272 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
|
| 273 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
|
| 274 |
+
</tr>
|
| 275 |
+
</thead>
|
| 276 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
| 277 |
+
<tr>
|
| 278 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 279 |
+
<div class="card-number">•••• •••• •••• 4532</div>
|
| 280 |
+
</td>
|
| 281 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 282 |
+
<div class="flex items-center">
|
| 283 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Visa_Inc._logo.svg/2560px-Visa_Inc._logo.svg.png" alt="Visa" class="h-6">
|
| 284 |
+
</div>
|
| 285 |
+
</td>
|
| 286 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">05/25</td>
|
| 287 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 288 |
+
<span class="status-badge live">Live</span>
|
| 289 |
+
</td>
|
| 290 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
| 291 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3 tooltip">
|
| 292 |
+
<i class="fas fa-copy"></i>
|
| 293 |
+
<span class="tooltip-text">Copy Details</span>
|
| 294 |
+
</button>
|
| 295 |
+
<button class="text-green-600 hover:text-green-900 tooltip">
|
| 296 |
+
<i class="fas fa-check-circle"></i>
|
| 297 |
+
<span class="tooltip-text">Validate</span>
|
| 298 |
+
</button>
|
| 299 |
+
</td>
|
| 300 |
+
</tr>
|
| 301 |
+
<tr>
|
| 302 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 303 |
+
<div class="card-number">•••• •••• •••• 9821</div>
|
| 304 |
+
</td>
|
| 305 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 306 |
+
<div class="flex items-center">
|
| 307 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Mastercard-logo.svg/1280px-Mastercard-logo.svg.png" alt="Mastercard" class="h-6">
|
| 308 |
+
</div>
|
| 309 |
+
</td>
|
| 310 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">11/24</td>
|
| 311 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 312 |
+
<span class="status-badge flagged">Flagged</span>
|
| 313 |
+
</td>
|
| 314 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
| 315 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3 tooltip">
|
| 316 |
+
<i class="fas fa-copy"></i>
|
| 317 |
+
<span class="tooltip-text">Copy Details</span>
|
| 318 |
+
</button>
|
| 319 |
+
<button class="text-green-600 hover:text-green-900 tooltip">
|
| 320 |
+
<i class="fas fa-check-circle"></i>
|
| 321 |
+
<span class="tooltip-text">Validate</span>
|
| 322 |
+
</button>
|
| 323 |
+
</td>
|
| 324 |
+
</tr>
|
| 325 |
+
<tr>
|
| 326 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 327 |
+
<div class="card-number">•••• •••• •••• 3712</div>
|
| 328 |
+
</td>
|
| 329 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 330 |
+
<div class="flex items-center">
|
| 331 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/American_Express_logo_2018.svg/1200px-American_Express_logo_2018.svg.png" alt="Amex" class="h-6">
|
| 332 |
+
</div>
|
| 333 |
+
</td>
|
| 334 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">08/23</td>
|
| 335 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 336 |
+
<span class="status-badge dead">Dead</span>
|
| 337 |
+
</td>
|
| 338 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
| 339 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3 tooltip">
|
| 340 |
+
<i class="fas fa-copy"></i>
|
| 341 |
+
<span class="tooltip-text">Copy Details</span>
|
| 342 |
+
</button>
|
| 343 |
+
<button class="text-green-600 hover:text-green-900 tooltip">
|
| 344 |
+
<i class="fas fa-check-circle"></i>
|
| 345 |
+
<span class="tooltip-text">Validate</span>
|
| 346 |
+
</button>
|
| 347 |
+
</td>
|
| 348 |
+
</tr>
|
| 349 |
+
<tr>
|
| 350 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 351 |
+
<div class="card-number">•••• •••• •••• 6011</div>
|
| 352 |
+
</td>
|
| 353 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 354 |
+
<div class="flex items-center">
|
| 355 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Discover_Card_logo.svg/1200px-Discover_Card_logo.svg.png" alt="Discover" class="h-6">
|
| 356 |
+
</div>
|
| 357 |
+
</td>
|
| 358 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">03/26</td>
|
| 359 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 360 |
+
<span class="status-badge live">Live</span>
|
| 361 |
+
</td>
|
| 362 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
| 363 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3 tooltip">
|
| 364 |
+
<i class="fas fa-copy"></i>
|
| 365 |
+
<span class="tooltip-text">Copy Details</span>
|
| 366 |
+
</button>
|
| 367 |
+
<button class="text-green-600 hover:text-green-900 tooltip">
|
| 368 |
+
<i class="fas fa-check-circle"></i>
|
| 369 |
+
<span class="tooltip-text">Validate</span>
|
| 370 |
+
</button>
|
| 371 |
+
</td>
|
| 372 |
+
</tr>
|
| 373 |
+
</tbody>
|
| 374 |
+
</table>
|
| 375 |
+
</div>
|
| 376 |
+
</div>
|
| 377 |
+
|
| 378 |
+
<!-- Recent Activity -->
|
| 379 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 380 |
+
<div class="p-6 border-b border-gray-200">
|
| 381 |
+
<h2 class="text-lg font-semibold text-gray-800">Recent Activity</h2>
|
| 382 |
+
</div>
|
| 383 |
+
<div class="p-6">
|
| 384 |
+
<div class="space-y-4">
|
| 385 |
+
<div class="flex">
|
| 386 |
+
<div class="flex-shrink-0">
|
| 387 |
+
<div class="h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
|
| 388 |
+
<i class="fas fa-credit-card"></i>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
<div class="ml-4">
|
| 392 |
+
<div class="text-sm font-medium text-gray-900">New card generated</div>
|
| 393 |
+
<div class="text-sm text-gray-500">Visa •••• 4532</div>
|
| 394 |
+
<div class="mt-1 text-xs text-gray-500">2 minutes ago</div>
|
| 395 |
+
</div>
|
| 396 |
+
</div>
|
| 397 |
+
<div class="flex">
|
| 398 |
+
<div class="flex-shrink-0">
|
| 399 |
+
<div class="h-10 w-10 rounded-full bg-green-100 flex items-center justify-center text-green-600">
|
| 400 |
+
<i class="fas fa-check-circle"></i>
|
| 401 |
+
</div>
|
| 402 |
+
</div>
|
| 403 |
+
<div class="ml-4">
|
| 404 |
+
<div class="text-sm font-medium text-gray-900">Card validated</div>
|
| 405 |
+
<div class="text-sm text-gray-500">Mastercard •••• 9821</div>
|
| 406 |
+
<div class="mt-1 text-xs text-gray-500">15 minutes ago</div>
|
| 407 |
+
</div>
|
| 408 |
+
</div>
|
| 409 |
+
<div class="flex">
|
| 410 |
+
<div class="flex-shrink-0">
|
| 411 |
+
<div class="h-10 w-10 rounded-full bg-purple-100 flex items-center justify-center text-purple-600">
|
| 412 |
+
<i class="fas fa-coins"></i>
|
| 413 |
+
</div>
|
| 414 |
+
</div>
|
| 415 |
+
<div class="ml-4">
|
| 416 |
+
<div class="text-sm font-medium text-gray-900">Credits purchased</div>
|
| 417 |
+
<div class="text-sm text-gray-500">+100 credits</div>
|
| 418 |
+
<div class="mt-1 text-xs text-gray-500">1 hour ago</div>
|
| 419 |
+
</div>
|
| 420 |
+
</div>
|
| 421 |
+
<div class="flex">
|
| 422 |
+
<div class="flex-shrink-0">
|
| 423 |
+
<div class="h-10 w-10 rounded-full bg-red-100 flex items-center justify-center text-red-600">
|
| 424 |
+
<i class="fas fa-shield-alt"></i>
|
| 425 |
+
</div>
|
| 426 |
+
</div>
|
| 427 |
+
<div class="ml-4">
|
| 428 |
+
<div class="text-sm font-medium text-gray-900">Fraud attempt blocked</div>
|
| 429 |
+
<div class="text-sm text-gray-500">IP: 192.168.1.45</div>
|
| 430 |
+
<div class="mt-1 text-xs text-gray-500">3 hours ago</div>
|
| 431 |
+
</div>
|
| 432 |
+
</div>
|
| 433 |
+
<div class="flex">
|
| 434 |
+
<div class="flex-shrink-0">
|
| 435 |
+
<div class="h-10 w-10 rounded-full bg-yellow-100 flex items-center justify-center text-yellow-600">
|
| 436 |
+
<i class="fas fa-exclamation-triangle"></i>
|
| 437 |
+
</div>
|
| 438 |
+
</div>
|
| 439 |
+
<div class="ml-4">
|
| 440 |
+
<div class="text-sm font-medium text-gray-900">Card flagged</div>
|
| 441 |
+
<div class="text-sm text-gray-500">Amex •••• 3712</div>
|
| 442 |
+
<div class="mt-1 text-xs text-gray-500">5 hours ago</div>
|
| 443 |
+
</div>
|
| 444 |
+
</div>
|
| 445 |
+
</div>
|
| 446 |
+
<div class="mt-6">
|
| 447 |
+
<button class="w-full py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
|
| 448 |
+
View All Activity
|
| 449 |
+
</button>
|
| 450 |
+
</div>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
</div>
|
| 454 |
+
|
| 455 |
+
<!-- Card Generator and Validator -->
|
| 456 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
|
| 457 |
+
<!-- Card Generator -->
|
| 458 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 459 |
+
<div class="p-6 border-b border-gray-200">
|
| 460 |
+
<h2 class="text-lg font-semibold text-gray-800">Generate New Card</h2>
|
| 461 |
+
</div>
|
| 462 |
+
<div class="p-6">
|
| 463 |
+
<div class="mb-4">
|
| 464 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Card Type</label>
|
| 465 |
+
<div class="grid grid-cols-4 gap-2">
|
| 466 |
+
<button class="py-2 px-3 border rounded-md text-sm font-medium bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 467 |
+
Visa
|
| 468 |
+
</button>
|
| 469 |
+
<button class="py-2 px-3 border rounded-md text-sm font-medium bg-red-50 text-red-700 border-red-200 hover:bg-red-100 focus:outline-none focus:ring-2 focus:ring-red-500">
|
| 470 |
+
Mastercard
|
| 471 |
+
</button>
|
| 472 |
+
<button class="py-2 px-3 border rounded-md text-sm font-medium bg-green-50 text-green-700 border-green-200 hover:bg-green-100 focus:outline-none focus:ring-2 focus:ring-green-500">
|
| 473 |
+
Amex
|
| 474 |
+
</button>
|
| 475 |
+
<button class="py-2 px-3 border rounded-md text-sm font-medium bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100 focus:outline-none focus:ring-2 focus:ring-purple-500">
|
| 476 |
+
Discover
|
| 477 |
+
</button>
|
| 478 |
+
</div>
|
| 479 |
+
</div>
|
| 480 |
+
<div class="mb-4">
|
| 481 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Country</label>
|
| 482 |
+
<select class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
|
| 483 |
+
<option>United States</option>
|
| 484 |
+
<option>United Kingdom</option>
|
| 485 |
+
<option>Canada</option>
|
| 486 |
+
<option>Australia</option>
|
| 487 |
+
<option>Germany</option>
|
| 488 |
+
</select>
|
| 489 |
+
</div>
|
| 490 |
+
<div class="mb-4">
|
| 491 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Bank</label>
|
| 492 |
+
<select class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
|
| 493 |
+
<option>Chase</option>
|
| 494 |
+
<option>Bank of America</option>
|
| 495 |
+
<option>Wells Fargo</option>
|
| 496 |
+
<option>Citibank</option>
|
| 497 |
+
<option>Capital One</option>
|
| 498 |
+
</select>
|
| 499 |
+
</div>
|
| 500 |
+
<div class="flex justify-between items-center">
|
| 501 |
+
<div class="text-sm text-gray-500">
|
| 502 |
+
Cost: <span class="font-medium text-gray-700">1 credit</span>
|
| 503 |
+
</div>
|
| 504 |
+
<button class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
|
| 505 |
+
Generate Card
|
| 506 |
+
</button>
|
| 507 |
+
</div>
|
| 508 |
+
</div>
|
| 509 |
+
</div>
|
| 510 |
+
|
| 511 |
+
<!-- Card Validator -->
|
| 512 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 513 |
+
<div class="p-6 border-b border-gray-200">
|
| 514 |
+
<h2 class="text-lg font-semibold text-gray-800">Validate Card</h2>
|
| 515 |
+
</div>
|
| 516 |
+
<div class="p-6">
|
| 517 |
+
<div class="mb-4">
|
| 518 |
+
<label for="card-number" class="block text-sm font-medium text-gray-700 mb-1">Card Number</label>
|
| 519 |
+
<input type="text" id="card-number" class="focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md p-2 border" placeholder="•••• •••• •••• ••••">
|
| 520 |
+
</div>
|
| 521 |
+
<div class="grid grid-cols-2 gap-4 mb-4">
|
| 522 |
+
<div>
|
| 523 |
+
<label for="expiry" class="block text-sm font-medium text-gray-700 mb-1">Expiry Date</label>
|
| 524 |
+
<input type="text" id="expiry" class="focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md p-2 border" placeholder="MM/YY">
|
| 525 |
+
</div>
|
| 526 |
+
<div>
|
| 527 |
+
<label for="cvv" class="block text-sm font-medium text-gray-700 mb-1">CVV</label>
|
| 528 |
+
<input type="text" id="cvv" class="focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md p-2 border" placeholder="•••">
|
| 529 |
+
</div>
|
| 530 |
+
</div>
|
| 531 |
+
<div class="mb-4">
|
| 532 |
+
<label for="card-name" class="block text-sm font-medium text-gray-700 mb-1">Cardholder Name</label>
|
| 533 |
+
<input type="text" id="card-name" class="focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md p-2 border" placeholder="John Doe">
|
| 534 |
+
</div>
|
| 535 |
+
<button class="w-full inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
|
| 536 |
+
Validate Card
|
| 537 |
+
</button>
|
| 538 |
+
</div>
|
| 539 |
+
</div>
|
| 540 |
+
</div>
|
| 541 |
+
|
| 542 |
+
<!-- Fraud Analytics -->
|
| 543 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 544 |
+
<div class="p-6 border-b border-gray-200">
|
| 545 |
+
<h2 class="text-lg font-semibold text-gray-800">Fraud Analytics</h2>
|
| 546 |
+
</div>
|
| 547 |
+
<div class="p-6">
|
| 548 |
+
<div class="flex border-b border-gray-200">
|
| 549 |
+
<button class="tab-button py-4 px-6 border-b-2 font-medium text-sm border-blue-500 text-blue-600" data-tab="overview">
|
| 550 |
+
Overview
|
| 551 |
+
</button>
|
| 552 |
+
<button class="tab-button py-4 px-6 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" data-tab="attempts">
|
| 553 |
+
Attempts
|
| 554 |
+
</button>
|
| 555 |
+
<button class="tab-button py-4 px-6 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" data-tab="patterns">
|
| 556 |
+
Patterns
|
| 557 |
+
</button>
|
| 558 |
+
</div>
|
| 559 |
+
<div id="overview" class="tab-content active p-6">
|
| 560 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
| 561 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 562 |
+
<div class="text-sm font-medium text-gray-500 mb-2">Total Fraud Attempts</div>
|
| 563 |
+
<div class="text-2xl font-bold text-gray-800">1,245</div>
|
| 564 |
+
<div class="mt-2">
|
| 565 |
+
<span class="text-sm text-red-500">
|
| 566 |
+
<i class="fas fa-arrow-up"></i> 12% from last month
|
| 567 |
+
</span>
|
| 568 |
+
</div>
|
| 569 |
+
</div>
|
| 570 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 571 |
+
<div class="text-sm font-medium text-gray-500 mb-2">Blocked Attempts</div>
|
| 572 |
+
<div class="text-2xl font-bold text-gray-800">1,198</div>
|
| 573 |
+
<div class="mt-2">
|
| 574 |
+
<span class="text-sm text-green-500">
|
| 575 |
+
<i class="fas fa-arrow-up"></i> 8% from last month
|
| 576 |
+
</span>
|
| 577 |
+
</div>
|
| 578 |
+
</div>
|
| 579 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 580 |
+
<div class="text-sm font-medium text-gray-500 mb-2">Success Rate</div>
|
| 581 |
+
<div class="text-2xl font-bold text-gray-800">96.2%</div>
|
| 582 |
+
<div class="mt-2">
|
| 583 |
+
<span class="text-sm text-green-500">
|
| 584 |
+
<i class="fas fa-arrow-up"></i> 2% from last month
|
| 585 |
+
</span>
|
| 586 |
+
</div>
|
| 587 |
+
</div>
|
| 588 |
+
</div>
|
| 589 |
+
<div class="mt-6">
|
| 590 |
+
<div class="h-64 bg-gray-50 rounded-lg flex items-center justify-center">
|
| 591 |
+
<div class="text-center">
|
| 592 |
+
<i class="fas fa-chart-line text-4xl text-gray-400 mb-2"></i>
|
| 593 |
+
<p class="text-gray-500">Fraud attempts chart will be displayed here</p>
|
| 594 |
+
</div>
|
| 595 |
+
</div>
|
| 596 |
+
</div>
|
| 597 |
+
</div>
|
| 598 |
+
<div id="attempts" class="tab-content p-6">
|
| 599 |
+
<div class="overflow-x-auto">
|
| 600 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 601 |
+
<thead class="bg-gray-50">
|
| 602 |
+
<tr>
|
| 603 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
|
| 604 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">IP Address</th>
|
| 605 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
|
| 606 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
|
| 607 |
+
</tr>
|
| 608 |
+
</thead>
|
| 609 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
| 610 |
+
<tr>
|
| 611 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-15 14:32</td>
|
| 612 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">192.168.1.45</td>
|
| 613 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Card validation attempt</td>
|
| 614 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 615 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
|
| 616 |
+
Blocked
|
| 617 |
+
</span>
|
| 618 |
+
</td>
|
| 619 |
+
</tr>
|
| 620 |
+
<tr>
|
| 621 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-15 12:18</td>
|
| 622 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">45.33.112.89</td>
|
| 623 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Multiple login attempts</td>
|
| 624 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 625 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
|
| 626 |
+
Blocked
|
| 627 |
+
</span>
|
| 628 |
+
</td>
|
| 629 |
+
</tr>
|
| 630 |
+
<tr>
|
| 631 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-14 09:45</td>
|
| 632 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">76.135.204.12</td>
|
| 633 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Proxy detected</td>
|
| 634 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 635 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">
|
| 636 |
+
Flagged
|
| 637 |
+
</span>
|
| 638 |
+
</td>
|
| 639 |
+
</tr>
|
| 640 |
+
<tr>
|
| 641 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-13 18:22</td>
|
| 642 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">104.244.75.33</td>
|
| 643 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Suspicious registration</td>
|
| 644 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 645 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
|
| 646 |
+
Blocked
|
| 647 |
+
</span>
|
| 648 |
+
</td>
|
| 649 |
+
</tr>
|
| 650 |
+
</tbody>
|
| 651 |
+
</table>
|
| 652 |
+
</div>
|
| 653 |
+
</div>
|
| 654 |
+
<div id="patterns" class="tab-content p-6">
|
| 655 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 656 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 657 |
+
<div class="text-sm font-medium text-gray-700 mb-2">Common Attack Vectors</div>
|
| 658 |
+
<div class="space-y-3">
|
| 659 |
+
<div>
|
| 660 |
+
<div class="flex justify-between text-sm mb-1">
|
| 661 |
+
<span>Proxy/VPN Usage</span>
|
| 662 |
+
<span>42%</span>
|
| 663 |
+
</div>
|
| 664 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 665 |
+
<div class="bg-red-500 h-2 rounded-full" style="width: 42%"></div>
|
| 666 |
+
</div>
|
| 667 |
+
</div>
|
| 668 |
+
<div>
|
| 669 |
+
<div class="flex justify-between text-sm mb-1">
|
| 670 |
+
<span>Brute Force</span>
|
| 671 |
+
<span>28%</span>
|
| 672 |
+
</div>
|
| 673 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 674 |
+
<div class="bg-yellow-500 h-2 rounded-full" style="width: 28%"></div>
|
| 675 |
+
</div>
|
| 676 |
+
</div>
|
| 677 |
+
<div>
|
| 678 |
+
<div class="flex justify-between text-sm mb-1">
|
| 679 |
+
<span>Card Testing</span>
|
| 680 |
+
<span>18%</span>
|
| 681 |
+
</div>
|
| 682 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 683 |
+
<div class="bg-blue-500 h-2 rounded-full" style="width: 18%"></div>
|
| 684 |
+
</div>
|
| 685 |
+
</div>
|
| 686 |
+
<div>
|
| 687 |
+
<div class="flex justify-between text-sm mb-1">
|
| 688 |
+
<span>Account Takeover</span>
|
| 689 |
+
<span>12%</span>
|
| 690 |
+
</div>
|
| 691 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 692 |
+
<div class="bg-purple-500 h-2 rounded-full" style="width: 12%"></div>
|
| 693 |
+
</div>
|
| 694 |
+
</div>
|
| 695 |
+
</div>
|
| 696 |
+
</div>
|
| 697 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 698 |
+
<div class="text-sm font-medium text-gray-700 mb-2">Geographic Distribution</div>
|
| 699 |
+
<div class="h-48 flex items-center justify-center">
|
| 700 |
+
<div class="text-center">
|
| 701 |
+
<i class="fas fa-globe-americas text-4xl text-gray-400 mb-2"></i>
|
| 702 |
+
<p class="text-gray-500">Geographic heatmap will be displayed here</p>
|
| 703 |
+
</div>
|
| 704 |
+
</div>
|
| 705 |
+
</div>
|
| 706 |
+
</div>
|
| 707 |
+
</div>
|
| 708 |
+
</div>
|
| 709 |
+
</div>
|
| 710 |
+
</main>
|
| 711 |
+
</div>
|
| 712 |
+
</div>
|
| 713 |
+
|
| 714 |
+
<script>
|
| 715 |
+
// Toggle sidebar
|
| 716 |
+
document.getElementById('toggle-sidebar').addEventListener('click', function() {
|
| 717 |
+
document.getElementById('sidebar').classList.toggle('collapsed');
|
| 718 |
+
});
|
| 719 |
+
|
| 720 |
+
// Tab functionality
|
| 721 |
+
const tabButtons = document.querySelectorAll('.tab-button');
|
| 722 |
+
tabButtons.forEach(button => {
|
| 723 |
+
button.addEventListener('click', function() {
|
| 724 |
+
// Remove active class from all buttons and tabs
|
| 725 |
+
tabButtons.forEach(btn => {
|
| 726 |
+
btn.classList.remove('border-blue-500', 'text-blue-600');
|
| 727 |
+
btn.classList.add('border-transparent', 'text-gray-500');
|
| 728 |
+
});
|
| 729 |
+
|
| 730 |
+
// Add active class to clicked button
|
| 731 |
+
this.classList.remove('border-transparent', 'text-gray-500');
|
| 732 |
+
this.classList.add('border-blue-500', 'text-blue-600');
|
| 733 |
+
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
// Show the selected tab content
|
| 737 |
+
const tabId = this.getAttribute('data-tab');
|
| 738 |
+
document.getElementById(tabId).classList.add('active');
|
| 739 |
+
});
|
| 740 |
+
});
|
| 741 |
+
|
| 742 |
+
// Simulate card generation
|
| 743 |
+
document.querySelector('.bg-white.rounded-lg.shadow button.bg-blue-600').addEventListener('click', function() {
|
| 744 |
+
alert('Card generated successfully! Check the Recent Cards table.');
|
| 745 |
+
});
|
| 746 |
+
|
| 747 |
+
// Simulate card validation
|
| 748 |
+
document.querySelector('.bg-white.rounded-lg.shadow button.bg-green-600').addEventListener('click', function() {
|
| 749 |
+
alert('Card validation completed! Check the Recent Activity section.');
|
| 750 |
+
});
|
| 751 |
+
|
| 752 |
+
// Copy card details tooltip
|
| 753 |
+
const copyButtons = document.querySelectorAll('.fa-copy');
|
| 754 |
+
copyButtons.forEach(button => {
|
| 755 |
+
button.addEventListener('click', function() {
|
| 756 |
+
// In a real app, this would copy card details to clipboard
|
| 757 |
+
const tooltip = this.parentElement.querySelector('.tooltip-text');
|
| 758 |
+
tooltip.textContent = 'Copied!';
|
| 759 |
+
setTimeout(() => {
|
| 760 |
+
tooltip.textContent = 'Copy Details';
|
| 761 |
+
}, 2000);
|
| 762 |
+
});
|
| 763 |
+
});
|
| 764 |
+
</script>
|
| 765 |
+
<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=offerpk3/bigwhale2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 766 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
from flask import Flask, request, jsonify, session, render_template, redirect, url_for, flash import os import random import logging import time import requests from datetime import datetime, timedelta import uuid from functools import wraps from werkzeug.security import generate_password_hash, check_password_hash from flask_sqlalchemy import SQLAlchemy from flask_captcha import Captcha # Initialize Flask application app = Flask(__name__) app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'supersecretkey_' + str(uuid.uuid4())) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL', 'sqlite:///fraud_system.db') app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['CAPTCHA_ENABLE'] = True app.config['CAPTCHA_LENGTH'] = int(os.environ.get('CAPTCHA_LENGTH', 6)) # Initialize extensions db = SQLAlchemy(app) captcha = Captcha(app) # Configure logging logging.basicConfig(filename='fraud_activity.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # --- Database Models --- class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(80), unique=True, nullable=False) password_hash = db.Column(db.String(256), nullable=False) # Increased length for stronger hashes email = db.Column(db.String(120), unique=True, nullable=True) phone = db.Column(db.String(20), nullable=True) ip_address = db.Column(db.String(45)) # Store IPv4 and IPv6 fingerprint = db.Column(db.String(100)) credits = db.Column(db.Integer, default=10) # Start with some credits is_admin = db.Column(db.Boolean, default=False) last_login = db.Column(db.DateTime) registered_at = db.Column(db.DateTime, default=datetime.utcnow) def __repr__(self): return f'<User {self.username}>' class Card(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) card_number = db.Column(db.String(19), unique=True, nullable=False) # Allow spaces/dashes expiration = db.Column(db.String(7), nullable=False) # MM/YYYY cvv = db.Column(db.String(4)) # Amex has 4 digits name = db.Column(db.String(100)) address = db.Column(db.String(200)) city = db.Column(db.String(100)) state = db.Column(db.String(100)) zip_code = db.Column(db.String(10)) country = db.Column(db.String(100)) phone = db.Column(db.String(20)) ssn = db.Column(db.String(11)) # Consider implications of storing this status = db.Column(db.String(10), default='live') # live, dead, flagged card_type = db.Column(db.String(20)) # e.g., visa, mastercard bank = db.Column(db.String(100)) generated_at = db.Column(db.DateTime, default=datetime.utcnow) fraud_score = db.Column(db.Integer, default=0) # Example score is_proxy = db.Column(db.Boolean, default=False) # Info from validation time def __repr__(self): return f'<Card {self.card_number}>' class Transaction(db.Model): # Tracks credit usage or purchases within the app id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) description = db.Column(db.String(200)) # e.g., "Generated Card", "Added Credits" credit_change = db.Column(db.Integer) # e.g., -1 for generation, +10 for purchase timestamp = db.Column(db.DateTime, default=datetime.utcnow) def __repr__(self): return f'<Transaction {self.id} - User {self.user_id}>' class FraudAttempt(db.Model): id = db.Column(db.Integer, primary_key=True) ip_address = db.Column(db.String(45)) action = db.Column(db.String(100)) timestamp = db.Column(db.DateTime, default=datetime.utcnow) user_agent = db.Column(db.String(250)) fingerprint = db.Column(db.String(100)) username_attempt = db.Column(db.String(80), nullable=True) # Track username used in failed attempts def __repr__(self): return f'<FraudAttempt {self.id} - IP {self.ip_address}>' # --- Helper Functions --- def log_fraud_attempt(ip, action, user_agent=None, fingerprint=None, username=None): try: attempt = FraudAttempt( ip_address=ip, action=action, user_agent=user_agent or request.headers.get('User-Agent', 'Unknown')[:250], fingerprint=fingerprint or session.get('fingerprint', 'Unknown'), username_attempt=username ) db.session.add(attempt) db.session.commit() logging.warning(f"Fraud attempt - IP: {ip}, Action: {action}, User: {username or 'N/A'}") except Exception as e: logging.error(f"Failed to log fraud attempt: {e}") def generate_ssn(): """Generate a fake but structurally valid SSN (for testing only)""" area = random.randint(1, 899) # Avoid restricted area numbers like 000, 666 while 600 <= area <= 649: # Avoid unassigned group area = random.randint(1, 899) group = random.randint(1, 99) serial = random.randint(1, 9999) return f"{area:03d}-{group:02d}-{serial:04d}" def make_luhn_valid(number_prefix): """Appends a valid Luhn check digit to a number prefix.""" digits = [int(d) for d in number_prefix] for i in range(len(digits) - 1, -1, -2): digits[i] *= 2 if digits[i] > 9: digits[i] -= 9 total = sum(digits) check_digit = (10 - (total % 10)) % 10 return number_prefix + str(check_digit) def generate_fake_card_data(user_id=None): """Generate realistic-looking but fake card details (data only, no DB interaction)""" bins = { 'visa': ['4539', '4556', '4916', '4532', '4929', '4024', '4485', '4716', '4'], 'mastercard': ['51', '52', '53', '54', '55', '2221', '2222', '2223', '2720'], 'amex': ['34', '37'], 'discover': ['6011', '644', '645', '646', '647', '648', '649', '65'] } card_type = random.choice(list(bins.keys())) bin_prefix = random.choice(bins[card_type]) length = 15 if card_type == 'amex' else 16 account_num_length = length - len(bin_prefix) - 1 # -1 for the check digit account_num = ''.join([str(random.randint(0, 9)) for _ in range(account_num_length)]) number_prefix = bin_prefix + account_num card_number = make_luhn_valid(number_prefix) expiration_month = str(random.randint(1, 12)).zfill(2) current_year = datetime.now().year expiration_year = str(random.randint(current_year + 1, current_year + 5)) cvv_length = 4 if card_type == 'amex' else 3 cvv = str(random.randint(10**(cvv_length - 1), (10**cvv_length) - 1)).zfill(cvv_length) # Generate fake PII first_names = ["James", "John", "Robert", "Michael", "William", "David", "Richard", "Joseph", "Thomas", "Mary", "Patricia", "Jennifer", "Linda", "Elizabeth", "Barbara", "Susan", "Jessica", "Sarah", ] last_names = ["Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia", "Miller", "Davis", "Rodriguez", ] cities_states = [("New York", "NY", "10001"), ("Los Angeles", "CA", "90001"), ("Chicago", "IL", "60601"), ("Houston", "TX", "77001"), ("Phoenix", "AZ", "85001"), ("Philadelphia", "PA", "19101"), ("San Antonio", "TX", "78201"), ("San Diego", "CA", "92101"), ("Dallas", "TX", "75201"), ("San Jose", "CA", "95101")] street_names = ['Main', 'Oak', 'Pine', 'Maple', 'Cedar', 'Elm', 'View', 'Washington', 'Lake', 'Hill'] street_types = ['St', 'Ave', 'Rd', 'Ln', 'Dr', 'Ct', 'Pl', 'Blvd'] city, state, zip_code = random.choice(cities_states) street = f"{random.randint(100, 9999)} {random.choice(street_names)} {random.choice(street_types)}" fake_ssn = generate_ssn() # Generate fake SSN fake_phone = f"{random.randint(200, 999)}-{random.randint(200, 999)}-{random.randint(1000, 9999)}" fake_bank = random.choice(['Chase', 'Bank of America', 'Wells Fargo', 'Citibank', 'Capital One', 'US Bank']) return { 'card_number': card_number, 'expiration': f"{expiration_month}/{expiration_year[2:]}", # Store as MM/YY 'cvv': cvv, 'name': f"{random.choice(first_names)} {random.choice(last_names)}", 'address': street, 'city': city, 'state': state, 'zip_code': zip_code, 'country': 'US', # Defaulting to US based on examples 'phone': fake_phone, 'ssn': fake_ssn, # Storing fake SSN 'status': 'live', 'card_type': card_type, 'bank': fake_bank, 'fraud_score': random.randint(0, 10), # Start with low score 'is_proxy': False # Default } def create_card_object(user_id, card_data): """Creates a Card database object from card data.""" # Randomly mark some as dead/flagged to appear realistic rand_status = random.random() if rand_status < 0.15: # 15% chance dead card_data['status'] = 'dead' elif rand_status < 0.25: # 10% chance flagged card_data['status'] = 'flagged' card_data['fraud_score'] = random.randint(50, 90) card = Card(user_id=user_id, **card_data) return card def check_proxy(ip): """Check if IP is a proxy/VPN using ip-api.com (Use responsibly)""" if not ip or ip == '127.0.0.1': # Don't check localhost return False try: response = requests.get(f'http://ip-api.com/json/{ip}?fields=status,message,proxy,hosting', timeout=5) response.raise_for_status() # Raise an exception for bad status codes data = response.json() return data.get('status') == 'success' and (data.get('proxy', False) or data.get('hosting', False)) except requests.exceptions.RequestException as e: logging.error(f"Error checking proxy for IP {ip}: {e}") return False # Fail safely # --- Decorators --- def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'user_id' not in session: flash('Please log in to access this page.', 'warning') return redirect(url_for('login', next=request.url)) user = User.query.get(session['user_id']) if not user: session.pop('user_id', None) session.pop('username', None) flash('User account not found. Please log in again.', 'danger') return redirect(url_for('login')) return f(*args, **kwargs) return decorated_function def admin_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'user_id' not in session: flash('Please log in to access this page.', 'warning') return redirect(url_for('login')) user = User.query.get(session['user_id']) if not user or not user.is_admin: log_fraud_attempt(request.remote_addr, "Admin access attempt", username=user.username if user else 'N/A') flash('You do not have permission to access this page.', 'danger') return redirect(url_for('dashboard')) # Or index return f(*args, **kwargs) return decorated_function # --- Routes --- @app.route('/') def index(): if 'user_id' in session: return redirect(url_for('dashboard')) return render_template('index.html') @app.route('/register', methods=['GET', 'POST']) def register(): if 'user_id' in session: return redirect(url_for('dashboard')) if request.method == 'POST': username = request.form.get('username') password = request.form.get('password') email = request.form.get('email') captcha_solution = request.form.get('captcha') if not username or not password or not email: flash('Username, email, and password are required.', 'danger') return render_template('register.html'), 400 if not captcha.validate(solution=captcha_solution): log_fraud_attempt(request.remote_addr, "Failed CAPTCHA", username=username) flash('Invalid CAPTCHA. Please try again.', 'danger') return render_template('register.html'), 400 if User.query.filter_by(username=username).first(): flash('Username already exists. Please choose another.', 'warning') return render_template('register.html'), 400 if User.query.filter_by(email=email).first(): flash('Email address already registered. Please use a different email.', 'warning') return render_template('register.html'), 400 if len(password) < 8: flash('Password must be at least 8 characters long.', 'danger') return render_template('register.html'), 400 user = User( username=username, password_hash=generate_password_hash(password), email=email, ip_address=request.remote_addr, fingerprint=str(uuid.uuid4()) ) db.session.add(user) try: db.session.commit() log_fraud_attempt(request.remote_addr, f"Successful registration: {username}") flash(f'Account created successfully for {username}. Please log in.', 'success') return redirect(url_for('login')) except Exception as e: db.session.rollback() logging.error(f"Error during registration for {username}: {e}") flash('An error occurred during registration. Please try again.', 'danger') return render_template('register.html'), 500 return render_template('register.html') @app.route('/login', methods=['GET', 'POST']) def login(): if 'user_id' in session: return redirect(url_for('dashboard')) if request.method == 'POST': username = request.form.get('username') password = request.form.get('password') user = User.query.filter_by(username=username).first() if user and check_password_hash(user.password_hash, password): session['user_id'] = user.id session['username'] = user.username session['fingerprint'] = user.fingerprint user.last_login = datetime.utcnow() user.ip_address = request.remote_addr db.session.commit() time.sleep(random.uniform(0.3, 1.0)) flash(f'Welcome back, {user.username}!', 'success') next_page = request.args.get('next') return redirect(next_page or url_for('dashboard')) else: log_fraud_attempt(request.remote_addr, "Failed login attempt", username=username) time.sleep(random.uniform(1, 3)) flash('Invalid username or password.', 'danger') return render_template('login.html'), 401 return render_template('login.html') @app.route('/logout') @login_required def logout(): user_id = session.get('user_id') if user_id: user = User.query.get(user_id) session.pop('user_id', None) session.pop('username', None) session.pop('fingerprint', None) flash('You have been logged out.', 'info') return redirect(url_for('index')) @app.route('/dashboard') @login_required def dashboard(): user = User.query.get(session['user_id']) cards = Card.query.filter_by(user_id=user.id) \ .order_by(Card.generated_at.desc()) \ .limit(15).all() return render_template('dashboard.html', user=user, cards=cards) @app.route('/generate_card', methods=['POST']) @login_required def generate_card_route(): user = User.query.get(session['user_id']) if user.credits <= 0: log_fraud_attempt(request.remote_addr, "Attempted card generation with 0 credits", username=user.username) flash('Insufficient credits. Please purchase more.', 'warning') return jsonify({"error": "Insufficient credits.", "success": False}), 400 user.credits -= 1 transaction = Transaction(user_id=user.id, description="Generated Card", credit_change=-1) db.session.add(transaction) time.sleep(random.uniform(0.5, 1.5)) try: card_data = generate_fake_card_data(user_id=user.id) card_object = create_card_object(user.id, card_data) db.session.add(card_object) db.session.commit() logging.info(f"User {user.username} generated card {card_object.card_number[:4]}...{card_object.card_number[-4:]}") card_data_for_json = { "number": card_object.card_number, "expiry": card_object.expiration, "cvv": card_object.cvv, "name": card_object.name, "type": card_object.card_type, "status": card_object.status, "address": card_object.address, "city": card_object.city, "state": card_object.state, "zip": card_object.zip_code, "bank": card_object.bank, } return jsonify({ "success": True, "card": card_data_for_json, "new_credit_balance": user.credits }) except Exception as e: db.session.rollback() logging.error(f"Error generating card for user {user.username}: {e}") flash('Failed to generate card. Please try again.', 'danger') return jsonify({"error": "Failed to generate card. Please try again.", "success": False}), 500 @app.route('/validate_card', methods=['POST']) @login_required def validate_card(): user = User.query.get(session['user_id']) card_number = request.json.get('card_number') if not card_number or not card_number.isdigit() or len(card_number) not in (13, 14, 15, 16, 19): log_fraud_attempt(request.remote_addr, "Invalid card number format for validation", username=user.username) flash('Invalid card number format', 'warning') return jsonify({"error": "Invalid card number format"}), 400 log_fraud_attempt( request.remote_addr, f"Card validation attempt: {card_number[:6]}...{card_number[-4:]}", fingerprint=session.get('fingerprint'), username=user.username ) time.sleep(random.uniform(1.5, 4.0)) # TODO: re-enable Genkit # is_valid_simulated = await validate_card_number_with_ai(card_number) # AI Validation is_valid_simulated = random.random() > 0.3 # Fake for now fraud_score = random.randint(5, 75) if is_valid_simulated else random.randint(60, 100) is_proxy = check_proxy(request.remote_addr) # Check real IP message = "Card validation successful (Simulated)" if is_valid_simulated else "Card validation failed (Simulated)" return jsonify({ "valid": is_valid_simulated, "fraud_score": fraud_score, "is_proxy_used": is_proxy, "message": message, "timestamp": datetime.utcnow().isoformat() }) # --- Admin Routes --- @app.route('/admin') @admin_required def admin_panel(): page = request.args.get('page', 1, type=int)
|