2018-02-28 01:32:28 +08:00
|
|
|
import os
|
|
|
|
import sys
|
2018-04-12 02:09:06 +08:00
|
|
|
import struct
|
2018-02-28 01:32:28 +08:00
|
|
|
|
|
|
|
from config import WormConfiguration
|
|
|
|
|
|
|
|
|
|
|
|
def get_monkey_log_path():
|
|
|
|
return os.path.expandvars(WormConfiguration.monkey_log_path_windows) if sys.platform == "win32" \
|
|
|
|
else WormConfiguration.monkey_log_path_linux
|
|
|
|
|
|
|
|
|
|
|
|
def get_dropper_log_path():
|
|
|
|
return os.path.expandvars(WormConfiguration.dropper_log_path_windows) if sys.platform == "win32" \
|
|
|
|
else WormConfiguration.dropper_log_path_linux
|
2018-04-12 02:09:06 +08:00
|
|
|
|
|
|
|
|
2018-04-12 22:57:21 +08:00
|
|
|
def is_64bit_windows_os():
|
|
|
|
'''
|
|
|
|
Checks for 64 bit Windows OS using environment variables.
|
|
|
|
:return:
|
|
|
|
'''
|
2018-04-12 02:09:06 +08:00
|
|
|
return 'PROGRAMFILES(X86)' in os.environ
|
|
|
|
|
|
|
|
|
|
|
|
def is_64bit_python():
|
|
|
|
return struct.calcsize("P") == 8
|
|
|
|
|
|
|
|
|
|
|
|
def is_windows_os():
|
|
|
|
return sys.platform.startswith("win")
|