augustl: Use a Math.random() scaled to the port range you're interested in, Math.floor it so it's an integer