Skip to content

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

Cleaner fix.

Steve50e3b8dcc076
diff --git a/sflib.py b/sflib.py
index d3b8de30..83a83d71 100644
--- a/sflib.py
+++ b/sflib.py
@@ -372,9 +372,8 @@ class SpiderFoot:
s = string
if type(string) in [list, dict]:
s = str(string)
- if type(string) != unicode:
- s = string.encode('raw_unicode_escape', errors='replace')
- return hashlib.sha256(s).hexdigest()
+ s = s.encode('utf-8', errors='replace')
+ return sha256(s).hexdigest()
#
# Caching