Add a timeout parameter and allow passing multiple interfaces to make the script more useful for testing purposes.