Esempio n. 1
0
    def __init__(self, argv):
        self.CHIPSEC_FOLDER = os.path.abspath(chipsec.file.get_main_dir())
        self.CHIPSEC_LOADED_AS_EXE = chipsec.file.main_is_frozen()
        self.PYTHON_64_BITS = True if (sys.maxsize > 2**32) else False
        self.ZIP_MODULES_RE = None
        self.Import_Path = "chipsec.modules."
        self.Modules_Path = os.path.join(self.CHIPSEC_FOLDER, "chipsec",
                                         "modules")
        self.Loaded_Modules = []
        self.AVAILABLE_TAGS = []
        self.MODPATH_RE = re.compile(r"^\w+(\.\w+)*$")
        self.version = defines.get_version()
        self.message = defines.get_message()

        self.argv = argv
        self.parse_args()
Esempio n. 2
0
    def print_banner(self):
        """
        Prints chipsec banner
        """
        logger().log('')
        logger().log("################################################################\n"
                     "##                                                            ##\n"
                     "##  CHIPSEC: Platform Hardware Security Assessment Framework  ##\n"
                     "##                                                            ##\n"
                     "################################################################")
        logger().log("[CHIPSEC] Version : {}".format(get_version()))
        logger().log("[CHIPSEC] OS      : {} {} {} {}".format(platform.system(), platform.release(), platform.version(), platform.machine()))
        logger().log("[CHIPSEC] Python  : {} ({})".format(platform.python_version(),"64-bit" if self.PYTHON_64_BITS else "32-bit"))
        logger().log(get_message())

        if not self.PYTHON_64_BITS and platform.machine().endswith("64"):
            logger().warn("Python architecture (32-bit) is different from OS architecture (64-bit)")
Esempio n. 3
0
 def print_banner(self):
     """
     Prints chipsec banner
     """
     logger().log('')
     logger().log(
         "################################################################\n"
         "##                                                            ##\n"
         "##  CHIPSEC: Platform Hardware Security Assessment Framework  ##\n"
         "##                                                            ##\n"
         "################################################################")
     logger().log("[CHIPSEC] Version : {}".format(get_version()))
     logger().log("[CHIPSEC] OS      : {} {} {} {}".format(
         platform.system(), platform.release(), platform.version(),
         platform.machine()))
     logger().log("[CHIPSEC] Python  : {} ({})".format(
         platform.python_version(),
         "64-bit" if sys.maxsize > 2**32 else "32-bit"))
     logger().log(get_message())