Skip to content

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

sfp_iban: Cleanup (#1359)

bcolesa0ec132654b1
diff --git a/modules/sfp_iban.py b/modules/sfp_iban.py
index 76df3728..3bc4a667 100644
--- a/modules/sfp_iban.py
+++ b/modules/sfp_iban.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_iban
-# Purpose: SpiderFoot plug-in for scanning retreived content by other
-# modules (such as sfp_spider) and identifying IBAN numbers.
+# Purpose: SpiderFoot plug-in for scanning retrieved content by other
+# modules (such as sfp_spider) and identifying IBANs.
#
# Author: Krishnasis Mandal <[email protected]>
#
@@ -18,30 +18,24 @@ class sfp_iban(SpiderFootPlugin):
meta = {
'name': "IBAN Number Extractor",
- 'summary': "Identify IBAN Numbers in any data",
+ 'summary': "Identify International Bank Account Numbers (IBANs) in any data.",
'flags': ["errorprone"],
'useCases': ["Footprint", "Investigate", "Passive"],
'categories': ["Content Analysis"]
}
- # Default options.
opts = {
}
- # Option descriptions.
optdescs = {
}
- # Tracking results can be helpful to avoid reporting/processing duplicates
results = None
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
self.results = self.tempStorage()
- # Clear / reset any other class member variables here
- # or you risk them persisting between threads.
-
# Override datasource for sfp_iban module
self.__dataSource__ = "Target Website"
@@ -65,21 +59,10 @@ class sfp_iban(SpiderFootPlugin):
self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")
- # Extract IBAN Card numbers
ibanNumbers = self.sf.parseIBANNumbers(eventData)
-
- myres = list()
- for ibanNumber in ibanNumbers:
- evttype = "IBAN_NUMBER"
-
- self.sf.info("Found IBAN number : " + ibanNumber)
-
- if ibanNumber in myres:
- self.sf.debug("Already found from this source")
- continue
- myres.append(ibanNumber)
-
- evt = SpiderFootEvent(evttype, ibanNumber, self.__name__, event)
+ for ibanNumber in set(ibanNumbers):
+ self.sf.info(f"Found IBAN number: {ibanNumber}")
+ evt = SpiderFootEvent("IBAN_NUMBER", ibanNumber, self.__name__, event)
if event.moduleDataSource:
evt.moduleDataSource = event.moduleDataSource
else: