refactor: syntax, types, logging, cleanup

This commit is contained in:
Dobin Rutishauser
2025-06-09 08:59:36 +02:00
parent 015ec55975
commit 4c49f2d816
13 changed files with 120 additions and 85 deletions
+7 -2
View File
@@ -12,8 +12,13 @@ class Payload():
self.payload_data: bytes = b""
def init(self):
logging.info("--( Load payload: {}".format(self.payload_path))
def init(self) -> bool:
logging.info("-( Load payload: {}".format(self.payload_path))
if not os.path.exists(self.payload_path):
logger.error("Payload file does not exist: {}".format(self.payload_path))
return False
with open(self.payload_path, 'rb') as f:
self.payload_data = f.read()
return True