Add meaningful message for services that are not yet implemented.

This commit is contained in:
Klaus-Uwe Mitterer 2016-07-18 22:21:32 +02:00
parent b678777f06
commit 3690c8ec95

View file

@ -53,7 +53,7 @@ class TCPHandler(socketserver.StreamRequestHandler):
elif command in ("heartbeat", "hb", "ping"): elif command in ("heartbeat", "hb", "ping"):
return "OK: Still here? Wow." return "OK: Still here? Wow."
elif command in ("stat", "status"): elif command in ("stat", "status"):
return False return "UA: Not currently implemented."
elif command in ("ssl", "tls"): elif command in ("ssl", "tls"):
try: try:
if listIncluded(str(content[1]), SSL): if listIncluded(str(content[1]), SSL):
@ -69,11 +69,11 @@ class TCPHandler(socketserver.StreamRequestHandler):
except: except:
return "ER: Could not verify SSL certificate on %s:%i. Is the server down?" % (content[1], content[2]) return "ER: Could not verify SSL certificate on %s:%i. Is the server down?" % (content[1], content[2])
elif command == "port": elif command == "port":
return False return "UA: Not currently implemented."
elif command in ("req", "request"): elif command in ("req", "request"):
return "NI: Requesting monitoring is not yet implemented." return "NI: Requesting monitoring is not yet implemented."
elif command == "help": elif command == "help":
return False return "UA: Not currently implemented."
else: else:
return "IM: Unknown command %s." % command return "IM: Unknown command %s." % command
# except TypeError: # except TypeError: