From 03b81a9b8f6e349ec7c630ba2ee82166c42da0f0 Mon Sep 17 00:00:00 2001 From: daniel_sagi Date: Thu, 16 Aug 2018 19:03:16 +0300 Subject: [PATCH 1/2] added an error message when runnning container without -it --- kube-hunter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kube-hunter.py b/kube-hunter.py index a1f55f3..9403e9f 100755 --- a/kube-hunter.py +++ b/kube-hunter.py @@ -102,6 +102,8 @@ def main(): handler.join() except KeyboardInterrupt: logging.debug("Kube-Hunter stopped by user") + except EOFError: + logging.error("\033[0;31mPlease run again with -it\033[0m") finally: if hunt_started: handler.publish_event(HuntFinished()) From db7e05475363bc811170dcc190992db65cba80e9 Mon Sep 17 00:00:00 2001 From: danielsagi Date: Thu, 16 Aug 2018 19:11:36 +0300 Subject: [PATCH 2/2] added comment --- kube-hunter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kube-hunter.py b/kube-hunter.py index 9403e9f..bb12489 100755 --- a/kube-hunter.py +++ b/kube-hunter.py @@ -102,6 +102,7 @@ def main(): handler.join() except KeyboardInterrupt: logging.debug("Kube-Hunter stopped by user") + # happens when running a container without interactive option except EOFError: logging.error("\033[0;31mPlease run again with -it\033[0m") finally: @@ -115,4 +116,4 @@ def main(): while True: time.sleep(5) if __name__ == '__main__': - main() \ No newline at end of file + main()