From 465cbde339cdf7f0a4e39d6535cb2fbc2de05b2d Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 15 Oct 2018 00:26:00 +0200 Subject: [PATCH] Output binaries with input file basename. --- gcd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcd.py b/gcd.py index 9584e2e..c47b194 100644 --- a/gcd.py +++ b/gcd.py @@ -170,7 +170,7 @@ with open(FILE, "rb") as f: #print(" > " + repr(payloadshort)) add_to_cksum(payload) if ttype in [0x0505, 0x02bd]: - with open("fw_{:04x}.bin".format(ttype), "ab") as of: + with open("{}_{:04x}.bin".format(FILE, ttype), "ab") as of: of.write(payload) i = i + 1