SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Exception handling in phonenumber
Krishnasis Mandalc3d6ed9a71f1
diff --git a/modules/sfp_countryname.py b/modules/sfp_countryname.pyindex 9f6471e8..7054d1b1 100644--- a/modules/sfp_countryname.py+++ b/modules/sfp_countryname.py@@ -168,10 +168,11 @@ class sfp_countryname(SpiderFootPlugin):# Get dictionary of country codes and country namesabbvCountryCodes = self.getCountryCodeDict()- # Parse source phone nummber- phoneNumber = phonenumbers.parse(srcPhoneNumber)# Check if country code is present in the phone numbertry:+ # Parse source phone nummber+ phoneNumber = phonenumbers.parse(srcPhoneNumber)+ # Get country code of phone numbercountryCode = region_code_for_country_code(phoneNumber.country_code)# try block handles key not found exceptionreturn abbvCountryCodes[countryCode.upper()]