socketutils.py updates

Making it easier for the user to enter in ranges of addresses. Cleaning
up code. Generators son.