Packet Mangler in Python