Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit fd8946b

Browse files
committed
Make local regitry processing Python3 compatible
1 parent d7da2a0 commit fd8946b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ShimCacheParser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,12 @@ def get_local_data():
792792
global g_verbose
793793

794794
try:
795-
import _winreg as reg
795+
if sys.version_info >= (3,0,0):
796+
import winreg as reg
797+
else:
798+
import _winreg as reg
796799
except ImportError:
797-
print("[-] \'winreg.py\' not found... Is this a Windows system?")
800+
print("[-] 'winreg' not found... Is this a Windows system?")
798801
sys.exit(1)
799802

800803
hReg = reg.ConnectRegistry(None, reg.HKEY_LOCAL_MACHINE)

0 commit comments

Comments
 (0)