whisperback_scripts/decrypt.sh doesn't handle Memory Hole
I think I can’t decrypt WhisperBack reports as I used to since 3.6.2.
I used to do:
gpg --quiet --output "${email%.eml}.asc" --decrypt "${email}"
But since Memory Hole (I guess), the result is something like this:
Date: Sun, 08 Apr 2018 06:27:58 +0200
From: tails-bugs@boum.org
Sender: tails-bugs-bounce@boum.org
To: sajolida@pimienta.org
Message-ID: <1234@abc.onion>
In-Reply-To:
References:
Subject: Bug report: fada5bbecbd2e5cd16ca2c82981ec031
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="--==_mimepart_5ac99a4ea3c07_28302b9a78c6536ee";
charset=UTF-8
Content-Transfer-Encoding: 7bit
List-Id: <tails-bugs.boum.org>
List-Owner: <mailto:tails-bugs-owner@boum.org> (Use list's public key)
List-Help: <https://schleuder.nadir.org/>
List-Post: <mailto:tails-bugs@boum.org>
OpenPGP: id=0x1F56EDD30741048035DAC1C5EC57B56EF0C43132 (Send an email to
tails-bugs-sendkey@boum.org to receive the public-key); preference=signencrypt
(All kind of emails are accepted)
----==_mimepart_5ac99a4ea3c07_28302b9a78c6536ee
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From: devnull@tails.boum.org
To: tails-bugs@boum.org
Cc:
Date: Sun, 08 Apr 2018 04:27:52 +0000
Sig: Unsigned
Enc: Encrypted
----==_mimepart_5ac99a4ea3c07_28302b9a78c6536ee
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: base64
Content-Disposition: inline
Content-ID: <5ac99a4eacd4c_28302b9a78c6538e7@listes.mail>
U3ViamVjdDogClRhaWxzLVZlcnNpb246IDMuNi4yIC0gMjAxODAzMjkKN2JmZmJhMTA1NTZiZDE4
ZmVlNzM4ODhhNjUxMzc3ZjE5Zjc2ZWY3ZQpsaXZlLWJ1aWxkOiAzLjAuNStyZWFsbHkraXMrMi4w
LjEyLTAudGFpbHM1CmxpdmUtYm9vdDogMToyMDE3MDExMgpsaXZlLWNvbmZpZzogNS4yMDE3MDEx
MitkZWI5dTEK
----==_mimepart_5ac99a4ea3c07_28302b9a78c6536ee--
How can I automate the extration and decoding of the base64 content?
Targetting 3.10 so I might get a volunteer at the monthly meeting :)
My current entire script is:
#!/bin/bash
find -iname "Bug report: *.eml" | while read email ; do
echo "${email}"
gpg --quiet --output "${email%.eml}.asc" --decrypt "${email}"
rm "${email}"
done
find -iname "Bug report: *.asc" | rename 's/ /_/g'
find -iname "Bug_report:_*.asc" | rename 's/Bug_report:_(.+)_-_tails-bugs\@boum\.org/$1/'
Related issues
- Related to #6876
Original created by @sajolida on 15955 (Redmine)