Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SHA256 in release doesn't match #88

Open
jkeilson opened this issue Dec 16, 2023 · 4 comments
Open

[BUG] SHA256 in release doesn't match #88

jkeilson opened this issue Dec 16, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@jkeilson
Copy link

Describe the bug
$ 7z e -scrcSHA256 pwnagotchi-v1.8.3.7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
(snip)
SHA256 for data: A53DE3B2BA0E98E5B3734B8812B38DA5DCFE58F43CA03A349E0A6E588EF8415E

does not match:

$ cat pwnagotchi-v1.8.3.sha256
4b9b73ba687c7e699e2183e9479913029420d0641b0cd9518fd962d6680d5037 pwnagotchi-raspios-lite-1.8.3.img

To Reproduce
compare sha256 sum provided with sha256 sum provided by 7z utility, commands above

Expected behavior
SHA256 checksums should match
Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version: 1.8.3 release
  • OS version: Ubuntu 22.04
  • Type of hardware: N/A
  • Any additional hardware used: N/A

Additional context

@jkeilson jkeilson added the bug Something isn't working label Dec 16, 2023
@aluminum-ice
Copy link
Owner

Please compare the checksum of the image inside the 7z file with the checksum in pwnagotchi-v1.8.3.sha256. I SHA256 the image not the compressed file.

@jkeilson
Copy link
Author

$ cat pwnagotchi-v1.8.3.sha256 
4b9b73ba687c7e699e2183e9479913029420d0641b0cd9518fd962d6680d5037  pwnagotchi-raspios-lite-1.8.3.img
$ sha256sum pwnagotchi-raspios-lite-1.8.3.img 
a53de3b2ba0e98e5b3734b8812b38da5dcfe58f43ca03a349e0a6e588ef8415e  pwnagotchi-raspios-lite-1.8.3.img
$ sha256sum pwnagotchi-v1.8.3.7z 
cddb062a8ae0a18091e961387cad92a2c807b6b71586e0f005c2fa989cfdd189  pwnagotchi-v1.8.3.7z

@aluminum-ice
Copy link
Owner


$ cat pwnagotchi-v1.8.3.sha256 

4b9b73ba687c7e699e2183e9479913029420d0641b0cd9518fd962d6680d5037  pwnagotchi-raspios-lite-1.8.3.img

$ sha256sum pwnagotchi-raspios-lite-1.8.3.img 

a53de3b2ba0e98e5b3734b8812b38da5dcfe58f43ca03a349e0a6e588ef8415e  pwnagotchi-raspios-lite-1.8.3.img

$ sha256sum pwnagotchi-v1.8.3.7z 

cddb062a8ae0a18091e961387cad92a2c807b6b71586e0f005c2fa989cfdd189  pwnagotchi-v1.8.3.7z

Interesting this should match. Must be an issue with the GitHub action. This conversation makes me realize I maybe should SHA256 the 7z file itself.

@aluminum-ice
Copy link
Owner

I see the problem. You're right. The action is calculating the SHA256 on the pre-shrunk image. It should be done after pi-shrink removes all the empty space from the image. I'll refactor the action before the next release. Thank you for noticing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants