For the first step, I would advise reading the file and then using od to get the octal (no binary, as far as I can see) representation, because the standard awk does not cope with NUL (I think gawk too). So after you get the bytes, you pass it through a sed script to change the octal to binary, take the output using $() (or apostrophes) and create the URL that you pass to wget .
The only problem I see is locked / not locked, read from usb. Notify if there will be.
user332325
source share