SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Removed spaces from incoming data source
Krishnasis Mandal86389e943973
diff --git a/modules/sfp_creditcard.py b/modules/sfp_creditcard.pyindex 40255e9f..d2f952e5 100644--- a/modules/sfp_creditcard.py+++ b/modules/sfp_creditcard.py@@ -44,7 +44,6 @@ class sfp_creditcard(SpiderFootPlugin):self.opts[opt] = userOpts[opt]# What events is this module interested in for input- # For a list of all events, check sfdb.py.def watchedEvents(self):return ["TARGET_WEB_CONTENT"]@@ -67,6 +66,7 @@ class sfp_creditcard(SpiderFootPlugin):# event was received.self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)+ # Extract Credit Card numberscreditCards=self.sf.parseCreditCards(eventData)myres=list()diff --git a/sflib.py b/sflib.pyindex 497377fe..d69ee491 100644--- a/sflib.py+++ b/sflib.py@@ -1112,7 +1112,13 @@ class SpiderFoot:## Returns a listdef parseCreditCards(self,data):- creditCards = set()+ creditCards = set()++ # Remove whitespace from data.+ # Credit cards might contain spaces between them..+ # ..which will cause the regex to fail+ data = data.replace(" ","")+# Extract all numbers with lengths ranging from 13 - 19 digitspossibleCCRegex = "\d{13,19}"matches = re.findall(possibleCCRegex,data)