From 735f5b77dde97019ccff04458f9ab01a3acb71dc Mon Sep 17 00:00:00 2001 From: oriagmon Date: Mon, 22 Oct 2018 23:01:51 +0300 Subject: [PATCH] WIP, Got to go :) Only have to finish testing the *active hunters' --- src/modules/hunting/apiserver.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/hunting/apiserver.py b/src/modules/hunting/apiserver.py index 2ee9c0a..b43d49f 100644 --- a/src/modules/hunting/apiserver.py +++ b/src/modules/hunting/apiserver.py @@ -473,8 +473,6 @@ class AccessApiServerViaServiceAccountTokenActive(ActiveHunter): res = requests.post("https://{host}:{port}/api/v1/namespaces".format( host=self.event.host, port=self.event.port), verify=False, data=json_namespace, headers=headers) - print res.status_code - print res.content if res.status_code not in [200, 201, 202]: return False parsed_content = json.loads(res.content.replace('\'', '\"')) self.created_new_namespace_name_evidence = parsed_content['metadata']['namespace'] @@ -497,6 +495,7 @@ class AccessApiServerViaServiceAccountTokenActive(ActiveHunter): return True def create_a_cluster_role(self): + #TODO: data={clusterrole json} try: res = requests.post("https://{host}:{port}/apis/rbac.authorization.k8s.io/v1/clusterroles".format( host=self.event.host, port=self.event.port),