Modified so that hostname is read from command line, and split TCP scan into separate function.