Improve get open ports and checking on 32 and 64 bits