예제 #1
0
    def convert_mas(self, source_file, target_file):
        logging.info("mas unpacking %s", source_file)
        mas_content = rfactortools.mas_unpack_to_data(source_file)
        self.report_progress()

        logging.info("encrypting files")
        encrypted_mas_content = []
        for i, (name, data) in enumerate(mas_content):
            self.report_progress()
            logging.debug("processing %d/%d: %s", i, len(mas_content), name)
            encrypted_data = rfactortools.encrypt_data(data, 1, 0x4b1dca9f960524e8, rfactortools.get_skip(name))
            encrypted_mas_content.append((name, encrypted_data))

        rfactortools.mas_pack_from_data(encrypted_mas_content, target_file)
예제 #2
0
    def convert_gtr(self, source_file, target_file):
        logging.info("mas unpacking %s", source_file)
        mas_content = rfactortools.mas_unpack_to_data(source_file)

        # TOOD: This doesn't work .gmt files have different formats in
        # GSC2013 and rFactor and need to be converted first.

        logging.info("encrypting files")
        encrypted_mas_content = []
        for i, (name, data) in enumerate(mas_content):
            logging.debug("processing %d/%d: %s", i, len(mas_content), name)
            encrypted_data = rfactortools.encrypt_data(data, 1, 0x4b1dca9f960524e8, rfactortools.get_skip(name))
            encrypted_mas_content.append((name, encrypted_data))

        rfactortools.mas_pack_from_data(encrypted_mas_content, target_file)
예제 #3
0
    def convert_mas(self, source_file, target_file):
        logging.info("mas unpacking %s", source_file)
        mas_content = rfactortools.mas_unpack_to_data(source_file)
        self.report_progress()

        logging.info("encrypting files")
        encrypted_mas_content = []
        for i, (name, data) in enumerate(mas_content):
            self.report_progress()
            logging.debug("processing %d/%d: %s", i, len(mas_content), name)
            encrypted_data = rfactortools.encrypt_data(
                data, 1, 0x4b1dca9f960524e8, rfactortools.get_skip(name))
            encrypted_mas_content.append((name, encrypted_data))

        rfactortools.mas_pack_from_data(encrypted_mas_content, target_file)
예제 #4
0
    def convert_gtr(self, source_file, target_file):
        logging.info("mas unpacking %s", source_file)
        mas_content = rfactortools.mas_unpack_to_data(source_file)

        # TOOD: This doesn't work .gmt files have different formats in
        # GSC2013 and rFactor and need to be converted first.

        logging.info("encrypting files")
        encrypted_mas_content = []
        for i, (name, data) in enumerate(mas_content):
            logging.debug("processing %d/%d: %s", i, len(mas_content), name)
            encrypted_data = rfactortools.encrypt_data(
                data, 1, 0x4b1dca9f960524e8, rfactortools.get_skip(name))
            encrypted_mas_content.append((name, encrypted_data))

        rfactortools.mas_pack_from_data(encrypted_mas_content, target_file)