Skip to content

Instantly share code, notes, and snippets.

@picatz
Created July 8, 2017 23:42
Show Gist options
  • Save picatz/6ffbc8587d7bf2281ab1113093b8be6d to your computer and use it in GitHub Desktop.
Save picatz/6ffbc8587d7bf2281ab1113093b8be6d to your computer and use it in GitHub Desktop.
Thread Pool'd Port Scanner Base Class
# previous code...
class PortScanner
def initialize(host:, ports: (1..1024))
@host = host
@ports = ports
@semaphore = Mutex.new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment