summaryrefslogtreecommitdiff
path: root/lib/worker.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/worker.py')
-rw-r--r--lib/worker.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/worker.py b/lib/worker.py
index f8d6c55..8caf905 100644
--- a/lib/worker.py
+++ b/lib/worker.py
@@ -7,7 +7,7 @@ logger = logging.getLogger(__name__)
class Worker(Thread):
- def __init__(self, name, host, opened=None, concurrency=None, timeout=None):
+ def __init__(self, name, host, opened=None, ignore=None, concurrency=None, timeout=None):
Thread.__init__(self)
assert concurrency is not None
@@ -16,6 +16,7 @@ class Worker(Thread):
self.name = name
self.concurrency = concurrency
self.opened = opened
+ self.ignore = ignore
scanner_kw = {}
if timeout is not None:
@@ -32,7 +33,7 @@ class Worker(Thread):
return self.scanner.results
def is_expected(self, port):
- return (self.opened is not None) and (port in self.opened)
+ return ((self.opened is not None) and (port in self.opened)) or ((self.ignore is not None) and (port in self.ignore))
def get_host(self):
return self.scanner.host