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

Commit

Permalink
Make local regitry processing Python3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
comawill committed Oct 19, 2019
1 parent 59daa71 commit 0695f0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ShimCacheParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,12 @@ def get_local_data():
global g_verbose

try:
import _winreg as reg
if sys.version_info >= (3,0,0):
import winreg as reg
else:
import _winreg as reg
except ImportError:
print("[-] \'winreg.py\' not found... Is this a Windows system?")
print("[-] 'winreg' not found... Is this a Windows system?")
sys.exit(1)

hReg = reg.ConnectRegistry(None, reg.HKEY_LOCAL_MACHINE)
Expand Down

0 comments on commit 0695f0e

Please sign in to comment.