diff --git a/src/formats/pfl_upg.rs b/src/formats/pfl_upg.rs index cfb9868..810b18c 100644 --- a/src/formats/pfl_upg.rs +++ b/src/formats/pfl_upg.rs @@ -2,7 +2,7 @@ use std::fs::{File}; use rsa::{RsaPublicKey, BigUint}; use hex::decode; use std::path::Path; -use std::io::{Cursor, Write}; +use std::io::{Read, Cursor, Write}; use std::fs::{self, OpenOptions}; use aes::Aes256; @@ -35,7 +35,7 @@ struct FileHeader { real_size: u32, stored_size: u32, _header_size: u32, - _attributes: u32, + #[br(count = 4)] attributes: Vec, } impl FileHeader { fn file_name(&self) -> String { @@ -96,7 +96,7 @@ pub fn extract_pfl_upg(mut file: &File, output_folder: &str) -> Result<(), Box Result<(), Box Result<(), Box