detecti-cli 2.0.4__tar.gz → 2.0.6__tar.gz
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.
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/PKG-INFO +2 -1
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/cli.py +8 -8
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/database/config_db.py +6 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/utils/setup.py +2 -2
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/api/auth.py +2 -3
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/api/routes.py +1 -1
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/pyproject.toml +2 -1
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/requirements.txt +1 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/.env.example +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/.github/workflows/publish.yml +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/.gitignore +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/README.md +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/__main__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/banner +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/config.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/database/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/database/schema.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/database/storage.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/engine.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/core/models.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/data/config.sqlite +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/data/dbs/.gitkeep +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/data/dbs/example.com.sqlite +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/base.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/censys.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/crtsh.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/exploitdb.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/masscan.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/nuclei.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/nvd.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/reverse_whois.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/modules/shodan.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/reporters/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/reporters/csv_reporter.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/reporters/html_reporter.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/reporters/json_reporter.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/reporters/markdown_reporter.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/utils/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/utils/http.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/utils/logger.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/api/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/api/graph_builder.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/process_manager.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/server.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/android-chrome-192x192.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/android-chrome-512x512.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/apple-touch-icon.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/css/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/css/dashboard.css +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/favicon-16x16.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/favicon-32x32.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/favicon.ico +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/img/DetecTI_Security_Logo.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/img/detecti-ico.png +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/index.html +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/api.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/cytoscape-cose-bilkent.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/cytoscape-dagre.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/cytoscape.min.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/dagre.min.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/graph.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/js/lucide.min.js +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/login.html +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/detecti/web/static/site.webmanifest +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/__init__.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/conftest.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_engine_cli.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_http.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_masscan.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_models.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_modules.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_nuclei.py +0 -0
- {detecti_cli-2.0.4 → detecti_cli-2.0.6}/tests/test_reporters.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: detecti-cli
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: Modern Attack Surface Management & Threat Intelligence Engine
|
|
5
5
|
Author-email: "Lucas S. (Ls4ss)" <lucas@lucassouza.io>
|
|
6
6
|
License: MIT
|
|
@@ -21,6 +21,7 @@ Requires-Dist: bcrypt>=4.0.0
|
|
|
21
21
|
Requires-Dist: cve-searchsploit>=0.3.0
|
|
22
22
|
Requires-Dist: fastapi>=0.104.0
|
|
23
23
|
Requires-Dist: httpx>=0.27.0
|
|
24
|
+
Requires-Dist: markdown>=3.4.0
|
|
24
25
|
Requires-Dist: psutil>=5.9.0
|
|
25
26
|
Requires-Dist: pydantic-settings>=2.2.0
|
|
26
27
|
Requires-Dist: pydantic>=2.7.0
|
|
@@ -98,7 +98,7 @@ def target_to_db_name(target: str) -> str:
|
|
|
98
98
|
return f"{base}.sqlite"
|
|
99
99
|
|
|
100
100
|
try:
|
|
101
|
-
from core.engine import ThreatTrackEngine
|
|
101
|
+
from detecti.core.engine import ThreatTrackEngine
|
|
102
102
|
engine = ThreatTrackEngine()
|
|
103
103
|
meta = engine.parse_target_metadata(t)
|
|
104
104
|
clean_target = meta.get("clean_target") or t
|
|
@@ -204,7 +204,7 @@ def scan_command(
|
|
|
204
204
|
final_db_name = None
|
|
205
205
|
if not is_cve:
|
|
206
206
|
try:
|
|
207
|
-
from core.database.storage import DatabaseManager
|
|
207
|
+
from detecti.core.database.storage import DatabaseManager
|
|
208
208
|
if create_db:
|
|
209
209
|
db_name = create_db if create_db.endswith('.sqlite') else f"{create_db}.sqlite"
|
|
210
210
|
else:
|
|
@@ -258,7 +258,7 @@ def scan_command(
|
|
|
258
258
|
|
|
259
259
|
# Automatically launch DetecTIHound WebGUI (only if not already running)
|
|
260
260
|
try:
|
|
261
|
-
from web.process_manager import WebServerManager
|
|
261
|
+
from detecti.web.process_manager import WebServerManager
|
|
262
262
|
|
|
263
263
|
ws_manager = WebServerManager()
|
|
264
264
|
host = "0.0.0.0"
|
|
@@ -368,7 +368,7 @@ def config_check_command(
|
|
|
368
368
|
"""Check prerequisites, API keys, environment health, or run automated setup."""
|
|
369
369
|
print_banner()
|
|
370
370
|
|
|
371
|
-
from utils.setup import SetupManager
|
|
371
|
+
from detecti.utils.setup import SetupManager
|
|
372
372
|
setup_mgr = SetupManager(console=console)
|
|
373
373
|
|
|
374
374
|
if setup:
|
|
@@ -454,7 +454,7 @@ def start_server(
|
|
|
454
454
|
return
|
|
455
455
|
|
|
456
456
|
try:
|
|
457
|
-
from web.process_manager import WebServerManager
|
|
457
|
+
from detecti.web.process_manager import WebServerManager
|
|
458
458
|
|
|
459
459
|
manager = WebServerManager()
|
|
460
460
|
|
|
@@ -509,7 +509,7 @@ def server_status() -> None:
|
|
|
509
509
|
return
|
|
510
510
|
|
|
511
511
|
try:
|
|
512
|
-
from web.process_manager import WebServerManager
|
|
512
|
+
from detecti.web.process_manager import WebServerManager
|
|
513
513
|
from rich.table import Table
|
|
514
514
|
|
|
515
515
|
manager = WebServerManager()
|
|
@@ -563,7 +563,7 @@ def stop_server() -> None:
|
|
|
563
563
|
return
|
|
564
564
|
|
|
565
565
|
try:
|
|
566
|
-
from web.process_manager import WebServerManager
|
|
566
|
+
from detecti.web.process_manager import WebServerManager
|
|
567
567
|
|
|
568
568
|
manager = WebServerManager()
|
|
569
569
|
|
|
@@ -615,7 +615,7 @@ def list_databases() -> None:
|
|
|
615
615
|
# Try to get target from database
|
|
616
616
|
target = "Unknown"
|
|
617
617
|
try:
|
|
618
|
-
from core.database.storage import DatabaseManager
|
|
618
|
+
from detecti.core.database.storage import DatabaseManager
|
|
619
619
|
db_manager = DatabaseManager(db_file)
|
|
620
620
|
stats = db_manager.get_summary_stats()
|
|
621
621
|
if 'target' in stats:
|
|
@@ -59,6 +59,12 @@ class ConfigDBManager:
|
|
|
59
59
|
conn.commit()
|
|
60
60
|
return cursor.rowcount > 0
|
|
61
61
|
|
|
62
|
+
def get_user(self, username: str):
|
|
63
|
+
with sqlite3.connect(self.db_path) as conn:
|
|
64
|
+
conn.row_factory = sqlite3.Row
|
|
65
|
+
cursor = conn.execute("SELECT * FROM users WHERE username = ?", (username,))
|
|
66
|
+
return cursor.fetchone()
|
|
67
|
+
|
|
62
68
|
def get_user_hash(self, username: str) -> str:
|
|
63
69
|
with sqlite3.connect(self.db_path) as conn:
|
|
64
70
|
cursor = conn.execute("SELECT password_hash FROM users WHERE username = ?", (username,))
|
|
@@ -270,7 +270,7 @@ class SetupManager:
|
|
|
270
270
|
f.write(f'JWT_SECRET_KEY={jwt_secret}\n')
|
|
271
271
|
import os
|
|
272
272
|
sys.path.insert(0, str(self.root_dir))
|
|
273
|
-
from core.database.config_db import ConfigDBManager, get_password_hash
|
|
273
|
+
from detecti.core.database.config_db import ConfigDBManager, get_password_hash
|
|
274
274
|
|
|
275
275
|
db_dir = DETECTI_HOME / "data" / "dbs"
|
|
276
276
|
db_dir.mkdir(parents=True, exist_ok=True)
|
|
@@ -379,7 +379,7 @@ class SetupManager:
|
|
|
379
379
|
# Step 5: ExploitDB Cache Update
|
|
380
380
|
self.console.print("\n💣 [bold white]Step 5/6: Initializing ExploitDB vulnerability mapping...[/bold white]")
|
|
381
381
|
try:
|
|
382
|
-
from modules.exploitdb import ExploitDBModule
|
|
382
|
+
from detecti.modules.exploitdb import ExploitDBModule
|
|
383
383
|
ExploitDBModule.update_database()
|
|
384
384
|
self.console.print(" [green]✔ ExploitDB mapping database initialized & updated.[/green]")
|
|
385
385
|
except Exception as exc:
|
|
@@ -28,9 +28,8 @@ class Token(BaseModel):
|
|
|
28
28
|
token_type: str
|
|
29
29
|
|
|
30
30
|
def get_config_db():
|
|
31
|
-
from
|
|
32
|
-
|
|
33
|
-
db_path = project_root / "data" / "config.sqlite"
|
|
31
|
+
from detecti.config import DETECTI_HOME
|
|
32
|
+
db_path = DETECTI_HOME / "data" / "config.sqlite"
|
|
34
33
|
return ConfigDBManager(db_path)
|
|
35
34
|
|
|
36
35
|
def create_access_token(data: dict, expires_delta: Optional[timedelta] = None):
|
|
@@ -423,7 +423,7 @@ async def export_graph_data(
|
|
|
423
423
|
}
|
|
424
424
|
)
|
|
425
425
|
elif format == "csv":
|
|
426
|
-
from reporters.csv_reporter import CSVReporter
|
|
426
|
+
from detecti.reporters.csv_reporter import CSVReporter
|
|
427
427
|
csv_content = CSVReporter.generate(scan_result)
|
|
428
428
|
filename = f"detecti_{safe_target}_{timestamp}.csv"
|
|
429
429
|
return Response(
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "detecti-cli"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.6"
|
|
8
8
|
description = "Modern Attack Surface Management & Threat Intelligence Engine"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -56,6 +56,7 @@ dependencies = [
|
|
|
56
56
|
"bcrypt>=4.0.0",
|
|
57
57
|
"python-jose[cryptography]>=3.3.0",
|
|
58
58
|
"python-multipart>=0.0.6",
|
|
59
|
+
"markdown>=3.4.0",
|
|
59
60
|
]
|
|
60
61
|
|
|
61
62
|
[project.optional-dependencies]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|