def test_export_msi_file(site, tmp_path): msi_file = _get_msi_file_path(site=site) out_dir = tmp_path / 'idts' bin_path = site.path("bin/") try: out_dir.mkdir() for entry in ["File", "Property", "Component"]: msi_engine.export_msi_file(bin_path, entry, str(msi_file), str(out_dir)) f = out_dir / (entry + ".idt") assert f.exists(), "Ups for [{}] {}".format(entry, f) finally: if out_dir.exists(): shutil.rmtree(str(out_dir))
def test_export_msi_file(site: Site, tmp_path): msi_file = _get_msi_file_path_not_signed(site=site) out_dir = tmp_path / "idts" bin_path = site.path("bin/") try: out_dir.mkdir() deobfuscated_file = out_dir / "deobfuscated.msi" obfuscate.deobfuscate_file(msi_file, file_out=deobfuscated_file) for entry in ["File", "Property", "Component"]: msi_engine.export_msi_file(bin_path, entry, str(deobfuscated_file), str(out_dir)) f = out_dir / (entry + ".idt") assert f.exists(), "Ups for [{}] {}".format(entry, f) finally: if out_dir.exists(): shutil.rmtree(str(out_dir))