This commit is contained in:
Michel Oosterhof 2016-11-06 23:00:48 +04:00
parent 6d5deb2119
commit 2328bd5662
1 changed files with 2 additions and 3 deletions

View File

@ -52,9 +52,7 @@ class command_ping(HoneyPotCommand):
self.exit()
return
self.host = args[0].strip()
if not self.host:
if len(args)==0:
for l in (
'Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]',
' [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]',
@ -64,6 +62,7 @@ class command_ping(HoneyPotCommand):
self.write(l+'\n')
self.exit()
return
self.host = args[0].strip()
if re.match('^[0-9.]+$', self.host):
if self.valid_ip(self.host):