pfl_upg: add 3rd spin key and fix header bug

This commit is contained in:
theubusu
2026-05-09 14:21:27 +02:00
parent eb216b1691
commit c8a691d776
2 changed files with 7 additions and 3 deletions
+5 -3
View File
@@ -70,6 +70,10 @@ pub fn extract_pfl_upg(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Result<(), B
while (data_reader.position() as usize) < data_reader.get_ref().len() {
let file_header: FileHeader = data_reader.read_le()?;
//sometimes has extra header data
let ex_header_size = file_header.header_size - 76; //76 is base file header size
let ex_header_bytes = common::read_exact(&mut data_reader, ex_header_size as usize)?;
if file_header.is_folder() {
println!("\nFolder - {}", file_header.file_name());
let output_path = Path::new(&app_ctx.output_dir).join(file_header.file_name().trim_start_matches('/'));
@@ -78,9 +82,7 @@ pub fn extract_pfl_upg(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Result<(), B
}
let file_name = if file_header.has_extended_name() {
let ex_name_size = file_header.header_size - 76; //76 is base file header size
let ex_name_bytes = common::read_exact(&mut data_reader, ex_name_size as usize)?;
common::string_from_bytes(&ex_name_bytes)
common::string_from_bytes(&ex_header_bytes) //extra header data used as name
} else {
file_header.file_name()
};
+2
View File
@@ -48,6 +48,8 @@ pub static RUF: &[(&str, &str)] = &[
//pfl upg pubkeys
pub static PFLUPG: &[(&str, &str)] = &[
("3rd_spin", "D8D57233B346F2E705766A7A029DD11E1CCA560665C476E56BAED8DAA6E323C22BE9FF0B7CC1995FDDB5E59767006F0046E79400E6E519854E3D6A926DA3CB244AB97DEABC5AA73641DA251BE5980973E574323B24DF1C431D0D146ED2B325C8D0FB859BA1492E987AE3B8FE51C0D724EB5D45EC9A4EE01EBB5FF460E987D2E1"),
("TV520_1", "AFAF89062747CBB29343C4E4EA775E4CFDF5FAFCD92C9DD858A8725201BA54AB973BEFEE04EBF3046910FBBC78B10120AE16D80BA734931E97248BC6B1D4A909F087D37BC0A9C2210FF8A2BE44C00F31E4DD8713A364623637FF75EBBCE9D3A840DB67E0FA910F127F679496F6C21112E3E3AD4ACA459FDE1CC58E300682E6F9"),
("TV520_2", "C41BE92C212BAC76B48261E2A1704028287DD7E121C11DA25F709E864FBDC1BD8C7F226F57605A4B42D768CDD629AF9E54011A0967AFC2826331406FB1E90321620738526EA0BEA59F1A0E612AE891C396112F13531F423DF02F94D1C871429549F4D5B30D9CA3EFDCC6D7A96849F7C1788DE8FAAEDD36560337008DF06D612F"),