Agent: Add try/except for importing pwd (can't do it on Windows)

This commit is contained in:
Shreya Malviya 2022-02-21 13:49:40 +05:30
parent ae856383a9
commit 9f01aa0a0d
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
import glob
import logging
import os
import pwd
try: # can't import on Windows
import pwd
except ModuleNotFoundError:
pass
from typing import Dict, Iterable
from common.utils.attack_utils import ScanStatus