Skip to content

Instantly share code, notes, and snippets.

View ferr0's full-sized avatar

Alexander ferr0

View GitHub Profile
@ferr0
ferr0 / dhcpparse.awk
Created March 23, 2016 09:06 — forked from mattpascoe/dhcpparse.awk
An AWK script to parse ISC dhcpd configuration files into a CSV for use by dcm.pl to load into OpenNetAdmin
#!/usr/bin/awk -f
#
# Author: Matt Pascoe - matt@opennetadmin.com
#
# This awk script is used to extract relavant information from a dhcpd.conf
# config file and build a csv with appropriate fields for passing into
# a dcm.pl module. This can be used to bootstrap a new database from existing
# site data. As usual, inspect the output for accuracy.
# Note that for hosts, it will try a reverse lookup on the IP address