Differences

This shows you the differences between two versions of the page.

mapping:dhcp_leases [2009/11/01 17:04]
Robin Wood created
mapping:dhcp_leases [2009/11/19 09:01] (current)
Robin Wood
Line 2: Line 2:
This morning I added a machine to my network that I knew used DHCP and when it had booted I wanted to know what IP address it had been given. I run the ISC DHCP server so though it would be nice to have a script that would query the leases file (dhcpd.leases) and show all current leases. So, I wrote this script and thought I'd submit it as my first script here. Figure it might be useful if someone gets local file inclusion or some other way of nabbing the file off a server. This morning I added a machine to my network that I knew used DHCP and when it had booted I wanted to know what IP address it had been given. I run the ISC DHCP server so though it would be nice to have a script that would query the leases file (dhcpd.leases) and show all current leases. So, I wrote this script and thought I'd submit it as my first script here. Figure it might be useful if someone gets local file inclusion or some other way of nabbing the file off a server.
-<code>+<code ruby>
#!/usr/bin/env ruby #!/usr/bin/env ruby
require "time" require "time"
mapping/dhcp_leases.txt · Last modified: 2009/11/19 09:01 by Robin Wood