mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-17 05:54:21 +01:00
remove 'port' parameter, no longer makes sense since we also run telnet
This commit is contained in:
@@ -57,7 +57,6 @@ class Options(usage.Options):
|
|||||||
FIXME: Docstring
|
FIXME: Docstring
|
||||||
"""
|
"""
|
||||||
optParameters = [
|
optParameters = [
|
||||||
["port", "p", 0, "The port number to listen on for SSH.", int],
|
|
||||||
["config", "c", 'cowrie.cfg', "The configuration file to use."]
|
["config", "c", 'cowrie.cfg', "The configuration file to use."]
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -175,10 +174,8 @@ class CowrieServiceMaker(object):
|
|||||||
else:
|
else:
|
||||||
listen_ssh_addr = '0.0.0.0'
|
listen_ssh_addr = '0.0.0.0'
|
||||||
|
|
||||||
# Preference: 1, option, 2, config, 3, default of 2222
|
# Preference: 1: config, 2: default of 2222
|
||||||
if options['port'] != 0:
|
if cfg.has_option('ssh', 'listen_port'):
|
||||||
listen_ssh_port = int(options["port"])
|
|
||||||
elif cfg.has_option('ssh', 'listen_port'):
|
|
||||||
listen_ssh_port = cfg.getint('ssh', 'listen_port')
|
listen_ssh_port = cfg.getint('ssh', 'listen_port')
|
||||||
elif cfg.has_option('honeypot', 'listen_port'):
|
elif cfg.has_option('honeypot', 'listen_port'):
|
||||||
listen_ssh_port = cfg.getint('honeypot', 'listen_port')
|
listen_ssh_port = cfg.getint('honeypot', 'listen_port')
|
||||||
|
|||||||
Reference in New Issue
Block a user