Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Bug fix in hashstring().

Steve0de4da10ff0a
diff --git a/sflib.py b/sflib.py
index 994fd4f2..07b3c09e 100644
--- a/sflib.py
+++ b/sflib.py
@@ -369,9 +369,9 @@ class SpiderFoot:
return os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
def hashstring(self, string):
- if type(string) in [dict, list]:
+ if type(string) in [list, dict]:
string = str(string)
- s = string.encode('raw_unicode_escape')
+ s = string.encode('raw_unicode_escape', errors='replace')
return hashlib.sha256(s).hexdigest()
#