Skip to content

Commit

Permalink
Add wmplayer package
Browse files Browse the repository at this point in the history
  • Loading branch information
yoniabrahamy committed Sep 13, 2023
1 parent 8534d88 commit 7c840a3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions analyzer/windows/lib/core/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def choose_package(file_type, file_name, exports, target):
return "exe"
elif file_name.endswith((".msi", ".msp", ".appx")) or "MSI Installer" in file_type:
return "msi"
elif file_type.startswith('Audio file') or file_name.endswith('.mp3'):
return "wmplayer"
elif file_name.endswith(".pub"):
return "pub"
elif file_name.endswith(".one"):
Expand Down
26 changes: 26 additions & 0 deletions analyzer/windows/modules/packages/wmplayer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from __future__ import absolute_import

import os

from lib.common.abstracts import Package


class MP3(Package):
"""Windows media player analysis package."""

def __init__(self, options={}, config=None):
self.config = config
self.options = options

PATHS = [
("ProgramFiles", "Windows Media Player", "wmplayer.exe"),
]

def start(self, path):
wmplayer = self.get_path_glob("Microsoft Media Player")
if "." not in os.path.basename(path):
new_path = path + ".mp3"
os.rename(path, new_path)
path = new_path

return self.execute(wmplayer, "\"%s\" /q" % path, path)

0 comments on commit 7c840a3

Please sign in to comment.