Get current scanning status
()
| 8874 | |
| 8875 | with open(vuln_file, 'w') as f: |
| 8876 | f.write(f"# Vulnerability scan results for {ip}\n") |
| 8877 | f.write(f"# Hostname: {hostname}\n") |
| 8878 | f.write(f"# MAC: {mac}\n") |
| 8879 | f.write(f"# Status: {'alive' if is_alive else 'dead'}\n") |
| 8880 | f.write(f"# Last updated: {datetime.now().isoformat()}\n") |
| 8881 | f.write(f"# Discovered via: ARP/Nmap network scanning\n\n") |
| 8882 | |
| 8883 | if is_alive: |
| 8884 | f.write(f"Host {ip} is alive and responding\n") |
| 8885 | f.write(f"MAC Address: {mac}\n") |
| 8886 | f.write(f"Hostname: {hostname}\n") |
| 8887 | f.write(f"Status: ACTIVE\n\n") |
| 8888 | f.write(f"=== NETWORK DISCOVERY RESULTS ===\n") |
| 8889 | f.write(f"Host discovered through network scanning\n") |
| 8890 | f.write(f"Further vulnerability scanning recommended\n") |
| 8891 | else: |
| 8892 | f.write(f"Host {ip} is not responding\n") |
| 8893 | f.write(f"Status: INACTIVE\n") |
| 8894 | |
| 8895 | except Exception as e: |
| 8896 | logger.error(f"Error updating vulnerability output for {ip}: {e}") |
| 8897 | |
| 8898 |