Python implementation of a network scanner