now use both cowrie.cfg.dist and cowrie.cfg

This commit is contained in:
Michel Oosterhof 2017-05-17 16:28:13 +04:00
parent 978ad31541
commit 1158a1a55e
3 changed files with 16 additions and 9 deletions

View File

@ -1,4 +1,4 @@
* 2017-05-16 now reads config files: etc/system/cowrie.cfg cowrie.cfg and etc/local/cowrie.cfg in this order
* 2017-05-16 now combines config files: cowrie.cfg.dist and cowrie.cfg in this order
* 2017-05-09 start.sh and stop.sh have been replace by bin/cowrie start|stop
* 2017-04-27 New syntax "listen_endpoints" for configuring listening IP addresses/portnumbers
* 2017-03-15 SSH Forwarding/SFTP/keys/version config have been moved to [ssh]. Change your config file!

View File

@ -80,9 +80,16 @@ $ source cowrie-env/bin/activate
## Step 5: Install configuration file
Take a look at the configuration file and make changes as desired. The defaults work well in most cases.
The configuration for Cowrie is stored in cowrie.cfg.dist and
cowrie.cfg. Both files are read, where entries from cowrie.cfg take
precedence. The .dist file can be overwritten on upgrades, cowrie.cfg
will not be changed. To run with a standard configuration, there
is no need to change anything. To enable telnet, for example, create
cowrie.cfg and input only the following:
```
$ cp cowrie.cfg.dist cowrie.cfg
[telnet]
enabled = true
```
## Step 6: Generate a DSA key

View File

@ -118,7 +118,7 @@ Makes a Cowrie SSH/Telnet honeypot.
print('ERROR: You must not run cowrie as root!')
sys.exit(1)
cfg = readConfigFile(("etc/default/cowrie.cfg","cowrie.cfg","etc/local/cowrie.cfg"))
cfg = readConfigFile(("cowrie.cfg.dist","cowrie.cfg"))
# ssh is enabled by default
if cfg.has_option('ssh', 'enabled') == False or \