[ale] [OT] DHCPd + nmap?
Michael D. Hirsch
mhirsch at nubridges.com
Mon Dec 1 15:16:33 EST 2003
On Monday 01 December 2003 01:45 pm, Jonathan Glass wrote:
> Anyone tied nmap together with dhcpd? I'd like to nmap scan a box
> whenever they accept an address from my DHCP server.
>
> What I'm unclear about is how to monitor the dhcpd logs in real-time. I
> can tail the file periodically, then scan, but would prefer to do the
> scan as soon as they receive an address.
I have written scripts to do this. The quickest way I found was to run tail
-f logfile and pipe the output to some other script. Both perl and python
make it really easy to run a subprocess like that and get its output.
I used to be embarrased by having done that, but I've since become convinced
that the author of tail did all the hard work. If I were to reimplement it,
how would I be better for it?
Michael
More information about the Ale
mailing list