Built a VM with multiple interfaces to do Layer 2 scanning.
Also found a python library to help me translate dhcpd.leases files into a report file.
Here is a quick install procedures
sudo yum install python3-devel pip3 install freezegun --user pip3 install isc_dhcp_leases --user
Here is a sample script
#!/bin/python3 from isc_dhcp_leases import Lease, IscDhcpLeases import argparse parser = argparse.ArgumentParser() parser.add_argument("filename") args = parser.parse_args() leases = IscDhcpLeases(args.filename) result = leases.get() # Returns the leases as a list of Lease objects result = leases.get_current() for hostentry in result: print(hostentry.ip,hostentry.ethernet.upper(),hostentry.start,hostentry.hostname)
Here is the usage
reportdhcp.py /var/lib/dhcpd/dhcpd.leases
Will work on a clean reporting web page.
Weight is weird, I need to settle on a morning weight.
Weight: 313.4