forked from p15670423/monkey
Import Windows specific modules only on Windows
This commit is contained in:
parent
e7a26aa2d1
commit
8c575b9d35
|
@ -1,15 +1,16 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import ntsecuritycon
|
|
||||||
import win32api
|
|
||||||
import win32con
|
|
||||||
import win32security
|
|
||||||
|
|
||||||
from monkey_island.cc.server_utils.consts import DEFAULT_DATA_DIR
|
from monkey_island.cc.server_utils.consts import DEFAULT_DATA_DIR
|
||||||
|
|
||||||
is_windows_os = sys.platform.startswith("win")
|
is_windows_os = sys.platform.startswith("win")
|
||||||
|
|
||||||
|
if is_windows_os:
|
||||||
|
import ntsecuritycon
|
||||||
|
import win32api
|
||||||
|
import win32con
|
||||||
|
import win32security
|
||||||
|
|
||||||
|
|
||||||
def create_data_dir(data_dir: str) -> None:
|
def create_data_dir(data_dir: str) -> None:
|
||||||
if not os.path.isdir(data_dir):
|
if not os.path.isdir(data_dir):
|
||||||
|
|
Loading…
Reference in New Issue