Im trying to install binwalk.
I simply followed this page:
https://github.com/ReFirmLabs/binwalk/blob/master/INSTALL.md
But when trying to build sasquatch, after I installed and cloned it, when using
$ (cd sasquatch && ./build.sh)
– as stated in the INSTALL.md,
What happens is that I this error:
unsquashfs.c: In function ‘read_super’:
unsquashfs.c:1835:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
1835 | if(swap)
| ^~
unsquashfs.c:1841:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
1841 | read_fs_bytes(fd, SQUASHFS_START, sizeof(struct squashfs_super_block),
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: unsquashfs.o] Error 1
I’ve no idea on what’s causing them, i’d be happy to here any advice. Thanks
2
Answers
This worked for me, you have to download and apply an unmerged patch, until the problem is fixed upstream:
https://gist.github.com/thanoskoutr/4ea24a443879aa7fc04e075ceba6f689
The github for this project has a fix for this issue, which will likely be updated in the future since it involves grabbing an un-merged patch. You can see the document here, this is a copy of that fix:
"If a compile error occurs, you have to download and apply an unmerged patch, until the problem is fixed upstream:
The following has been tested on Kali 2022.2 (Debian 5.17.11-1kali1) with Binwalk v2.3.3 and squashfs-tools v4.3"
This works assuming you have followed the steps to install and build sasquatch already: