!isupraw -> !tcpup

This commit is contained in:
jesopo 2019-10-08 16:02:29 +01:00
parent ee64bfc5fc
commit 921e59e0f8

View file

@ -28,11 +28,11 @@ class Module(ModuleManager.BaseModule):
event["stdout"].write("%s looks up to me (HTTP %d)" % event["stdout"].write("%s looks up to me (HTTP %d)" %
(url, response.code)) (url, response.code))
@utils.hook("received.command.isupraw") @utils.hook("received.command.tcpup")
@utils.kwarg("min_args", 1) @utils.kwarg("min_args", 1)
@utils.kwarg("help", "Check if a given hostname:port is up or not") @utils.kwarg("help", "Check if a given hostname:port is up or not")
@utils.kwarg("usage", "<hostname>[:port]") @utils.kwarg("usage", "<hostname>[:port]")
def isupraw(self, event): def tcpup(self, event):
hostname, _, port = event["args_split"][0].partition(":") hostname, _, port = event["args_split"][0].partition(":")
port = utils.parse.try_int(port or "80") port = utils.parse.try_int(port or "80")
if port == None: if port == None: