(enable: bool)
| 11248 | debug_info['steps'].append(f"Step 6: Updated {len(arp_hosts)} NetKB entries") |
| 11249 | |
| 11250 | debug_info['results'] = { |
| 11251 | 'cache_updated': True, |
| 11252 | 'hosts_found': arp_hosts, |
| 11253 | 'cache_state': { |
| 11254 | 'arp_hosts_count': len(network_scan_cache.get('arp_hosts', {})), |
| 11255 | 'last_arp_scan_time': network_scan_cache.get('last_arp_scan', 'NEVER') |
| 11256 | } |
| 11257 | } |
| 11258 | else: |
| 11259 | debug_info['steps'].append("Step 3: No hosts found, cache not updated") |
| 11260 | debug_info['results'] = { |
| 11261 | 'cache_updated': False, |
| 11262 | 'hosts_found': {}, |
| 11263 | 'error': 'No hosts discovered' |
| 11264 | } |
| 11265 | |
| 11266 | return jsonify(debug_info) |
| 11267 | |
| 11268 | except Exception as e: |
| 11269 | logger.error(f"Error in force ARP scan: {e}") |
| 11270 | return jsonify({'error': str(e), 'timestamp': datetime.now().isoformat()}), 500 |
| 11271 | |
| 11272 | @app.route('/api/threat-intelligence/trigger-vuln-scan', methods=['POST']) |
no test coverage detected