mirror of https://github.com/MISP/misp-modules
updated
parent
c32d772275
commit
d3d772a225
|
@ -16,20 +16,20 @@ moduleinfo = {
|
||||||
moduleconfig = ['apiKey']
|
moduleconfig = ['apiKey']
|
||||||
|
|
||||||
_IPGEO_MAPPING ={
|
_IPGEO_MAPPING ={
|
||||||
'isp':'ISP',
|
'isp':'ISP',
|
||||||
'asn':'asn',
|
'asn':'asn',
|
||||||
'city':'city',
|
'city':'city',
|
||||||
'country_name':'country',
|
'country_name':'country',
|
||||||
'country_code2':'country-code',
|
'country_code2':'country-code',
|
||||||
'latitude':'latitude',
|
'latitude':'latitude',
|
||||||
'longitude':'longitude',
|
'longitude':'longitude',
|
||||||
'organization':'organization',
|
'organization':'organization',
|
||||||
'continent_name':'region',
|
'continent_name':'region',
|
||||||
'continent_code':'region-code',
|
'continent_code':'region-code',
|
||||||
'state_prov':'state',
|
'state_prov':'state',
|
||||||
'zipcode':'zipcode',
|
'zipcode':'zipcode',
|
||||||
'ip':'ip-src'
|
'ip':'ip-src'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def handler(q=False):
|
def handler(q=False):
|
||||||
|
@ -37,7 +37,7 @@ def handler(q=False):
|
||||||
if q is False:
|
if q is False:
|
||||||
return False
|
return False
|
||||||
request = json.loads(q)
|
request = json.loads(q)
|
||||||
if not request.get('config'):
|
if request.get('config'):
|
||||||
return {'error' : 'IpGeolocation Configuration is missing'}
|
return {'error' : 'IpGeolocation Configuration is missing'}
|
||||||
if not request['config'].get('apiKey'):
|
if not request['config'].get('apiKey'):
|
||||||
return {'error' : 'IpGeolocation apiKey is missing'}
|
return {'error' : 'IpGeolocation apiKey is missing'}
|
||||||
|
|
Loading…
Reference in New Issue