def cs(): global _chipset from chipsec.helper.oshelper import helper if _chipset is None: _chipset = Chipset(helper()) return _chipset
def parse_uefi_region_from_file(_uefi, filename, fwtype, outpath=None): if outpath is None: outpath = os.path.join(helper().getcwd(), filename + ".dir") if not os.path.exists(outpath): os.makedirs(outpath) rom = read_file(filename) traverse_uefi_region(_uefi, rom, fwtype, outpath, True, True)
def parse_uefi_region_from_file( _uefi, filename, outpath = None): if outpath is None: outpath = os.path.join( helper().getcwd(), filename + ".dir" ) if not os.path.exists( outpath ): os.makedirs( outpath ) #uefi_region_path = os.path.join( os.getcwd(), filename + "_UEFI_region" ) #if not os.path.exists( uefi_region_path ): # os.makedirs( uefi_region_path ) rom = read_file( filename ) parse_uefi_region( _uefi, rom, outpath )
def parse_uefi_region_from_file(_uefi, filename, outpath=None): if outpath is None: outpath = os.path.join(helper().getcwd(), filename + ".dir") if not os.path.exists(outpath): os.makedirs(outpath) #uefi_region_path = os.path.join( os.getcwd(), filename + "_UEFI_region" ) #if not os.path.exists( uefi_region_path ): # os.makedirs( uefi_region_path ) rom = read_file(filename) parse_uefi_region(_uefi, rom, outpath)
def parse_me_region_from_file(filename, outpath=None): rom = read_file(filename) if outpath is None: outpath = os.path.join(helper().getcwd(), filename + ".dir") if not os.path.exists(outpath): os.makedirs(outpath) partitions = parse_me_region(rom) if (partitions is None) or (0 == len(partitions)): return for pk in partitions.keys(): p = partitions[pk] pd = p[0] off = p[2] if (off > 0): write_file( os.path.join(outpath, "%08X-%08X-%s.bin" % (off, len(pd), pk)), pd)
def unload_driver(self): oshelper.helper().helper.close() subprocess.call(["rmmod", "chipsec"])
def get_chipset_id(self): return self.id def get_chipset_code(self): return self.code def get_chipset_name(self, id): return self.longname def print_chipset(self): logger().log("Platform: %s\n VID: %04X\n DID: %04X" % (self.longname, self.vid, self.did)) def add_available_module(self, module_name, platform_code): chipset_id = CHIPSET_ID_UNKNOWN if Chipset_Code.has_key(platform_code): chipset_id = Chipset_Dictionary[Chipset_Code[platform_code]]['id'] elif platform_code == CHIPSET_CODE_COMMON: chipset_id = CHIPSET_ID_COMMON AVAILABLE_MODULES[chipset_id].append(module_name) #print AVAILABLE_MODULES from chipsec.helper.oshelper import helper _chipset = Chipset(helper()) def cs(): return _chipset
def get_chipset_id(self): return self.id def get_chipset_code(self): return self.code def get_chipset_name(self, id): return self.longname def print_chipset(self): logger().log("Platform: %s\n VID: %04X\n DID: %04X" % (self.longname, self.vid, self.did)) def add_available_module(self, module_name, platform_code): chipset_id = CHIPSET_ID_UNKNOWN if Chipset_Code.has_key(platform_code): chipset_id = Chipset_Dictionary[Chipset_Code[platform_code]]["id"] elif platform_code == CHIPSET_CODE_COMMON: chipset_id = CHIPSET_ID_COMMON AVAILABLE_MODULES[chipset_id].append(module_name) # print AVAILABLE_MODULES from chipsec.helper.oshelper import helper _chipset = Chipset(helper()) def cs(): return _chipset
def parse_uefi_region_from_file( _uefi, filename, fwtype, outpath = None): if outpath is None: outpath = os.path.join( helper().getcwd(), filename + ".dir" ) if not os.path.exists( outpath ): os.makedirs( outpath ) rom = read_file( filename ) traverse_uefi_region( _uefi, rom, fwtype, outpath, True, True )