nrk8286 / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

ddwrt-gui-extract.sh Failed (again) ERROR: Bad file #84

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Checked out the lastest version (r374, subversion build-essential zlib1g-dev 
liblzma-dev all the last version)
2. Run ./extract-ng.sh to extracting the firmware
3. Run ./ddwrt-gui-extract.sh to extracting the web UI

What is the expected output? What do you see instead?

When i run the ./ddwrt-gui-extract.sh, it should extract all the web UI files 
normally without error, but i got lot's of error like :

ERROR: Bad file size/offset for Status_SputnikAPD.asp [ 46270 1965094 ]

And the file not extracted as usual.

What version of the product are you using? On what operating system?
Ubuntu 12 x64bit

Please provide any additional information below.

Here is full operates and outputs:

raincious@Rain-VirtualBox:~/firmwaremodkit/trunk$  ./extract-ng.sh 
whr-hp-g300n.bin 
Firmware Mod Kit (build-ng) 0.78 beta, (c)2011-2012 Craig Heffner, Jeremy 
Collake
http://www.bitsum.com

Scanning firmware...

DECIMAL     HEX         DESCRIPTION
--------------------------------------------------------------------------------
-----------------------
123         0xFFFFFFFE  (null)
306         0xFFFFFFFE  (null)
146         0xFFFFFFFE  (null)

Extracting 917532 bytes of trx header image at offset 0
Extracting squashfs file system at offset 917532
Extracting squashfs files...
Firmware extraction successful!
Firmware parts can be found in 'fmk/*'

raincious@Rain-VirtualBox:~/firmwaremodkit/trunk$ ./ddwrt-gui-extract.sh 
Firmware Mod Kit (ddwrt-gui-extract) 0.78 beta, (c)2011 Craig Heffner, Jeremy 
Collake
http://www.bitsum.com

AOSS.live.asp
Alive.asp
DDNS.asp
DDNS.live.asp
DMZ.asp
Diagnostics.asp
Factory_Defaults.asp
Fail.asp
Fail_u_s.asp
FilterIPMAC.asp
FilterSummary.asp
Filters.asp
Firewall.asp
Forward.asp
ForwardSpec.asp
Hotspot.asp
Join.asp
Log_incoming.asp
Log_outgoing.asp
Management.asp
Networking.asp
Networking.live.asp
PPPoE_Server.asp
PPTP.asp
Port_Services.asp
QoS.asp
Radius.asp
Reboot.asp
RouteTable.asp
Routing.asp
Services.asp
Site_Survey.asp
Status_Bandwidth.asp
Status_Conntrack.asp
Status_Internet.asp
Status_Internet.live.asp
Status_Lan.asp
Status_Lan.live.asp
Status_Router.asp
Status_Router.live.asp
ERROR: Bad file size/offset for Status_SputnikAPD.asp [ 46270 1965094 ]
ERROR: Bad file size/offset for Status_SputnikAPD.live.asp [ 44035 2011364 ]
ERROR: Bad file size/offset for Status_Wireless.asp [ 53119 2055399 ]
ERROR: Bad file size/offset for Status_Wireless.live.asp [ 44228 2108518 ]
ERROR: Bad file size/offset for Statusinfo.live.asp [ 43868 2152746 ]
ERROR: Bad file size/offset for Success_rest.asp [ 45494 2196614 ]
ERROR: Bad file size/offset for Success_u_s.asp [ 45545 2242108 ]
ERROR: Bad file size/offset for SuperChannel.asp [ 46447 2287653 ]
ERROR: Bad file size/offset for Traff_admin.asp [ 44899 2334100 ]
ERROR: Bad file size/offset for Triggering.asp [ 47293 2378999 ]
ERROR: Bad file size/offset for UPnP.asp [ 50070 2426292 ]
ERROR: Bad file size/offset for UPnP.live.asp [ 43901 2476362 ]
ERROR: Bad file size/offset for Upgrade.asp [ 47399 2520263 ]
........Lot's of that sort of errors.....
ERROR: Bad file size/offset for style/xirian/header_bg.png [ 44134 10365685 ]
ERROR: Bad file size/offset for style/xirian/help.png [ 46180 10409819 ]
ERROR: Bad file size/offset for style/xirian/help_bg.png [ 43930 10455999 ]
ERROR: Bad file size/offset for style/xirian/logo.png [ 50244 10499929 ]
ERROR: Bad file size/offset for style/xirian/message_bg.png [ 43906 10550173 ]
ERROR: Bad file size/offset for style/xirian/nav_bar.png [ 43939 10594079 ]
ERROR: Bad file size/offset for style/xirian/nav_bar_rev.png [ 43936 10638018 ]
ERROR: Bad file size/offset for style/xirian/style.css [ 47877 10681954 ]
ERROR: Bad file size/offset for style/yellow/style.css [ 43804 10729831 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/bg.gif [ 43869 10773635 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/bottom-left-c.gif [ 43864 
10817504 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/bottom-middle.gif [ 43854 
10861368 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/bottom-right-c.gif [ 43865 
10905222 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/button-close-focus.gif [ 44503 
10949087 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/button-max-focus.gif [ 44569 
10993590 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/button-min-focus.gif [ 44276 
11038159 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/frame-left.gif [ 43868 11082435 
]
ERROR: Bad file size/offset for style/pwc/ddwrt/frame-right.gif [ 43868 
11126303 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/left-top.gif [ 43968 11170171 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/progress.gif [ 47040 11214139 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/right-top.gif [ 43969 11261179 ]
ERROR: Bad file size/offset for style/pwc/ddwrt/top-middle.gif [ 43900 11305148 
]

Processed 40 Web files.

raincious@Rain-VirtualBox:~/firmwaremodkit/trunk$

Firmware Bin file: 
ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2013/01-01-2013-r20453/bu
ffalo_whr_hp_g300n/whr-hp-g300n-firmware-MULTI.bin

Please take look, because if i cannot extract web UI and remove some to 
decrease the size of modded firmware, i'll never able to get the extracted 
firmware build back to bin and use them.

Original issue reported on code.google.com by Raincious on 8 Jan 2013 at 6:52

GoogleCodeExporter commented 8 years ago
I've the same router and come across the same issue, hope it can be fixed soon.

Original comment by kkzxa...@gmail.com on 20 Mar 2013 at 4:44

GoogleCodeExporter commented 8 years ago
I have the same issue with fresh build of DD-WRT for DIR-825-revb.
Firmware file: 
ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2013/04-01-2013-r21153/dl
ink-dir825-revb/dir825-firmware.bin
Using Firmware Mod Kit r414

Original comment by ilya.str...@gmail.com on 13 Apr 2013 at 7:53

GoogleCodeExporter commented 8 years ago
I am evaluating it now. A cursory glance at the situation reveals that DD-WRT 
likely made a minor tweak to their webcomp tool, probably to break 
interoperability with webdecomp. I'm looking at it in my spare time, so will 
patch webdecomp as soon as I'm able.

Original comment by jeremy.collake@gmail.com on 13 Apr 2013 at 8:01

GoogleCodeExporter commented 8 years ago

Original comment by jeremy.collake@gmail.com on 13 Apr 2013 at 8:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by jeremy.collake@gmail.com on 13 Apr 2013 at 1:22

GoogleCodeExporter commented 8 years ago
I've updated Firmware Mod Kit to latest revision (r427) and recompiled it, but 
the problem is still present.
Firmware: 
ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2013/04-01-2013-r21153/dl
ink-dir825-revb/dir825-firmware.bin
Error log: http://pastebin.com/kP5RU2pZ

Original comment by ilya.str...@gmail.com on 14 Apr 2013 at 5:35

GoogleCodeExporter commented 8 years ago
I will check that image. I tested against this one 
ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2013/01-01-2013-r20453/bu
ffalo_whr_hp_g300n/whr-hp-g300n-firmware-MULTI.bin

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 5:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 5:43

GoogleCodeExporter commented 8 years ago
Yea, it's different. It's going to be hard to deal with constantly changing 
variations here. I've now got real things to do, so I don't suspect I'll 
complete this anytime soon, though who knows I may get obsessed with it during 
one of my bouts with mania. The exact mechanism used for the firmware will have 
to be derived at extract time and recorded for use in the restore. What a pain. 
An alternate solution is to use a different build's www AND httpd. If you use 
both, it ought to come out alright.

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 5:56

GoogleCodeExporter commented 8 years ago
I'll try to use different www and httpd. Thank you very much!

Original comment by ilya.str...@gmail.com on 14 Apr 2013 at 6:04

GoogleCodeExporter commented 8 years ago
Wait. I am going to update to use the newer format.

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 6:32

GoogleCodeExporter commented 8 years ago
Ok, done. It works with your image now. The code last night was fucked up too. 
Also, my description was off. Turns out it's a simple constant key added to all 
indexes. The constant will vary between builds. The key can be dynamically 
calculated and stored, which is what I'll work on. This would have the added 
benefit of working on the older images with a 0 key.

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 6:57

GoogleCodeExporter commented 8 years ago
I added support for variable keys. The key is now calculated during extract and 
stored in a temporary file for use in the restore/rebuild process.

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 6:39

GoogleCodeExporter commented 8 years ago

Original comment by jeremy.collake@gmail.com on 14 Apr 2013 at 6:39