Update countrycode.py

pull/194/head
Andras Iklody 4 years ago committed by GitHub
parent 1e1e694169
commit 0b0f57b30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      misp_modules/modules/expansion/countrycode.py

@ -20,10 +20,12 @@ common_tlds = {"com":"Commercial (Worldwide)",
"gov":"Government (USA)"
}
codes = requests.get("http://www.geognos.com/api/en/countries/info/all.json").json()
codes = False
def handler(q=False):
global codes
if not codes:
codes = requests.get("http://www.geognos.com/api/en/countries/info/all.json").json()
if q is False:
return False
request = json.loads(q)

Loading…
Cancel
Save