mirror of https://github.com/cowrie/cowrie.git
Fix #320
This commit is contained in:
parent
6d5deb2119
commit
2328bd5662
|
@ -52,9 +52,7 @@ class command_ping(HoneyPotCommand):
|
||||||
self.exit()
|
self.exit()
|
||||||
return
|
return
|
||||||
|
|
||||||
self.host = args[0].strip()
|
if len(args)==0:
|
||||||
|
|
||||||
if not self.host:
|
|
||||||
for l in (
|
for l in (
|
||||||
'Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]',
|
'Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]',
|
||||||
' [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]',
|
' [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]',
|
||||||
|
@ -64,6 +62,7 @@ class command_ping(HoneyPotCommand):
|
||||||
self.write(l+'\n')
|
self.write(l+'\n')
|
||||||
self.exit()
|
self.exit()
|
||||||
return
|
return
|
||||||
|
self.host = args[0].strip()
|
||||||
|
|
||||||
if re.match('^[0-9.]+$', self.host):
|
if re.match('^[0-9.]+$', self.host):
|
||||||
if self.valid_ip(self.host):
|
if self.valid_ip(self.host):
|
||||||
|
|
Loading…
Reference in New Issue