SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Close files after read
Brendan Coles1dde235d1297
diff --git a/sflib.py b/sflib.pyindex e42f40ec..22c7a8f4 100644--- a/sflib.py+++ b/sflib.py@@ -105,6 +105,7 @@ class SpiderFoot:try:self.info("Loading configuration data from: " + fname)f = open(fname, "r")+if splitLines:arr = f.readlines()ret = list()@@ -112,6 +113,8 @@ class SpiderFoot:ret.append(x.rstrip('\n'))else:ret = f.read()++ f.close()return retexcept BaseException as b:if fatal:@@ -849,6 +852,7 @@ class SpiderFoot:try:wdct = open(self.myPath() + "/dicts/ispell/" + d + ".dict", 'r')dlines = wdct.readlines()+ wdct.close()except BaseException as e:self.debug("Could not read dictionary: " + str(e))continue@@ -869,6 +873,7 @@ class SpiderFoot:try:wdct = open(self.myPath() + "/dicts/ispell/" + d + ".dict", 'r')dlines = wdct.readlines()+ wdct.close()except BaseException as e:self.debug("Could not read dictionary: " + str(e))continue