diff --git a/PROGRESS.md b/PROGRESS.md index b60c6d2..2a6d2fe 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -72,7 +72,7 @@ - [x] Add a log file that only keeps records for the past 24 hours. - [x] Log all LLM responses to the console. - [x] Reduce alerts to only happen between 9am and 12am. -- [ ] Get hostnames of devices in Nmap scan. +- [x] Get hostnames of devices in Nmap scan. - [ ] Filter out RTT fluctuations below 10 seconds. - [ ] Filter out temperature fluctuations with differences less than 5 degrees. - [ ] Create a list of known port numbers and their applications for the LLM to check against to see if an open port is a threat \ No newline at end of file diff --git a/config.py b/config.py index 2a51a40..5ff9aa4 100644 --- a/config.py +++ b/config.py @@ -13,7 +13,7 @@ DAILY_RECAP_TIME = "20:00" # Nmap Configuration NMAP_TARGETS = "192.168.2.0/24" -NMAP_SCAN_OPTIONS = "-sS -T4" +NMAP_SCAN_OPTIONS = "-sS -T4 -R" # Test Mode (True to run once and exit, False to run continuously) TEST_MODE = False diff --git a/monitor_agent.py b/monitor_agent.py index 27d9db0..9b85078 100644 --- a/monitor_agent.py +++ b/monitor_agent.py @@ -171,6 +171,7 @@ def get_nmap_scan_results(): host_info = { "ip": host, "status": scan_data.get("status", {}).get("state", "unknown"), + "hostname": scan_data.get("hostnames", [{}])[0].get("name", ""), "open_ports": [] } if "tcp" in scan_data: