Building a Threaded Port Scanner

Kent Gruber
Jul 9, 2017 · 4 min read

Required Gems

Quick Threading Background

Mutex

Queue

Knowing How to Finish the Job

Initializing the Port Scanner

Almost Done

Usage

$ ruby port_scanner.rb

There you have it!

Limits?

Verifying / Filtering Output

$ ruby port_scanner.rb | wc -l 
1024
$ ruby port_scanner.rb | grep "Open"
$ ruby port_scanner.rb | grep "Closed"

Kent Gruber

Written by

Information Security Research & Development

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade