mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-03-09 15:40:13 +00:00
fix: small python fixups
* Error handling in our ustorage, to prevent crashes * Small change to ubnt-fw-parse so it works better on older python versions
This commit is contained in:
parent
696f7955b0
commit
36ff26758e
2 changed files with 29 additions and 16 deletions
|
@ -68,9 +68,10 @@ def main(fwfile: str, savedir: str):
|
|||
file_header[4:33].decode("utf-8").rstrip("\x00")
|
||||
) # Name/type of FILE
|
||||
file_length = int(file_header[48:52].hex(), 16)
|
||||
print(
|
||||
f"{file_name} is at offset {"0x%0.2X" % file_location}, {file_length} bytes"
|
||||
)
|
||||
# Disabled because it's debug info and older python can't handle it
|
||||
#print(
|
||||
# f"{file_name} is at offset {"0x%0.2X" % file_location}, {file_length} bytes"
|
||||
#)
|
||||
# print(int(file_header[52:56].hex(), 16)) # Maybe reserved memory or partition size? We don't use this tho
|
||||
fcount = fcount + 1 # Increment on find!
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue