created a socket scanned each port on the target and we will receive either 1 or 0 indicating if it was successful or not/ open or not. once we received the results then we check if a service is running on the port or not and then extract it if their is a service running.