Skip to content

Commit

Permalink
correctly detect PE drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
huettenhain committed Dec 3, 2024
1 parent 3651d7f commit 86bd910
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion refinery/lib/mime.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,12 @@ def __init__(self, data, default='bin', decompress=True):
if self.description == 'Microsoft OOXML':
extension = 'docx'
if extension == 'exe':
extension = 'dll' if '(DLL)' in self.description else 'exe'
if '(DLL)' in self.description:
extension = 'dll'
elif '(native)' in self.description:
extension = 'sys'
else:
extension = 'exe'
elif extension in ('gz', 'gzip', 'bz2') and decompress:
if extension == 'bz2':
import bz2
Expand Down

0 comments on commit 86bd910

Please sign in to comment.