Squashed commit of the following:

commit 79fff5332ba74bab40d0059e1051ca62614488ff
Merge: 645f25f 39c9fa4
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:46:09 2016 +0000

    Merge branch 'configparser' of https://github.com/micheloosterhof/cowrie into configparser

commit 645f25f6f22dbe374b544f08d69b7de2ef0dcb45
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:37:46 2016 +0000

    rewrite code for prompt. this had issues with unicode

commit 99adf95f27ef03b229e592f1fa393cf66be3faf0
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:15:10 2016 +0000

    can't use "mode"

commit bee2b6693fe009d361a0b117c67d11f37ed21c41
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:09:57 2016 +0000

    configparser changes. not working well yet on py2

commit 39c9fa406cca9ede51af8329280af81fff870e31
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:37:46 2016 +0000

    rewrite code for prompt. this had issues with unicode

commit 3dd08206fcb4c7dd0a66d20b914e3279947c77de
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:15:10 2016 +0000

    can't use "mode"

commit f54272b239409b65ef0292ac328b0a2efccbe6cd
Author: Michel Oosterhof <michel@oosterhof.net>
Date:   Sun Sep 18 14:09:57 2016 +0000

    configparser changes. not working well yet on py2
This commit is contained in:
Michel Oosterhof
2016-09-18 14:51:02 +00:00
parent 0a1d259cdc
commit f388b76937
4 changed files with 28 additions and 32 deletions

View File

@ -111,9 +111,9 @@ class CowrieServiceMaker(object):
if options['port'] != 0:
listen_ssh_port = int(options["port"])
elif cfg.has_option('ssh', 'listen_port'):
listen_ssh_port = int(cfg.get('ssh', 'listen_port'))
listen_ssh_port = cfg.getint('ssh', 'listen_port')
elif cfg.has_option('honeypot', 'listen_port'):
listen_ssh_port = int(cfg.get('honeypot', 'listen_port'))
listen_ssh_port = cfg.getint('honeypot', 'listen_port')
else:
listen_ssh_port = 2222
@ -133,7 +133,7 @@ class CowrieServiceMaker(object):
# Preference: 1, config, 2, default of 2223
if cfg.has_option('telnet', 'listen_port'):
listen_telnet_port = int(cfg.get('telnet', 'listen_port'))
listen_telnet_port = cfg.getint('telnet', 'listen_port')
else:
listen_telnet_port = 2223