fix getips(), getaddrinfo returned duplicated ips, have no idea why. now using popen from os module