From fae3530fec149ad2e97f472e7b94924702d69916 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Fri, 24 May 2019 14:10:06 +0200 Subject: [PATCH] chg: [PgpDump] PMF fix - longer keys are truncated TODO: Need to be updated by an async process handling the keys --- bin/PgpDump.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/PgpDump.py b/bin/PgpDump.py index b982b9c5..0dc43621 100755 --- a/bin/PgpDump.py +++ b/bin/PgpDump.py @@ -59,6 +59,9 @@ def extract_all_id(item_content, regex): def get_pgp_packet(save_path): save_path = '{}'.format(save_path) + print (len(save_path)) + if len(save_path) > 131072: + save_path = save_path[:131071] process1 = subprocess.Popen([ 'echo', '-e', save_path], stdout=subprocess.PIPE) process2 = subprocess.Popen([ 'pgpdump'], stdin=process1.stdout, stdout=subprocess.PIPE) process1.stdout.close()