From 81b53b96520055b6e6b530ef854c409c5388bc51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Ure=C3=B1a?= Date: Thu, 17 Nov 2022 11:18:13 -0400 Subject: [PATCH] Modify remove_credentials to allow "creds remove" `creds remove CredID` was not working because the method was commented on, I also changed the table name from credentials to users. --- cme/protocols/smb/database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cme/protocols/smb/database.py b/cme/protocols/smb/database.py index 7c6c5960..8d2fa275 100755 --- a/cme/protocols/smb/database.py +++ b/cme/protocols/smb/database.py @@ -271,16 +271,16 @@ class database: logging.debug('add_group(domain={}, name={}) => {}'.format(domain, name, cur.lastrowid)) return cur.lastrowid - ''' + def remove_credentials(self, credIDs): """ Removes a credential ID from the database """ for credID in credIDs: cur = self.conn.cursor() - cur.execute("DELETE FROM credentials WHERE id=?", [credID]) + cur.execute("DELETE FROM users WHERE id=?", [credID]) cur.close() - ''' + def add_admin_user(self, credtype, domain, username, password, host, userid=None): domain = domain.split('.')[0].upper()