Created
July 8, 2017 23:42
-
-
Save picatz/6ffbc8587d7bf2281ab1113093b8be6d to your computer and use it in GitHub Desktop.
Thread Pool'd Port Scanner Base Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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