Skip to content

Commit

Permalink
Update management.py (#92)
Browse files Browse the repository at this point in the history
Fix bug with windows binary path management
  • Loading branch information
inaimathi authored Jul 23, 2024
1 parent 705e5b9 commit 15c1d09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions osquery/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ def emit(self, record):
# We bootleg our own version of Windows pipe coms
from osquery.TPipe import TPipe
from osquery.TPipe import TPipeServer
if os.path.exists(os.environ["PROGRAMDATA"] + "\\osquery\\osqueryd\\osqueryd.exe"):
WINDOWS_BINARY_PATH = os.environ["PROGRAMDATA"] + "\\osquery\\osqueryd\\osqueryd.exe"
if os.path.exists(os.environ["PROGRAMW6432"] + "\\osquery\\osqueryd\\osqueryd.exe"):
WINDOWS_BINARY_PATH = os.environ["PROGRAMW6432"] + "\\osquery\\osqueryd\\osqueryd.exe"
PTH = os.path.join(os.environ["PROGRAMDATA"], "osquery", "osqueryd", "osqueryd.exe")
if os.path.exists(PTH):
WINDOWS_BINARY_PATH = PTH
PTH = os.path.join(os.environ["PROGRAMW6432"], "osquery", "osqueryd", "osqueryd.exe")
if os.path.exists(PTH):
WINDOWS_BINARY_PATH = PTH

DARWIN_BINARY_PATH = "/usr/local/bin/osqueryd"
LINUX_BINARY_PATH = "/usr/bin/osqueryd"
Expand Down

0 comments on commit 15c1d09

Please sign in to comment.