Read passwords as 'raw' data so they can contain %

This commit is contained in:
Michel Oosterhof
2018-03-07 10:58:50 +04:00
parent 11e677330e
commit 7d57dff367
4 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ class Output(cowrie.core.output.Output):
def __init__(self):
self.url_base = CONFIG.get('output_cuckoo', 'url_base').encode('utf-8')
self.api_user = CONFIG.get('output_cuckoo', 'user')
self.api_passwd = CONFIG.get('output_cuckoo', 'passwd')
self.api_passwd = CONFIG.get('output_cuckoo', 'passwd', raw=True)
self.cuckoo_force = int(CONFIG.getboolean('output_cuckoo', 'force'))
cowrie.core.output.Output.__init__(self)

View File

@ -45,7 +45,7 @@ class Output(cowrie.core.output.Output):
if (CONFIG.has_option('output_influx', 'username') and
CONFIG.has_option('output_influx', 'password')):
username = CONFIG.get('output_influx', 'username')
password = CONFIG.get('output_influx', 'password')
password = CONFIG.get('output_influx', 'password', raw=True)
self.client.switch_user(username, password)
try:

View File

@ -27,7 +27,7 @@ class Output(cowrie.core.output.Output):
self.port = CONFIG.getint(self.RETHINK_DB_SEGMENT, 'port')
self.db = CONFIG.get(self.RETHINK_DB_SEGMENT, 'db')
self.table = CONFIG.get(self.RETHINK_DB_SEGMENT, 'table')
self.password = CONFIG.get(self.RETHINK_DB_SEGMENT, 'password')
self.password = CONFIG.get(self.RETHINK_DB_SEGMENT, 'password', raw=True)
cowrie.core.output.Output.__init__(self)
# noinspection PyAttributeOutsideInit

View File

@ -31,7 +31,7 @@ class Output(cowrie.core.output.Output):
"""
self.index = CONFIG.get('output_splunklegacy', 'index')
self.username = CONFIG.get('output_splunklegacy', 'username')
self.password = CONFIG.get('output_splunklegacy', 'password')
self.password = CONFIG.get('output_splunklegacy', 'password', raw=True)
self.host = CONFIG.get('output_splunklegacy', 'host')
self.port = CONFIG.getint('output_splunklegacy', 'port')
cowrie.core.output.Output.__init__(self)