From 5ce54077865d2b2ec03fef385ae5a7e90eec5f42 Mon Sep 17 00:00:00 2001 From: "Remi GASCOU (Podalirius)" <79218792+p0dalirius@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:21:33 +0200 Subject: [PATCH] Improved Credentials structure --- smbclientng/core/Credentials.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/smbclientng/core/Credentials.py b/smbclientng/core/Credentials.py index 471fbde..e04fb92 100644 --- a/smbclientng/core/Credentials.py +++ b/smbclientng/core/Credentials.py @@ -20,10 +20,10 @@ class Credentials(object): username = None password = None # Hashes - nt_hex = None - nt_raw = None - lm_hex = None - lm_raw = None + nt_hex = "" + nt_raw = "" + lm_hex = "" + lm_raw = "" # Kerberos use_kerberos = False aesKey = None @@ -36,10 +36,10 @@ def __init__(self, domain, username, password, hashes=None, use_kerberos=False, self.username = username self.password = password # Hashes - self.nt_hex = None - self.nt_raw = None - self.lm_hex = None - self.lm_raw = None + self.nt_hex = "" + self.nt_raw = "" + self.lm_hex = "" + self.lm_raw = "" self.set_hashes(hashes=hashes) # Kerberos self.use_kerberos = use_kerberos @@ -59,10 +59,10 @@ def set_hashes(self, hashes): hashes (str): A string containing LM and NT hashes separated by a colon. """ - self.nt_hex = None - self.nt_raw = None - self.lm_hex = None - self.lm_raw = None + self.nt_hex = "" + self.nt_raw = "" + self.lm_hex = "" + self.lm_raw = "" lmhash, nthash = None, None if hashes is not None: