forked from p15670423/monkey
Added port not null check on island resource
This commit is contained in:
parent
ca1ee90385
commit
f941c9c5fc
|
@ -8,7 +8,7 @@ class RemotePortCheck(flask_restful.Resource):
|
||||||
|
|
||||||
# Used by monkey. can't secure.
|
# Used by monkey. can't secure.
|
||||||
def get(self, port):
|
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"}
|
return {"status": "port_visible"}
|
||||||
else:
|
else:
|
||||||
return {"status": "port_invisible"}
|
return {"status": "port_invisible"}
|
||||||
|
|
Loading…
Reference in New Issue