Code Snippets

Script to Find All IP Addresses on a Internal Network

I was working on a presentation this morning and as I was writing I realized I did not have a quick fast way to make a list of all the internal Ips on a LAN (Local Area network). Many of the tools I use including nmap, nessus and nexpose will accept a list of ips so  I decided to whip up a quick dirty shell script to get the job done.  I may clean it up in the future but for now it does its job. This is meant to work on Backtrack 4 but in its current state it will work on any Debian based distro. As always with any code found on the internet you use this at your own risk. Also I am sure this can be done better but like I said it was a 10 minute fix.

Technology Insights

sudo: unable to resolve host

I ran in to the weirdest error today.   “sudo: unable to resolve host”. I got this error even running as root which was the really weird part.  I was especially confused because I have been running Linux as my main OS for the better part of 10 years and have never run into this issue. Turns out the solution is very simple and almost elementary however I decided to make a quick post about it.