Implementing a network sniffer using Python