moved all start status logging to the default module

This commit is contained in:
daniel_sagi
2018-07-23 16:45:13 +03:00
parent df07aa2017
commit 4e988dca38
3 changed files with 13 additions and 6 deletions

View File

@@ -65,7 +65,6 @@ def main():
if not any(scan_options):
if not interactive_set_config(): return
logging.info("~ Started")
hunt_started = True
handler.publish_event(HuntStarted())
handler.publish_event(HostScanEvent())

View File

@@ -8,7 +8,7 @@ from prettytable import ALL, PrettyTable
from __main__ import config
from src.core.events import handler
from src.core.events.types import Service, Vulnerability, HuntFinished
from src.core.events.types import Service, Vulnerability, HuntFinished, HuntStarted
# [event, ...]
services = list()
@@ -97,7 +97,17 @@ class SendFullReport(object):
self.event = event
def execute(self):
logging.info("\nReport:\n{div}\n{tables}".format(div="-" * MAX_TABLE_WIDTH, tables=reporter.get_tables()))
logging.info("\n{div}\n{tables}".format(div="-" * 10, tables=reporter.get_tables()))
@handler.subscribe(HuntStarted)
class StartedInfo(object):
def __init__(self, event):
self.event = event
def execute(self):
logging.info("~ Started")
logging.info("~ Discovering Open Kubernetes Services...")
""" Tables Generation """

View File

@@ -47,9 +47,7 @@ class HostDiscovery(Hunter):
def __init__(self, event):
self.event = event
def execute(self):
logging.info("~ Discovering Open Kubernetes Services...")
def execute(self):
if config.cidr:
try:
ip, sn = config.cidr.split('/')