Finished with the left of the PR comments.

This commit is contained in:
oriagmon
2018-10-21 10:53:50 +03:00
parent 7e324c5374
commit 76692a36d7
4 changed files with 0 additions and 11 deletions

View File

@@ -93,15 +93,11 @@ def list_hunters():
global hunt_started_lock
hunt_started_lock = threading.Lock()
hunt_started_lock.acquire()
hunt_started = False
hunt_started_lock.release()
def main():
hunt_started_lock.acquire()
global hunt_started
hunt_started_lock.release()
scan_options = [
config.pod,
config.cidr,

View File

@@ -77,9 +77,7 @@ event_id_count_lock.release()
class NewHostEvent(Event):
def __init__(self, host, cloud=None):
event_id_count_lock.acquire()
global event_id_count
event_id_count_lock.release()
self.host = host
self.cloud = cloud
event_id_count_lock.acquire()

View File

@@ -48,12 +48,8 @@ class Collector(object):
def execute(self):
"""function is called only when collecting data"""
services_lock.acquire()
global services
services_lock.release()
vulnerabilities_lock.acquire()
global vulnerabilities
vulnerabilities_lock.release()
bases = self.event.__class__.__mro__
if Service in bases:
services_lock.acquire()

View File

@@ -4,7 +4,6 @@ from prettytable import ALL, PrettyTable
from __main__ import config
from collector import services, vulnerabilities,services_lock, vulnerabilities_lock
import threading
EVIDENCE_PREVIEW = 40
MAX_TABLE_WIDTH = 20