ExtremeFiretop / MerlinAutoUpdate-Router

Merlin(A)uto(U)pdate is a Merlin router script which allows you to remotely identify a stable firmware update for an ASUS Merlin router, and automatically download and update via an unattended method directly from the router.
https://www.snbforums.com/threads/merlinau-v1-2-7-the-ultimate-firmware-auto-updater-amtm-addon.91326/
GNU General Public License v3.0
15 stars 1 forks source link

Fix Checksum Verification #255

Closed ExtremeFiretop closed 3 months ago

ExtremeFiretop commented 3 months ago

Fix Checksum Verification:

image

While testing my last PR, I came across this issue above. Seems like some formatting to merlins website was changed/updated and the checksum verification now fails. (On closer review, it looks like he added a new table for: "No longer supported")

This PR includes updates to the checksum line to make it pass. Previous solution:

image

Admin@GT-BE98_Pro-DE30:/tmp/home/root# checksums="$(curl -Ls --retry 4 --retry-d
elay 5 https://www.asuswrt-merlin.net/download | sed -n '/<pre>/,/</pre>/p' | se
d -e 's/<[^>]*>//g')"
Admin@GT-BE98_Pro-DE30:/tmp/home/root# echo $checksums

New Solution:

image

Admin@GT-BE98_Pro-DE30:/tmp/home/root# checksums="$(curl -Ls --retry 4 --retry-delay 5 https://www.asuswrt-merlin.net/download | sed -n '/<p><strong>SHA256 signatures:<\/strong><\/p>/,/<\/pre>/p' | sed -n '/<pre[^>]*>/,/<\/pre>/p' | sed -e 's/<[^>]*>//g' | sed '1d')"
Admin@GT-BE98_Pro-DE30:/tmp/home/root# echo "$checksums"
a29aa9167c7f7aa540e999455ab764a6ae5aabc6582aef83b9ba3d3e343c66cd  RT-AC5300_386.13_0.trx
f75106e22417c68607aacc2e94869b8c184f5c639c4fca06a61d2df945f45f86  RT-AC68U_386.13_0.trx
6e2a22ccad92385d6adcd5269892e0202a0099ecf40c2c030ffd82230b82847d  RT-AC88U_386.13_0.trx
fe3ca891e9ca1945bc84400133652dd9fb0367650c99402baa77d5c33d35b55c  GT-AC2900_386.13_2_rog_ubi.w
c1eedff802b910b8f24976af72f5dcd08d858fcc3b6335cf24f8c2f4a32dbedd  GT-AC2900_386.13_2_ubi.w
588a2d8a4beedcd4afdae9b7b5c64227c639a4e88720ccf4690cb70be7da5e38  GT-AX11000_3004_388.7_0_rog_ubi.w
e2edee8d9bd804a72c05a37f0f0e3dfaebd868dd8c52ee8cd01c3543ad4205cd  GT-AX11000_3004_388.7_0_ubi.w
7f481c3c6f13347f3348773b367d1e3234a5d966d0e4b9613659031524ed41c9  GT-AXE11000_3004_388.7_0_pureubi.w
b54127d3942be59a1121fb0d1cc0fade1487fac687e569ca9670911563123940  GT-AXE11000_3004_388.7_0_rog_pureubi.w
4f0c0fa3ec4e35806bda5514566b004645e7652b4e76faeb23633e22e65b5460  RT-AC86U_386.13_2_ubi.w
12297f00c37abaf60f9adddb4803447161e7ef9a78da3c00c1cd4074f358c752  RT-AX56U_3004_388.7_0_pureubi.w
41392de0221fc12129c2c4eb5989f55d50cacf553f72b6433d7a769923d32e35  RT-AX58U_3004_388.7_0_puresqubi.w
1765810f74255ac6f3bfffd8b0ce30fd7282a1faa9e88c0f51be864abcac5537  RT-AX68U_3004_388.7_0_pureubi.w
b420f4127667924f9babd71a569702fcce237c12c3238453ed139919f5869994  RT-AX86U_3004_388.7_0_pureubi.w
e2a9d6e4ffec50310649e3b52ead808484b53449610104dc5074d17bbda6d0a0  RT-AX88U_3004_388.7_0_ubi.w
54dfb37254a6ae7daa400a535b7f1d060694be3ccedde1e1e06f965a6df03e4f  GT-AX11000_PRO_3004_388.7_0_nand_squashfs.pkgtb
306f52bb23086cc745d488938e32cccbb0ee58e67d42191c6c151c36789d3696  GT-AX11000_PRO_3004_388.7_0_rog_nand_squashfs.pkgtb
f6a980a237008b8f58e8e2e116d397cf91383e2a0ea547b976619391aed5c104  GT-AX6000_3004_388.7_0_nand_squashfs.pkgtb
915671597d5cb8d09b21097dafa4bbc0ff90e345d5bf4fe81734fa3276d6b49b  GT-AX6000_3004_388.7_0_rog_nand_squashfs.pkgtb
a40a75248419241e13a87ba384853be1080916c01a3a5d7ea98f32216f6bfbed  GT-AXE16000_3004_388.7_0_nand_squashfs.pkgtb
4ba2a829b195642676493d05e852ae8274ae915916b5e039ea4cbe17dbc1bf1c  GT-AXE16000_3004_388.7_0_rog_nand_squashfs.pkgtb
1c80efa135bd3ac5b4a3706764f78def7077b96797f1ede2885cabedaf3bcdbb  RT-AX86U_PRO_3004_388.7_0_nand_squashfs.pkgtb
8a25c114667e952342225729cff4dd4b1854f0e6beed01536ac08991ef6917ac  RT-AX88U_PRO_3004_388.7_0_nand_squashfs.pkgtb
e56f1b2ee7c4c15b9b6a995e8dcab868b7806c36fa150eb07dd5eb584b53396d  XT12_3004_388.7_0_nand_squashfs.pkgtb
389a9f64210f4e16b2b5f66a25d86354742f55427b6f40f1cd037b0761b5e18d  GT-BE98_PRO_3006_102.1_0_nand_squashfs.pkgtb
d0fbb3f72a77983e4e471d444b43e1287aefd84a3344e0ac79aa43452805f956  RT-BE96U_3006_102.1_0_nand_squashfs.pkgtb
ExtremeFiretop commented 3 months ago

Tested and works correctly now:

image

Martinski4GitHub commented 3 months ago

While testing my last PR, I came across this issue above. Seems like some formatting to merlins website was changed/updated and the checksum verification now fails. (On closer review, it looks like he added a new table for: "No longer supported")

Excellent catch, bud!! This is an extremely critical step that when failing would stop F/W updates every time for everyone.

I think this one requires issuing an urgent release patch as soon as reasonably possible.

ExtremeFiretop commented 3 months ago

While testing my last PR, I came across this issue above. Seems like some formatting to merlins website was changed/updated and the checksum verification now fails. (On closer review, it looks like he added a new table for: "No longer supported")

Excellent catch, bud!! This is an extremely critical step that when failing would stop F/W updates every time for everyone.

I think this one requires issuing an urgent release patch as soon as reasonably possible.

Agreed. I was waiting for you to review because this step is critical as you say, and I didn't want to make any rush choices.

But once your ready I'll fire off a release tonight with all the recent improvements

Martinski4GitHub commented 3 months ago

While testing my last PR, I came across this issue above. Seems like some formatting to merlins website was changed/updated and the checksum verification now fails. (On closer review, it looks like he added a new table for: "No longer supported")

Excellent catch, bud!! This is an extremely critical step that when failing would stop F/W updates every time for everyone. I think this one requires issuing an urgent release patch as soon as reasonably possible.

Agreed. I was waiting for you to review because this step is critical as you say, and I didn't want to make any rush choices.

But once your ready I'll fire off a release tonight with all the recent improvements

I'd like to run the latest script code through the Linter tool just to double-check before making the patch release.

Is that OK? I just need about 30 minutes.

ExtremeFiretop commented 3 months ago

While testing my last PR, I came across this issue above. Seems like some formatting to merlins website was changed/updated and the checksum verification now fails. (On closer review, it looks like he added a new table for: "No longer supported")

Excellent catch, bud!! This is an extremely critical step that when failing would stop F/W updates every time for everyone. I think this one requires issuing an urgent release patch as soon as reasonably possible.

Agreed. I was waiting for you to review because this step is critical as you say, and I didn't want to make any rush choices. But once your ready I'll fire off a release tonight with all the recent improvements

I'd like to run the latest script code through the Linter tool just to double-check before making the patch release.

Is that OK? I just need about 30 minutes.

I'm about to jump in the shower, so take 45 minutes 🤣

ExtremeFiretop commented 3 months ago

@Martinski4GitHub

I'm done with the shower, but gotta go head out to pickup the girlfriend. Will be back in about 30 minutes or so depending on roads and if we stop along the way or not.

Martinski4GitHub commented 3 months ago

@Martinski4GitHub

I'm done with the shower, but gotta go head out to pickup the girlfriend. Will be back in about 30 minutes or so depending on roads and if we stop along the way or not.

The Linter tool check was completed successfully. No new "warnings" or "flagged" code. Nice!!

I'm just making a couple of changes related to output messages. Very minor stuff.

ExtremeFiretop commented 3 months ago

@Martinski4GitHub I'm done with the shower, but gotta go head out to pickup the girlfriend. Will be back in about 30 minutes or so depending on roads and if we stop along the way or not.

The Linter tool check was completed successfully. No new "warnings" or "flagged" code. Nice!!

I'm just making a couple of changes related to output messages. Very minor stuff.

Now waiting for my girlfriend to pop out of her work.

Happy to hear no warnings found! I thought my changes were pretty clean, but always appreciate the double check! As time goes on I only get more comfortable.