synacktiv-contrib / stuffz Goto Github PK
View Code? Open in Web Editor NEWRepository containing many useful scripts
Repository containing many useful scripts
I have encountered an image where 2 part_header
s for uboot are present with the same contents and hash, one with 0x75
part type, and another one with 0x76
.
sw_20190521_U840_5.20.706_user.zip
and sw_20161017_840_U_5.15_172_5.12_all_in_one_qt5_gdb_pn_user.zip
INFO:
Update magic: b'PocketBookUpdate'
Update Model: PocketBook840
Update revision: U840.5.20.7
Update md5 hash: b'54eeb5c38e2c596d8fcf66ad81db1466'
Update signature: b'443134e0cad904ff1bf456c21ef9d9c5859209a4a826fea7362b5cca9194ff92cba5e1cab48e7a7eca6d6bc7c84f14adf79c86b300d1831afb765bdfddd779f100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
Partition table:
offset 0x0 size 0x400 type PartTypeEnum.a_img
offset 0x10000 size 0xbab52 type PartTypeEnum.swupdate_tar_gz
offset 0xd0000 size 0x400964 type PartTypeEnum.kernel_img
offset 0x4e0000 size 0x360000 type PartTypeEnum.updatefs_cramfs
offset 0x840000 size 0x1f2d4 type PartTypeEnum.elf_megadog_img
offset 0x860000 size 0x1725000 type PartTypeEnum.rootfs_img
offset 0x1f90000 size 0xcbb8800 type PartTypeEnum.ebrmain_img
offset 0xeb50000 size 0x9d552 type PartTypeEnum.elf_megadog_img
offset 0xebf0000 size 0x5c08000 type PartTypeEnum.dragon_tar
offset 0x14800000 size 0x1e5829 type PartTypeEnum.elf_megadog_img
offset 0x0 size 0x0 type PartTypeEnum.empty
Checking hashes
Header hash: b'54eeb5c38e2c596d8fcf66ad81db1466'
Calc hash: 54eeb5c38e2c596d8fcf66ad81db1466
and
Update magic: b'PocketBookUpdate'
Update Model: PocketBook840
Update revision: U840.5.15.1
Update md5 hash: b'0650832e2c9ff96a6cb14cdf445d92da'
Update signature: b'016a08261d6230a8fd5e1303f503afc927a73bbe529e2878ef8d4bcae95f69c84a5e54e097c2de506c8123d16436c8c8e611190f7d9c9ece98882c6b29d1d9b200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
Partition table:
offset 0x0 size 0x400 type PartTypeEnum.a_img
offset 0x10000 size 0xa016a type PartTypeEnum.swupdate_tar_gz
offset 0xc0000 size 0x231 type PartTypeEnum.elf_megadog_img
offset 0xd0000 size 0x3fe924 type PartTypeEnum.kernel_img
offset 0x4d0000 size 0x306000 type PartTypeEnum.updatefs_cramfs
offset 0x7e0000 size 0x11082 type PartTypeEnum.elf_megadog_img
offset 0x800000 size 0xf8e000 type PartTypeEnum.rootfs_img
offset 0x1790000 size 0xdce0800 type PartTypeEnum.ebrmain_img
offset 0xf480000 size 0x49ed000 type PartTypeEnum.dragon_tar
offset 0x13e70000 size 0x26a44f type PartTypeEnum.elf_megadog_img
offset 0x0 size 0x0 type PartTypeEnum.empty
Checking hashes
Header hash: b'0650832e2c9ff96a6cb14cdf445d92da'
Calc hash: 0650832e2c9ff96a6cb14cdf445d92da
DUMP:
Dumping section of type PartTypeEnum.a_img size 0x400 offset 0
Dumping section of type PartTypeEnum.swupdate_tar_gz size 0xa016a offset 10000
Dumping section of type PartTypeEnum.elf_megadog_img size 0x231 offset c0000
Dumping section of type PartTypeEnum.kernel_img size 0x3fe924 offset d0000
Dumping section of type PartTypeEnum.updatefs_cramfs size 0x306000 offset 4d0000
Dumping section of type PartTypeEnum.elf_megadog_img size 0x11082 offset 7e0000
Dumping section of type PartTypeEnum.rootfs_img size 0xf8e000 offset 800000
Dumping section of type PartTypeEnum.ebrmain_img size 0xdce0800 offset 1790000
Dumping section of type PartTypeEnum.dragon_tar size 0x49ed000 offset f480000
Dumping section of type PartTypeEnum.elf_megadog_img size 0x26a44f offset 13e70000
and
Dumping section of type PartTypeEnum.a_img size 0x400 offset 0
Dumping section of type PartTypeEnum.swupdate_tar_gz size 0xbab52 offset 10000
Dumping section of type PartTypeEnum.kernel_img size 0x400964 offset d0000
Dumping section of type PartTypeEnum.updatefs_cramfs size 0x360000 offset 4e0000
Dumping section of type PartTypeEnum.elf_megadog_img size 0x1f2d4 offset 840000
Dumping section of type PartTypeEnum.rootfs_img size 0x1725000 offset 860000
Dumping section of type PartTypeEnum.ebrmain_img size 0xcbb8800 offset 1f90000
Dumping section of type PartTypeEnum.elf_megadog_img size 0x9d552 offset eb50000
Dumping section of type PartTypeEnum.dragon_tar size 0x5c08000 offset ebf0000
Dumping section of type PartTypeEnum.elf_megadog_img size 0x1e5829 offset 14800000
sw_20201127_U740_6.1.1229_user.zip
and sw_20211018_U740_6.5.765_user.zip
Traceback (most recent call last):
File "dump_pocketbook_update.py", line 137, in <module>
main()
File "dump_pocketbook_update.py", line 133, in main
actions[args.action](args.update)
File "dump_pocketbook_update.py", line 29, in show_info
mupdate = swupdate.Swupdate.from_file(fname)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kaitaistruct.py", line 35, in from_file
return cls(KaitaiStream(f))
File "/PATH/TO/stuffz/swupdate.py", line 36, in __init__
self._read()
File "/PATH/TO/stuffz/swupdate.py", line 41, in _read
self.header = Swupdate.Header(_io__raw_header, self, self._root)
File "/PATH/TO/stuffz/swupdate.py", line 52, in __init__
self._read()
File "/PATH/TO/stuffz/swupdate.py", line 68, in _read
if _.part_type.value == 0:
AttributeError: 'int' object has no attribute 'value'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.