mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-17 16:45:03 -04:00
AMI UCP BIOS Extractor v1.2
Fixed crash when parsing compressed text only UAF Modules
This commit is contained in:
parent
1f2d423070
commit
7c238274b7
1 changed files with 6 additions and 6 deletions
|
@ -7,7 +7,7 @@ AMI UCP BIOS Extractor
|
|||
Copyright (C) 2021 Plato Mavropoulos
|
||||
"""
|
||||
|
||||
title = 'AMI UCP BIOS Extractor v1.1'
|
||||
title = 'AMI UCP BIOS Extractor v1.2'
|
||||
|
||||
print('\n' + title) # Print script title
|
||||
|
||||
|
@ -388,11 +388,6 @@ def ucp_extract(buffer, out_dir, level, padd) :
|
|||
|
||||
print('%s Description : %s' % (padd, desc)) # Store UII Module Description
|
||||
|
||||
# Process and Print known text only UAF Modules
|
||||
if uaf_tag in ['CMD','PFC','VER','MEC','CKV'] : # Always referenced in tag_desc
|
||||
text_data = uaf_data_raw.decode('utf-8')
|
||||
print('\n%s %s:\n\n%s %s' % (padd, tag_desc[uaf_tag], padd, text_data))
|
||||
|
||||
# Adjust UAF Module Raw Data for extraction
|
||||
if is_comp :
|
||||
# Some Compressed UAF Module EFI data lack necessary padding in the end
|
||||
|
@ -425,6 +420,11 @@ def ucp_extract(buffer, out_dir, level, padd) :
|
|||
print('\n%s Error: Could not extract AMI UCP Module %s via TianoCompress!' % (padd, uaf_tag))
|
||||
input('%s Make sure that "TianoCompress" executable exists!' % padd)
|
||||
|
||||
# Process and Print known text only UAF Modules (after EFI/Tiano Decompression)
|
||||
if uaf_tag in ['CMD','PFC','VER','MEC','CKV'] : # Always referenced in tag_desc
|
||||
text_data = uaf_data_raw.decode('utf-8')
|
||||
print('\n%s %s:\n\n%s %s' % (padd, tag_desc[uaf_tag], padd, text_data))
|
||||
|
||||
# Parse Default Command Status UAF Module (DIS)
|
||||
if len(uaf_data_raw) and uaf_tag == 'DIS' :
|
||||
dis_hdr = get_struct(uaf_data_raw, 0, DIS_HDR, [padd]) # Parse DIS Module Raw Header Structure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue