mirror of https://github.com/CIRCL/lookyloo
chg: Avoid exception on broken captures
parent
1ddd38fdcd
commit
4d088f459f
|
@ -89,9 +89,11 @@ class AsyncCapture(AbstractManager):
|
||||||
with open(tmp_f.name, "wb") as f:
|
with open(tmp_f.name, "wb") as f:
|
||||||
f.write(to_capture[b'document'])
|
f.write(to_capture[b'document'])
|
||||||
url = f'file://{tmp_f.name}'
|
url = f'file://{tmp_f.name}'
|
||||||
else:
|
elif to_capture.get(b'url'):
|
||||||
url = to_capture[b'url'].decode()
|
url = to_capture[b'url'].decode()
|
||||||
self.thirdparty_submit(url)
|
self.thirdparty_submit(url)
|
||||||
|
else:
|
||||||
|
self.logger.warning(f'Invalid capture {to_capture}.')
|
||||||
|
|
||||||
self.logger.info(f'Capturing {url} - {uuid}')
|
self.logger.info(f'Capturing {url} - {uuid}')
|
||||||
success, error_message = await self._capture(
|
success, error_message = await self._capture(
|
||||||
|
|
Loading…
Reference in New Issue