From 30435f2348aad8d038e3a08213ff40fbe459ea5a Mon Sep 17 00:00:00 2001 From: "ori.agmon" Date: Mon, 8 Oct 2018 15:45:23 +0300 Subject: [PATCH] Fixed some english mistakes & :-) --- src/modules/discovery/hosts.py | 6 +++--- src/modules/discovery/kubelet.py | 2 +- src/modules/discovery/ports.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/discovery/hosts.py b/src/modules/discovery/hosts.py index 352f433..bdc6b39 100644 --- a/src/modules/discovery/hosts.py +++ b/src/modules/discovery/hosts.py @@ -73,7 +73,7 @@ class HostDiscovery(Hunter): def get_cloud(self, host): try: - logging.debug("Passive hunter is attempting to access azure's cloud") + logging.debug("Passive hunter is checking whether the cluster is deployed on azure's cloud") metadata = requests.get("http://www.azurespeed.com/api/region?ipOrUrl={ip}".format(ip=host)).text except requests.ConnectionError as e: logging.info("- unable to check cloud: {0}".format(e)) @@ -83,7 +83,7 @@ class HostDiscovery(Hunter): def is_azure_pod(self): try: - logging.debug("Passive hunter is attempting to access azure's pod") + logging.debug("Attempting to access Azure Metadata API") if requests.get("http://169.254.169.254/metadata/instance?api-version=2017-08-01", headers={"Metadata":"true"}, timeout=5).status_code == 200: return True except requests.exceptions.ConnectionError: @@ -114,7 +114,7 @@ class HostDiscovery(Hunter): # for normal scanning def scan_interfaces(self): try: - logging.debug("Passive hunter is attempting to scan interfaces") + logging.debug("Passive hunter is attempting to get external IP address") external_ip = requests.get("http://canhazip.com").text # getting external ip, to determine if cloud cluster except requests.ConnectionError as e: logging.debug("unable to determine local IP address: {0}".format(e)) diff --git a/src/modules/discovery/kubelet.py b/src/modules/discovery/kubelet.py index 572eb0c..ecf39b6 100644 --- a/src/modules/discovery/kubelet.py +++ b/src/modules/discovery/kubelet.py @@ -55,7 +55,7 @@ class KubeletDiscovery(Hunter): self.publish_event(SecureKubeletEvent(secure=True, anonymous_auth=False)) def ping_kubelet(self): - logging.debug("Attempting to ping kubelet") + logging.debug("Attempting to get pod info from kubelet") try: return requests.get("https://{host}:{port}/pods".format(host=self.event.host, port=self.event.port), verify=False).status_code except Exception as ex: diff --git a/src/modules/discovery/ports.py b/src/modules/discovery/ports.py index d4e6aaf..73e2804 100644 --- a/src/modules/discovery/ports.py +++ b/src/modules/discovery/ports.py @@ -20,7 +20,7 @@ class PortDiscovery(Hunter): self.port = event.port def execute(self): - logging.debug("host {0} try reach ports: {1}".format(self.host, default_ports)) + logging.debug("host {0} try ports: {1}".format(self.host, default_ports)) for single_port in default_ports: if self.test_connection(self.host, single_port): logging.debug("Reachable port found: {0}".format(single_port))