Bug #15955

whisperback_scripts/decrypt.sh doesn't handle Memory Hole

Added by sajolida 2018-09-14 13:17:21 . Updated 2018-10-01 13:29:43 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2018-09-14
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

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/'

Subtasks


Related issues

Related to Tails - Feature #6876: Have the incremental upgrade process use less RAM Resolved

History

#1 Updated by intrigeri 2018-09-14 14:16:05

> But since Memory Hole (I guess), the result is something like this:

My 2cts: I think Memory Hole has nothing to do with it (AFAIK neither WhisperBack nor Schleuder generate Memory Hole -enabled messages). I think the upgrade to Schleuder 3.x is a more plausible explanation.

> How can I automate the extration and decoding of the base64 content?

(/me coming back from apt search): I would first give mailtextbody, mimefilter and ripmime a try. Hopefully one of those can do exactly what you want very cheaply :)
But let’s keep Feature #8722 in mind: a too simplistic solution to the problem at hand may quickly stop working, so perhaps pick a solution that gives at least some flexibility on what MIME part we extract.

#2 Updated by sajolida 2018-09-15 09:00:58

  • Assignee set to sajolida

Hey, I managed to get some working code using Ruby librairies super fast, so I’ll continue working on this myself.

#3 Updated by intrigeri 2018-09-15 10:15:44

> Hey, I managed to get some working code using Ruby librairies super fast, so I’ll continue working on this myself.

Woohoo!

#4 Updated by sajolida 2018-09-15 20:32:47

  • Status changed from Confirmed to Resolved
  • Assignee deleted (sajolida)

Solved in 0222813. Yeah!

#5 Updated by sajolida 2018-09-17 17:14:05

  • related to Feature #6876: Have the incremental upgrade process use less RAM added

#6 Updated by intrigeri 2018-10-01 13:29:43

  • Target version changed from Tails_3.10.1 to Tails_3.9.1