Patched whitelist_listening_ports

Added uniq -u to remove duplicates