mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-10 11:17:05 +00:00
moved all start status logging to the default module
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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 """
|
||||
|
||||
@@ -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('/')
|
||||
|
||||
Reference in New Issue
Block a user