Skip to content

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

Hashing utility function.

Steve4c5cc65b95ab
diff --git a/sflib.py b/sflib.py
index 5c999c6b..d8b506c1 100644
--- a/sflib.py
+++ b/sflib.py
@@ -348,6 +348,10 @@ class SpiderFoot:
return os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
+ def hashstring(self, string):
+ s = string.encode('raw_unicode_escape')
+ return hashlib.sha256(s).hexdigest()
+
#
# Caching
#