mirror of https://github.com/MISP/misp-modules
fix: Fixed introspection fields for csvimport & goamlimport
- Added format field for goaml so the module is known as returning MISP attributes & objects - Fixed introspection to make the format, user config and input source fields visible from MISP (format also added at the same time)pull/304/head
parent
db74c5f49a
commit
f900cb7c68
|
@ -12,7 +12,6 @@ moduleinfo = {'version': '0.1', 'author': 'Christian Studer',
|
||||||
'description': 'Import Attributes from a csv file.',
|
'description': 'Import Attributes from a csv file.',
|
||||||
'module-type': ['import']}
|
'module-type': ['import']}
|
||||||
moduleconfig = []
|
moduleconfig = []
|
||||||
inputSource = ['file']
|
|
||||||
userConfig = {'header': {
|
userConfig = {'header': {
|
||||||
'type': 'String',
|
'type': 'String',
|
||||||
'message': 'Define the header of the csv file, with types (included in MISP attribute types or attribute fields) separated by commas.\nFor fields that do not match these types, please use space or simply nothing between commas.\nFor instance: ip-src,domain, ,timestamp'},
|
'message': 'Define the header of the csv file, with types (included in MISP attribute types or attribute fields) separated by commas.\nFor fields that do not match these types, please use space or simply nothing between commas.\nFor instance: ip-src,domain, ,timestamp'},
|
||||||
|
@ -20,6 +19,7 @@ userConfig = {'header': {
|
||||||
'type': 'Boolean',
|
'type': 'Boolean',
|
||||||
'message': 'Tick this box ONLY if there is a header line, NOT COMMENTED, in the file (which will be skipped atm).'
|
'message': 'Tick this box ONLY if there is a header line, NOT COMMENTED, in the file (which will be skipped atm).'
|
||||||
}}
|
}}
|
||||||
|
mispattributes = {'userConfig': userConfig, 'inputSource': ['file'], 'format': 'misp_standard'}
|
||||||
|
|
||||||
duplicatedFields = {'mispType': {'mispComment': 'comment'},
|
duplicatedFields = {'mispType': {'mispComment': 'comment'},
|
||||||
'attrField': {'attrComment': 'comment'}}
|
'attrField': {'attrComment': 'comment'}}
|
||||||
|
@ -224,18 +224,7 @@ def handler(q=False):
|
||||||
|
|
||||||
|
|
||||||
def introspection():
|
def introspection():
|
||||||
modulesetup = {}
|
return mispattributes
|
||||||
try:
|
|
||||||
userConfig
|
|
||||||
modulesetup['userConfig'] = userConfig
|
|
||||||
except NameError:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
inputSource
|
|
||||||
modulesetup['inputSource'] = inputSource
|
|
||||||
except NameError:
|
|
||||||
pass
|
|
||||||
return modulesetup
|
|
||||||
|
|
||||||
|
|
||||||
def version():
|
def version():
|
||||||
|
|
|
@ -9,7 +9,8 @@ moduleinfo = {'version': 1, 'author': 'Christian Studer',
|
||||||
'description': 'Import from GoAML',
|
'description': 'Import from GoAML',
|
||||||
'module-type': ['import']}
|
'module-type': ['import']}
|
||||||
moduleconfig = []
|
moduleconfig = []
|
||||||
mispattributes = {'inputSource': ['file'], 'output': ['MISP objects']}
|
mispattributes = {'inputSource': ['file'], 'output': ['MISP objects'],
|
||||||
|
'format': 'misp_standard'}
|
||||||
|
|
||||||
t_from_objects = {'nodes': ['from_person', 'from_account', 'from_entity'],
|
t_from_objects = {'nodes': ['from_person', 'from_account', 'from_entity'],
|
||||||
'leaves': ['from_funds_code', 'from_country']}
|
'leaves': ['from_funds_code', 'from_country']}
|
||||||
|
|
Loading…
Reference in New Issue