HomeAboutMailing ListList Chatter /0/0 3.236.84.188

netwatcher

2021-02-11 by: "Mike (meuon) Harrison"
From: "Mike (meuon) Harrison" 
------------------------------------------------------


Sharing. I'm constantly plugging things in and out of my network, 
that don't have displays or an easy way to see their IP. I was running 
nmap scans before and after, diffing the output. It works, but is messy.
There are probably N+1 better ways.. but... it works.

I wanted to automate that. Sharing some bad PHP code. Yes, there may be 
N+1 better ways to do this as well, but you might find this useful. :)

https://www.geeklabs.com/g/articles/show/5455/Netwatcher.php/




=============================================================== From: Dave Brockman ------------------------------------------------------ I do similar things with RANCID + GIT and switch MAC tables. But at the end of the day, it's really easier to just ask the DHCP server :) (or watch the logs when devices are attached to the network). Cheers, -Dave

=============================================================== From: Andrew Armstrong ------------------------------------------------------ I'm pretty sure a Solar Winds sells a several thousand dollar tool that does this as well as a few other things. ;-) -- Andrew Armstrong

=============================================================== From: Dave Brockman ------------------------------------------------------ Well, it starts at about $1200 these days. It used to be free. Was a very fat solution though. Cheers, -Dave

=============================================================== From: Ed King ------------------------------------------------------ on Debian9 with php7 I had to:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sudo apt-get i= nstall php-xml and change $known["$mac"] to $known['$mac'] to get a clean run Sharing. I'm constantly plugging things in and out of my network,=20 that don't have displays or an easy way to see their IP. I was running=20 nmap scans before and after, diffing the output. It works, but is messy. There are probably N+1 better ways.. but... it works. I wanted to automate that. Sharing some bad PHP code. Yes, there may be=20 N+1 better ways to do this as well, but you might find this useful. :) https://www.geeklabs.com/g/articles/show/5455/Netwatcher.php/

=============================================================== From: "Mike (meuon) Harrison" ------------------------------------------------------ But you have access to the DHCP server, I usually don't. I don't want to share all of my use cases for such tools publically. And Andrew Armstring added: Laughing.. And Ed King: WTF?!? You had to sudo ? I figure you run barefoot with scissors like I do.... But I don't see how/why you'd change that.. $known["$mac"] to $known[$mac] would work.. but I have bad habits I don't even know why I have them.

=============================================================== From: David White ------------------------------------------------------ It even comes with a back door, so you can easily get into your network from anywhere! /ducks -- David White