mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
move decision between rwe and win driver to helpers.py and fix other PR comments
This commit is contained in:
@@ -19,9 +19,14 @@
|
||||
#chipsec@intel.com
|
||||
#
|
||||
|
||||
import os, platform
|
||||
import chipsec.file
|
||||
|
||||
from chipsec.helper.efi import *
|
||||
from chipsec.helper.linux import *
|
||||
from chipsec.helper.osx import *
|
||||
from chipsec.helper.rwe import *
|
||||
from chipsec.helper.win import *
|
||||
if os.path.isfile("C:\\Windows\\System32\\drivers\\chipsec_hlpr.sys") or os.path.isfile(os.path.join( chipsec.file.get_main_dir(), "chipsec", "helper", "win", "win7_" + platform.machine().lower(), "chipsec_hlpr.sys")):
|
||||
from chipsec.helper.win import *
|
||||
elif (os.path.isfile(os.path.join("C:\\Windows\\System32\\drivers\\RwDrv.sys")) or os.path.isfile(os.path.join( chipsec.file.get_main_dir(), "chipsec", "helper", "rwe", "win7_" + platform.machine().lower(), "RwDrv.sys" ))):
|
||||
from chipsec.helper.rwe import *
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
#
|
||||
|
||||
import platform, os
|
||||
if "windows" == platform.system().lower() and (os.path.isfile(os.path.join("C:\\Windows\\System32\\drivers\\RwDrv.sys")) or os.path.isfile(os.path.join(os.getcwd(), "win7_amd64\RwDrv.sys"))):
|
||||
|
||||
if "windows" == platform.system().lower():
|
||||
__all__ = [ "rwehelper" ]
|
||||
else:
|
||||
__all__ = [ ]
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
import platform, os
|
||||
|
||||
if "windows" == platform.system().lower() and os.path.isfile(os.path.join(os.getcwd(), "win7_amd64\chipsec_hlpr.sys")):
|
||||
if "windows" == platform.system().lower():
|
||||
__all__ = [ "win32helper" ]
|
||||
else:
|
||||
__all__ = []
|
||||
|
||||
@@ -354,7 +354,7 @@ class Win32Helper(Helper):
|
||||
|
||||
driver_path = os.path.join( chipsec.file.get_main_dir(), "chipsec", "helper", "win", self.win_ver, DRIVER_FILE_NAME )
|
||||
if not os.path.isfile( driver_path ):
|
||||
driver_path = os.path.join("C:\\Windows\\System32\\drivers\\RwDrv.sys"
|
||||
driver_path = os.path.join( "C:\\Windows\\System32\\drivers", DRIVER_FILE_NAME)
|
||||
if os.path.isfile( driver_path ):
|
||||
self.driver_path = driver_path
|
||||
if logger().VERBOSE: logger().log( "[helper] driver path: '%s'" % os.path.abspath(self.driver_path) )
|
||||
|
||||
Reference in New Issue
Block a user