Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Object' object has no attribute 'url' in virustotal #677

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

cudeso
Copy link
Contributor

@cudeso cudeso commented Aug 2, 2024

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'

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_mapping[self.attribute.type](self.attribute.value)
  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'
@adulau adulau merged commit f0c56ad into MISP:main Aug 2, 2024
3 of 5 checks passed
@adulau
Copy link
Member

adulau commented Aug 2, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants