detecti-cli 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. detecti/__init__.py +0 -0
  2. detecti/cli.py +649 -0
  3. detecti/config.py +188 -0
  4. detecti/core/__init__.py +1 -0
  5. detecti/core/database/__init__.py +5 -0
  6. detecti/core/database/config_db.py +73 -0
  7. detecti/core/database/schema.py +136 -0
  8. detecti/core/database/storage.py +1388 -0
  9. detecti/core/engine.py +1032 -0
  10. detecti/core/models.py +278 -0
  11. detecti/data/config.sqlite +0 -0
  12. detecti/data/dbs/.gitkeep +2 -0
  13. detecti/data/dbs/example.com.sqlite +0 -0
  14. detecti/modules/__init__.py +29 -0
  15. detecti/modules/base.py +57 -0
  16. detecti/modules/censys.py +813 -0
  17. detecti/modules/crtsh.py +98 -0
  18. detecti/modules/exploitdb.py +138 -0
  19. detecti/modules/masscan.py +561 -0
  20. detecti/modules/nuclei.py +449 -0
  21. detecti/modules/nvd.py +300 -0
  22. detecti/modules/reverse_whois.py +225 -0
  23. detecti/modules/shodan.py +412 -0
  24. detecti/reporters/__init__.py +7 -0
  25. detecti/reporters/csv_reporter.py +74 -0
  26. detecti/reporters/html_reporter.py +356 -0
  27. detecti/reporters/json_reporter.py +26 -0
  28. detecti/reporters/markdown_reporter.py +203 -0
  29. detecti/utils/__init__.py +1 -0
  30. detecti/utils/http.py +294 -0
  31. detecti/utils/logger.py +378 -0
  32. detecti/utils/setup.py +453 -0
  33. detecti/web/__init__.py +6 -0
  34. detecti/web/api/__init__.py +1 -0
  35. detecti/web/api/auth.py +109 -0
  36. detecti/web/api/graph_builder.py +901 -0
  37. detecti/web/api/routes.py +1602 -0
  38. detecti/web/process_manager.py +283 -0
  39. detecti/web/server.py +183 -0
  40. detecti/web/static/android-chrome-192x192.png +0 -0
  41. detecti/web/static/android-chrome-512x512.png +0 -0
  42. detecti/web/static/apple-touch-icon.png +0 -0
  43. detecti/web/static/css/__init__.py +1 -0
  44. detecti/web/static/css/dashboard.css +3802 -0
  45. detecti/web/static/favicon-16x16.png +0 -0
  46. detecti/web/static/favicon-32x32.png +0 -0
  47. detecti/web/static/favicon.ico +0 -0
  48. detecti/web/static/img/DetecTI_Security_Logo.png +0 -0
  49. detecti/web/static/img/detecti-ico.png +0 -0
  50. detecti/web/static/index.html +677 -0
  51. detecti/web/static/js/__init__.py +1 -0
  52. detecti/web/static/js/api.js +177 -0
  53. detecti/web/static/js/cytoscape-cose-bilkent.js +458 -0
  54. detecti/web/static/js/cytoscape-dagre.js +397 -0
  55. detecti/web/static/js/cytoscape.min.js +31 -0
  56. detecti/web/static/js/dagre.min.js +3809 -0
  57. detecti/web/static/js/graph.js +7439 -0
  58. detecti/web/static/js/lucide.min.js +12 -0
  59. detecti/web/static/login.html +290 -0
  60. detecti/web/static/site.webmanifest +1 -0
  61. detecti_cli-2.0.0.dist-info/METADATA +554 -0
  62. detecti_cli-2.0.0.dist-info/RECORD +64 -0
  63. detecti_cli-2.0.0.dist-info/WHEEL +4 -0
  64. detecti_cli-2.0.0.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,290 @@
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>DetecTIHound - Login</title>
7
+ <!-- Same fonts and base styles as the main app -->
8
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
9
+ <script src="https://unpkg.com/lucide@latest"></script>
10
+ <style>
11
+ :root {
12
+ --bg-dark: #0f172a;
13
+ --bg-panel: #1e293b;
14
+ --bg-hover: #334155;
15
+ --text-main: #f8fafc;
16
+ --text-muted: #94a3b8;
17
+ --accent-cyan: #00f0ff;
18
+ --accent-purple: #8b5cf6;
19
+ --border-light: rgba(255, 255, 255, 0.1);
20
+ --danger: #ef4444;
21
+ }
22
+
23
+ body, html {
24
+ margin: 0;
25
+ padding: 0;
26
+ width: 100%;
27
+ height: 100%;
28
+ background-color: var(--bg-dark);
29
+ color: var(--text-main);
30
+ font-family: 'Inter', sans-serif;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ overflow: hidden;
35
+ position: relative;
36
+ }
37
+
38
+ /* Subtle background grid pattern to match the hacker/cyber theme */
39
+ body::before {
40
+ content: "";
41
+ position: absolute;
42
+ top: 0; left: 0; right: 0; bottom: 0;
43
+ background-image:
44
+ linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
45
+ linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
46
+ background-size: 30px 30px;
47
+ pointer-events: none;
48
+ z-index: 0;
49
+ }
50
+
51
+ .login-container {
52
+ background-color: var(--bg-panel);
53
+ border: 1px solid var(--border-light);
54
+ border-radius: 8px;
55
+ padding: 40px;
56
+ width: 100%;
57
+ max-width: 400px;
58
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.1);
59
+ position: relative;
60
+ z-index: 1;
61
+ display: flex;
62
+ flex-direction: column;
63
+ align-items: center;
64
+ }
65
+
66
+ .logo-title {
67
+ font-family: 'JetBrains Mono', monospace;
68
+ font-size: 1.8rem;
69
+ font-weight: 700;
70
+ margin-bottom: 30px;
71
+ letter-spacing: -0.5px;
72
+ color: var(--text-main);
73
+ }
74
+
75
+ .logo-title span {
76
+ color: var(--accent-cyan);
77
+ }
78
+
79
+ .login-form {
80
+ width: 100%;
81
+ display: flex;
82
+ flex-direction: column;
83
+ gap: 20px;
84
+ }
85
+
86
+ .input-group {
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: 8px;
90
+ }
91
+
92
+ .input-group label {
93
+ font-size: 0.85rem;
94
+ font-weight: 500;
95
+ color: var(--text-muted);
96
+ text-transform: uppercase;
97
+ letter-spacing: 0.5px;
98
+ }
99
+
100
+ .input-wrapper {
101
+ position: relative;
102
+ display: flex;
103
+ align-items: center;
104
+ }
105
+
106
+ .input-wrapper i {
107
+ position: absolute;
108
+ left: 12px;
109
+ color: var(--text-muted);
110
+ width: 18px;
111
+ height: 18px;
112
+ }
113
+
114
+ .login-input {
115
+ width: 100%;
116
+ background-color: var(--bg-dark);
117
+ border: 1px solid var(--border-light);
118
+ border-radius: 4px;
119
+ padding: 10px 10px 10px 40px;
120
+ color: var(--text-main);
121
+ font-family: 'Inter', sans-serif;
122
+ font-size: 0.95rem;
123
+ box-sizing: border-box;
124
+ transition: all 0.2s ease;
125
+ }
126
+
127
+ .login-input:focus {
128
+ outline: none;
129
+ border-color: var(--accent-cyan);
130
+ box-shadow: 0 0 0 1px var(--accent-cyan);
131
+ }
132
+
133
+ .login-btn {
134
+ background-color: transparent;
135
+ color: var(--accent-cyan);
136
+ border: 1px solid var(--accent-cyan);
137
+ padding: 12px;
138
+ border-radius: 4px;
139
+ font-family: 'JetBrains Mono', monospace;
140
+ font-weight: 600;
141
+ font-size: 0.95rem;
142
+ cursor: pointer;
143
+ transition: all 0.2s ease;
144
+ margin-top: 10px;
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ gap: 8px;
149
+ }
150
+
151
+ .login-btn:hover {
152
+ background-color: rgba(0, 240, 255, 0.1);
153
+ }
154
+
155
+ .login-btn:active {
156
+ transform: translateY(1px);
157
+ }
158
+
159
+ .error-message {
160
+ color: var(--danger);
161
+ font-size: 0.85rem;
162
+ background: rgba(239, 68, 68, 0.1);
163
+ border: 1px solid rgba(239, 68, 68, 0.3);
164
+ padding: 10px;
165
+ border-radius: 4px;
166
+ width: 100%;
167
+ box-sizing: border-box;
168
+ display: none;
169
+ text-align: center;
170
+ margin-bottom: 15px;
171
+ }
172
+
173
+ .footer-text {
174
+ margin-top: 25px;
175
+ font-size: 0.75rem;
176
+ color: var(--text-muted);
177
+ text-align: center;
178
+ }
179
+ </style>
180
+ </head>
181
+ <body>
182
+ <div class="login-container">
183
+ <div class="logo-title">DetecTI<span>Hound</span></div>
184
+
185
+ <div id="error-box" class="error-message"></div>
186
+
187
+ <form id="login-form" class="login-form">
188
+ <div class="input-group">
189
+ <label for="username">Username</label>
190
+ <div class="input-wrapper">
191
+ <i data-lucide="user"></i>
192
+ <input type="text" id="username" name="username" class="login-input" required autocomplete="username" spellcheck="false">
193
+ </div>
194
+ </div>
195
+
196
+ <div class="input-group">
197
+ <label for="password">Password</label>
198
+ <div class="input-wrapper">
199
+ <i data-lucide="lock"></i>
200
+ <input type="password" id="password" name="password" class="login-input" required autocomplete="current-password">
201
+ </div>
202
+ </div>
203
+
204
+ <button type="submit" class="login-btn">
205
+ <i data-lucide="log-in" style="width: 18px; height: 18px;"></i>
206
+ ACCESS SYSTEM
207
+ </button>
208
+ </form>
209
+
210
+ <div class="footer-text">
211
+ Unauthorized access is strictly prohibited.
212
+ </div>
213
+ </div>
214
+
215
+ <script>
216
+ lucide.createIcons();
217
+
218
+ document.getElementById('login-form').addEventListener('submit', async (e) => {
219
+ e.preventDefault();
220
+
221
+ const username = document.getElementById('username').value;
222
+ const password = document.getElementById('password').value;
223
+ const errorBox = document.getElementById('error-box');
224
+ const submitBtn = document.querySelector('.login-btn');
225
+
226
+ errorBox.style.display = 'none';
227
+ submitBtn.style.opacity = '0.7';
228
+ submitBtn.style.pointerEvents = 'none';
229
+ submitBtn.innerHTML = '<i data-lucide="loader" style="width: 18px; height: 18px; animation: spin 1s linear infinite;"></i> AUTHENTICATING...';
230
+ lucide.createIcons();
231
+
232
+ const formData = new URLSearchParams();
233
+ formData.append('username', username);
234
+ formData.append('password', password);
235
+
236
+ try {
237
+ const response = await fetch('/api/v1/auth/login', {
238
+ method: 'POST',
239
+ headers: {
240
+ 'Content-Type': 'application/x-www-form-urlencoded',
241
+ },
242
+ body: formData
243
+ });
244
+
245
+ if (response.ok) {
246
+ // Login successful, redirect to dashboard
247
+ submitBtn.style.color = '#10b981';
248
+ submitBtn.style.borderColor = '#10b981';
249
+ submitBtn.style.backgroundColor = 'rgba(16, 185, 129, 0.1)';
250
+ submitBtn.innerHTML = '<i data-lucide="check" style="width: 18px; height: 18px;"></i> ACCESS GRANTED';
251
+ lucide.createIcons();
252
+
253
+ setTimeout(() => {
254
+ window.location.reload();
255
+ }, 500);
256
+ } else {
257
+ const data = await response.json();
258
+ errorBox.textContent = data.detail || 'Authentication failed';
259
+ errorBox.style.display = 'block';
260
+ resetButton();
261
+ }
262
+ } catch (err) {
263
+ errorBox.textContent = 'Server connection error';
264
+ errorBox.style.display = 'block';
265
+ resetButton();
266
+ }
267
+
268
+ function resetButton() {
269
+ submitBtn.style.opacity = '1';
270
+ submitBtn.style.pointerEvents = 'auto';
271
+ submitBtn.style.color = '';
272
+ submitBtn.style.borderColor = '';
273
+ submitBtn.style.backgroundColor = '';
274
+ submitBtn.innerHTML = '<i data-lucide="log-in" style="width: 18px; height: 18px;"></i> ACCESS SYSTEM';
275
+ lucide.createIcons();
276
+ }
277
+ });
278
+
279
+ // Add spin animation CSS
280
+ const style = document.createElement('style');
281
+ style.innerHTML = `
282
+ @keyframes spin {
283
+ from { transform: rotate(0deg); }
284
+ to { transform: rotate(360deg); }
285
+ }
286
+ `;
287
+ document.head.appendChild(style);
288
+ </script>
289
+ </body>
290
+ </html>
@@ -0,0 +1 @@
1
+ {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}