diff --git a/examples/get_csv.py b/examples/get_csv.py index 5921e53..d7b5b0a 100755 --- a/examples/get_csv.py +++ b/examples/get_csv.py @@ -9,6 +9,7 @@ from keys import misp_url, misp_key, misp_verifycert if __name__ == '__main__': parser = argparse.ArgumentParser(description='Get MISP stuff as CSV.') + parser.add_argument("--controller", default='attributes', help="Attribute to use for the search (events, objects, attributes)") parser.add_argument("-e", "--event_id", help="Event ID to fetch. Without it, it will fetch the whole database.") parser.add_argument("-a", "--attribute", nargs='+', help="Attribute column names") parser.add_argument("-o", "--object_attribute", nargs='+', help="Object attribute column names") @@ -26,7 +27,7 @@ if __name__ == '__main__': if not attr: attr = None print(args.context) - response = pymisp.search(return_format='csv', eventid=args.event_id, requested_attributes=attr, + response = pymisp.search(return_format='csv', controller=args.controller, eventid=args.event_id, requested_attributes=attr, type_attribute=args.misp_types, include_context=args.context) if args.outfile: diff --git a/pymisp/tools/urlobject.py b/pymisp/tools/urlobject.py index f6bf969..ce1f70f 100644 --- a/pymisp/tools/urlobject.py +++ b/pymisp/tools/urlobject.py @@ -14,9 +14,7 @@ faup = Faup() class URLObject(AbstractMISPObjectGenerator): def __init__(self, url: str, **kwargs): - # PY3 way: - # super().__init__('file') - super(URLObject, self).__init__('url', **kwargs) + super().__init__('url', **kwargs) faup.decode(unquote_plus(url)) self.generate_attributes()