From 6b9ba923445f707a75d13f7167175e4f055a80a1 Mon Sep 17 00:00:00 2001 From: RichHacks <130282574+RichHacks@users.noreply.github.com> Date: Wed, 12 Feb 2025 19:40:48 +0000 Subject: [PATCH 1/2] Update OleAutomation.py fix a bug in the transition from python2 to python3 --- OleAutomation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OleAutomation.py b/OleAutomation.py index 0c0904d..47b29cd 100644 --- a/OleAutomation.py +++ b/OleAutomation.py @@ -181,7 +181,7 @@ def putFile (self, localFile, remoteFile): ''' logging.info("Copying the local file {0} to {1}".format(localFile, remoteFile)) data = getBinaryDataFromFile(localFile) - dataEncoded = "0x"+data.encode('hex') + dataEncoded = "0x"+data.hex() status = self.writeFileBinary(remoteFile, dataEncoded) if isinstance(status,Exception): logging.info("Impossible to create the remote file {0}".format(remoteFile)) From ed5d88cd985720e39f70156e9069bc13e5a44e52 Mon Sep 17 00:00:00 2001 From: RichHacks <130282574+RichHacks@users.noreply.github.com> Date: Wed, 12 Feb 2025 19:56:43 +0000 Subject: [PATCH 2/2] Update OleAutomation.py --- OleAutomation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OleAutomation.py b/OleAutomation.py index 47b29cd..fc2aef1 100644 --- a/OleAutomation.py +++ b/OleAutomation.py @@ -181,7 +181,7 @@ def putFile (self, localFile, remoteFile): ''' logging.info("Copying the local file {0} to {1}".format(localFile, remoteFile)) data = getBinaryDataFromFile(localFile) - dataEncoded = "0x"+data.hex() + dataEncoded = "0x" + data.hex() status = self.writeFileBinary(remoteFile, dataEncoded) if isinstance(status,Exception): logging.info("Impossible to create the remote file {0}".format(remoteFile))