Skip to content

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

Unicode handling bug fix.

Stevedf448a245b66
diff --git a/sflib.py b/sflib.py
index 07b3c09e..4cf10389 100644
--- a/sflib.py
+++ b/sflib.py
@@ -370,8 +370,9 @@ class SpiderFoot:
def hashstring(self, string):
if type(string) in [list, dict]:
- string = str(string)
- s = string.encode('raw_unicode_escape', errors='replace')
+ s = str(string)
+ if type(string) != unicode:
+ s = string.encode('raw_unicode_escape', errors='replace')
return hashlib.sha256(s).hexdigest()
#