Browse Source
wine build - unsign.sh: a bit cleaner output; and no assertion failure for setup.exe
3.2.x
SomberNight
7 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
2 deletions
-
contrib/build-wine/unsign.sh
|
|
@ -20,8 +20,10 @@ version=`python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)"` |
|
|
|
echo "Found $(ls dist/*.exe | wc -w) files to verify." |
|
|
|
|
|
|
|
for mine in $(ls dist/*.exe); do |
|
|
|
echo "---------------" |
|
|
|
f=$(basename $mine) |
|
|
|
wget https://download.electrum.org/$version/$f -O signed/$f |
|
|
|
echo "Downloading https://download.electrum.org/$version/$f" |
|
|
|
wget -q https://download.electrum.org/$version/$f -O signed/$f |
|
|
|
out="signed/stripped/$f" |
|
|
|
size=$( wc -c < $mine ) |
|
|
|
# Step 1: Remove PE signature from signed binary |
|
|
@ -39,7 +41,8 @@ for b in range(4): |
|
|
|
l = len(binary) |
|
|
|
n = l - size |
|
|
|
if n > 0: |
|
|
|
assert binary[-n:] == bytearray(n) |
|
|
|
if binary[-n:] != bytearray(n): |
|
|
|
print('expecting failure for', str(pe_file)) |
|
|
|
binary = binary[:size] |
|
|
|
with open(pe_file, "wb") as f: |
|
|
|
f.write(binary) |
|
|
|