mirror of
https://github.com/lgandx/Responder.git
synced 2025-12-07 05:01:31 +00:00
Comments to explain use of cursor.text_factory
This commit is contained in:
1
utils.py
1
utils.py
@@ -166,6 +166,7 @@ def SaveToDb(result):
|
||||
logfile = os.path.join(settings.Config.ResponderPATH, 'logs', fname)
|
||||
|
||||
cursor = sqlite3.connect(settings.Config.DatabaseFile)
|
||||
# We add a text factory to support different charsets
|
||||
cursor.text_factory = sqlite3.Binary
|
||||
res = cursor.execute("SELECT COUNT(*) AS count FROM responder WHERE module=? AND type=? AND LOWER(user)=LOWER(?)", (result['module'], result['type'], result['user']))
|
||||
(count,) = res.fetchone()
|
||||
|
||||
Reference in New Issue
Block a user