From f941c9c5fc7b8a9e6bec0d3e5633aed9376f504d Mon Sep 17 00:00:00 2001 From: VakarisZ <vakarisz@yahoo.com> Date: Thu, 21 May 2020 10:57:18 +0300 Subject: [PATCH] Added port not null check on island resource --- .../cc/resources/monkey_control/remote_port_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/resources/monkey_control/remote_port_check.py b/monkey/monkey_island/cc/resources/monkey_control/remote_port_check.py index d10ad067c..06e49b145 100644 --- a/monkey/monkey_island/cc/resources/monkey_control/remote_port_check.py +++ b/monkey/monkey_island/cc/resources/monkey_control/remote_port_check.py @@ -8,7 +8,7 @@ class RemotePortCheck(flask_restful.Resource): # Used by monkey. can't secure. def get(self, port): - if check_tcp_port(request.remote_addr, port): + if port and check_tcp_port(request.remote_addr, port): return {"status": "port_visible"} else: return {"status": "port_invisible"}