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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user