Fix 'Object' object has no attribute 'url' in virustotal #677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix
File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/init.py", line 210, in run_request
response = module.handler(q=json_payload)
File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/modules/expansion/virustotal_public.py", line 248, in handler
parser.query_api(attribute)
File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/modules/expansion/virustotal_public.py", line 46, in query_api
self.input_types_mappingself.attribute.type
File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/modules/expansion/virustotal_public.py", line 143, in parse_hash
related_file_object = self.create_misp_object(related_file)
File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/modules/expansion/virustotal_public.py", line 83, in create_misp_object
misp_object.add_attribute('Url', type='url', value=report.url)
File "/var/www/MISP/venv/lib/python3.8/site-packages/vt/object.py", line 160, in getattribute
value = super().getattribute(attr)
AttributeError: 'Object' object has no attribute 'url'