mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 05:50:21 -05:00
- Implemented PlaybookManager for creating and managing investigation playbooks with templates. - Added SavedSearches component for managing bookmarked queries and recurring scans. - Introduced TimelineView for visualizing forensic event timelines with zoomable charts. - Enhanced backend processing with auto-queued jobs for dataset uploads and improved database concurrency. - Updated frontend components for better user experience and performance optimizations. - Documented changes in update log for future reference.
33 lines
886 B
Python
33 lines
886 B
Python
from pathlib import Path
|
|
p=Path(r'd:/Projects/Dev/ThreatHunt/backend/app/api/routes/keywords.py')
|
|
t=p.read_text(encoding='utf-8')
|
|
old='''class ScanHit(BaseModel):
|
|
theme_name: str
|
|
theme_color: str
|
|
keyword: str
|
|
source_type: str
|
|
source_id: str | int
|
|
field: str
|
|
matched_value: str
|
|
row_index: int | None = None
|
|
dataset_name: str | None = None
|
|
'''
|
|
new='''class ScanHit(BaseModel):
|
|
theme_name: str
|
|
theme_color: str
|
|
keyword: str
|
|
source_type: str
|
|
source_id: str | int
|
|
field: str
|
|
matched_value: str
|
|
row_index: int | None = None
|
|
dataset_name: str | None = None
|
|
hostname: str | None = None
|
|
username: str | None = None
|
|
'''
|
|
if old not in t:
|
|
raise SystemExit('ScanHit pydantic model block not found')
|
|
t=t.replace(old,new)
|
|
p.write_text(t,encoding='utf-8')
|
|
print('extended API ScanHit model with hostname+username')
|