mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-20 18:09:48 +00:00
unsign: fetch signed files with wget
This commit is contained in:
parent
0119ab9ee1
commit
7ac402c224
1 changed files with 12 additions and 9 deletions
|
@ -11,17 +11,20 @@ fi
|
||||||
# exit if command fails
|
# exit if command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
mkdir -p stripped >/dev/null 2>&1
|
rm -rf signed
|
||||||
|
mkdir -p signed >/dev/null 2>&1
|
||||||
|
mkdir -p signed/stripped >/dev/null 2>&1
|
||||||
|
|
||||||
cd signed
|
version=3.2.0
|
||||||
|
|
||||||
echo "Found $(ls *.exe | wc -w) files to verify."
|
echo "Found $(ls *.exe | wc -w) files to verify."
|
||||||
for signed in $(ls *.exe); do
|
for mine in $(ls dist/*.exe); do
|
||||||
mine="../dist/$signed"
|
f=$(basename $mine)
|
||||||
out="../stripped/$signed"
|
wget https://download.electrum.org/$version/$f -O signed/$f
|
||||||
|
out="signed/stripped/$f"
|
||||||
size=$( wc -c < $mine )
|
size=$( wc -c < $mine )
|
||||||
# Step 1: Remove PE signature from signed binary
|
# Step 1: Remove PE signature from signed binary
|
||||||
osslsigncode remove-signature -in $signed -out $out > /dev/null 2>&1
|
osslsigncode remove-signature -in signed/$f -out $out > /dev/null 2>&1
|
||||||
# Step 2: Remove checksum and padding from signed binary
|
# Step 2: Remove checksum and padding from signed binary
|
||||||
python3 <<EOF
|
python3 <<EOF
|
||||||
pe_file = "$out"
|
pe_file = "$out"
|
||||||
|
@ -42,9 +45,9 @@ with open(pe_file, "wb") as f:
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out
|
chmod +x $out
|
||||||
if [ ! $(diff $out $mine) ]; then
|
if [ ! $(diff $out $mine) ]; then
|
||||||
echo "Success: $signed"
|
echo "Success: $f"
|
||||||
#gpg --sign --armor --detach $signed
|
gpg --sign --armor --detach signed/$f
|
||||||
else
|
else
|
||||||
echo "Failure: $signed"
|
echo "Failure: $f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue