feat: Add hostname resolution to Nmap scans
- Add -R flag to Nmap scan options to enable reverse DNS lookup. - Modify the Nmap processing logic to extract and store hostnames. - Update PROGRESS.md to reflect the completion of the task.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user