Code from Port Scanner Meetup