Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
raise e
if sam_path:
try:
if notfile == True:
sam_hive = sam_path
else:
sam_hive = open(sam_path, 'rb')
po.sam_hive = AIOWinRegHive(sam_hive)
except Exception as e:
logger.error('Failed to open SAM hive! Reason: %s' % str(e))
raise e
else:
logger.warning('SAM hive path not supplied! Parsing SAM will not work')
if security_path:
try:
if notfile == True:
sec_hive = security_path
else:
sec_hive = open(security_path, 'rb')
po.security_hive = AIOWinRegHive(sec_hive)
except Exception as e:
logger.error('Failed to open SECURITY hive! Reason: %s' % str(e))
raise e
else:
logger.warning('SECURITY hive path not supplied! Parsing SECURITY will not work')
if software_path:
else:
logger.warning('SAM hive path not supplied! Parsing SAM will not work')
if security_path:
try:
if notfile == True:
sec_hive = security_path
else:
sec_hive = open(security_path, 'rb')
po.security_hive = AIOWinRegHive(sec_hive)
except Exception as e:
logger.error('Failed to open SECURITY hive! Reason: %s' % str(e))
raise e
else:
logger.warning('SECURITY hive path not supplied! Parsing SECURITY will not work')
if software_path:
try:
if notfile == True:
sof_hive = software_path
else:
sof_hive = open(software_path, 'rb')
po.software_hive = AIOWinRegHive(sof_hive)
except Exception as e:
logger.error('Failed to open SECURITY hive! Reason: %s' % str(e))
raise e
else:
logger.warning('SOFTWARE hive path not supplied! Parsing SOFTWARE will not work')