mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-27 21:44:24 -04:00
Added Fujitsu SFX BIOS Extractor v3.0_a2
Fixed deletion of folders with read-only files Fixed missing README > Requirement for VAIO Packaging Manager Extractor
This commit is contained in:
parent
df47293d01
commit
48562b0f68
4 changed files with 194 additions and 4 deletions
|
@ -8,6 +8,7 @@ Copyright (C) 2022 Plato Mavropoulos
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import stat
|
||||
import shutil
|
||||
from pathlib import Path, PurePath
|
||||
|
||||
|
@ -92,7 +93,12 @@ def make_dirs(in_path, parents=True, exist_ok=False, delete=False):
|
|||
# Delete folder(s), if present
|
||||
def del_dirs(in_path):
|
||||
if Path(in_path).is_dir():
|
||||
shutil.rmtree(in_path)
|
||||
shutil.rmtree(in_path, onerror=clear_readonly)
|
||||
|
||||
# Clear read-only file attribute (on shutil.rmtree error)
|
||||
def clear_readonly(in_func, in_path, _):
|
||||
os.chmod(in_path, stat.S_IWRITE)
|
||||
in_func(in_path)
|
||||
|
||||
# Walk path to get all files
|
||||
def get_path_files(in_path):
|
||||
|
|
|
@ -13,6 +13,7 @@ PAT_AWARD_LZH = re.compile(br'-lh[04567]-')
|
|||
PAT_DELL_FTR = re.compile(br'\xEE\xAA\xEE\x8F\x49\x1B\xE8\xAE\x14\x37\x90')
|
||||
PAT_DELL_HDR = re.compile(br'\xEE\xAA\x76\x1B\xEC\xBB\x20\xF1\xE6\x51.\x78\x9C', re.DOTALL)
|
||||
PAT_DELL_PKG = re.compile(br'\x72\x13\x55\x00.{45}7zXZ', re.DOTALL)
|
||||
PAT_FUJITSU_SFX = re.compile(br'FjSfxBinay\xB2\xAC\xBC\xB9\xFF{4}.{4}\xFF{4}.{4}\xFF{4}\xFC\xFE', re.DOTALL)
|
||||
PAT_INSYDE_IFL = re.compile(br'\$_IFLASH')
|
||||
PAT_INSYDE_SFX = re.compile(br'\x0D\x0A;!@InstallEnd@!\x0D\x0A(7z\xBC\xAF\x27|\x6E\xF4\x79\x5F\x4E)')
|
||||
PAT_INTEL_ENG = re.compile(br'\x04\x00{3}[\xA1\xE1]\x00{3}.{8}\x86\x80.{9}\x00\$((MN2)|(MAN))', re.DOTALL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue