cowrie/kippo/core/config.py

16 lines
374 B
Python
Raw Normal View History

2014-08-09 20:48:34 +00:00
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
2014-11-11 17:27:06 +00:00
import os
import ConfigParser
def config():
cfg = ConfigParser.ConfigParser()
for f in ('kippo.cfg', '/etc/kippo/kippo.cfg', '/etc/kippo.cfg'):
if os.path.exists(f):
cfg.read(f)
return cfg
return None
# vim: set sw=4 et: