mirror of https://github.com/MISP/misp-modules
pull/96/head
parent
2651e68238
commit
68250094ff
|
@ -1,7 +1,7 @@
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
BASEurl = "https://api.xforce.ibmcloud.com/"
|
BASEurl = "https://api.xforce.ibmcloud.com/"
|
||||||
|
|
||||||
extensions = {"ip1": "ipr/%s",
|
extensions = {"ip1": "ipr/%s",
|
||||||
|
@ -69,12 +69,12 @@ def handler(q=False):
|
||||||
return r
|
return r
|
||||||
|
|
||||||
def apicall(indicator_type, indicator, key=False):
|
def apicall(indicator_type, indicator, key=False):
|
||||||
#try:
|
try:
|
||||||
myURL = BASEurl + (extensions[str(indicator_type)])%indicator
|
myURL = BASEurl + (extensions[str(indicator_type)])%indicator
|
||||||
jsondata = requests.get(myURL, headers=MyHeader(key)).json()
|
jsondata = requests.get(myURL, headers=MyHeader(key)).json()
|
||||||
#except:
|
except:
|
||||||
#return None
|
return None
|
||||||
return jsondata
|
return jsondata
|
||||||
|
|
||||||
def introspection():
|
def introspection():
|
||||||
return mispattributes
|
return mispattributes
|
||||||
|
|
Loading…
Reference in New Issue