feat: Add OSINT features (v0.1.2)

- MAC vendor lookup (IEEE OUI database)
- BLE company_id to manufacturer mapping
- Device profile enrichment in API responses
- Export endpoints: devices.csv, devices.json, alerts.csv, probes.csv
- Auto-populate vendor on device creation
- CLI command: flask download-oui
- Makefile target: make oui

13 tests passing
This commit is contained in:
user
2026-02-05 21:14:27 +01:00
parent 924d28aab0
commit 3ad39cfaeb
16 changed files with 365 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ from flask import request
from . import bp
from ..models import Device, Sighting
from ..extensions import db
from ..services.device_service import enrich_device
@bp.route('/devices')
@@ -18,7 +19,7 @@ def list_devices():
query = query.limit(limit).offset(offset)
devices = db.session.scalars(query).all()
return {'devices': [d.to_dict() for d in devices], 'limit': limit, 'offset': offset}
return {'devices': [enrich_device(d) for d in devices], 'limit': limit, 'offset': offset}
@bp.route('/devices/<mac>')
@@ -37,6 +38,6 @@ def get_device(mac):
.limit(20)
).all()
result = device.to_dict()
result = enrich_device(device)
result['sightings'] = [s.to_dict() for s in sightings]
return result