Skip to content

Commit

Permalink
adding a message if a packer is not available but specified to be used (
Browse files Browse the repository at this point in the history
  • Loading branch information
mrengstrom authored Dec 9, 2020
1 parent d0714dd commit f3ed38e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/service/file_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ async def get_file(self, headers):
if payload in self.special_payloads:
payload, display_name = await self.special_payloads[payload](headers)
file_path, contents = await self.read_file(payload)
if packer and packer in self.packers:
file_path, contents = await self.get_payload_packer(packer).pack(file_path, contents)
if packer:
if packer in self.packers:
file_path, contents = await self.get_payload_packer(packer).pack(file_path, contents)
else:
self.log.warning('packer <%s> not available for payload <%s>, returning unpacked' % (packer, payload))
if headers.get('xor_key'):
xor_key = headers['xor_key']
contents = xor_bytes(contents, xor_key.encode())
Expand Down

0 comments on commit f3ed38e

Please sign in to comment.