Skip to content

Bug: STIX1toMISPParser doesn't work at all #40

Description

@maciej-lech

MISP-STIX usage

No response

Expected behavior

Function stix_1_to_misp converts STIX1 to MISP as the main script allows setting STIX1 version:

parser.add_argument('-v', '--version', choices=['1.1.1', '1.2', '2.0', '2.1'], required=True, help='STIX version.')

Actual behavior

It uses:

stix_parser.load_event()
stix_parser.build_misp_event(event)

... but both methods are undefined, so the implementation is completely missing.
However, it fails even prior to that with: TypeError: descriptor '__init__' of 'super' object needs an argument

Steps to reproduce

Run misp_stix_converter -i -v 1.2 -f ../../example_stix1.xml

Version

2.4.168

Python version

3.8

Relevant log output

Traceback (most recent call last):
  File "./ve/bin/misp_stix_converter", line 8, in <module>
    sys.exit(main())
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/__init__.py", line 174, in main
    results = _misp_to_stix(stix_args) if stix_args.export else _stix_to_misp(stix_args)
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/__init__.py", line 150, in _stix_to_misp
    return _process_files(stix_args.file, method)
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/__init__.py", line 137, in _process_files
    status = method(filename)
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/misp_stix_converter.py", line 440, in stix_1_to_misp
    stix_parser = InternalSTIX1toMISPParser() if from_misp else ExternalSTIX1toMISPParser()
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/stix2misp/external_stix1_to_misp.py", line 9, in __init__
    super().__init__()
  File "./ve/lib/python3.8/site-packages/misp_stix_converter/stix2misp/stix1_to_misp.py", line 9, in __init__
    super.__init__()
TypeError: descriptor '__init__' of 'super' object needs an argument

Extra attachments

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions