This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# This python script provides a function to query the opnSense (v21.3 - v23.1.x) dhcp leases status page and | |
# return a list of tuples including ip, hostname, and mac address. This script will not work with version 23.7.x+ | |
# due to changes in the DHCP lease page. | |
# See comment from dheldt on modified version that works using api searchLeases page. | |
# To use the original script, ensure LXML is installed via package manager or via pip. | |
# | |
# 27-Mar-2021 - Original release |