Files
kube-hunter/modules/discovery/dashboard.py
daniel_sagi a465c3f2eb 1. Changed order of modules and pacakges in directories.
2. Changed method of hidden stacking of event, to send self as an argument, by inheriting from "Hunter" class. where the publish acts as a proxy to the handler.
3. Added new way of categorizing events, while added an option to subscribe to a father event. if en event gets publish, if its father event is hooked, the hook will be triggered
4. Added a reporter in log/ which listens to parent events, meanwhile Vulnerability and OpenService were added. all logging will be made from reporter from now on
2018-05-27 17:45:34 +03:00

23 lines
571 B
Python

from ..types import Hunter
import requests
from ..events import handler
from ..events.types import KubeDashboardEvent, OpenPortEvent
@handler.subscribe(OpenPortEvent, predicate=lambda x: x.port == 30000)
class KubeDashboard(Hunter):
def __init__(self, event):
self.event = event
self.host = event.host
self.port = event.port
@property
def secure(self):
# TODO: insert logic for detremining a secure/insecure dashboard is there
return False
def execute(self):
self.publish_event(KubeDashboardEvent())