refactor: attempt to simplify payload

This commit is contained in:
Dobin Rutishauser
2024-06-17 10:33:34 +02:00
parent 83313538ef
commit 0d320b38d0
3 changed files with 8 additions and 10 deletions
-2
View File
@@ -10,12 +10,10 @@ class Payload():
def __init__(self, filepath: FilePath):
self.payload_path: FilePath = filepath
self.payload_data: bytes = b""
self.len: int = 0
def init(self):
logging.info("--( Load payload: {}".format(self.payload_path))
with open(self.payload_path, 'rb') as f:
self.payload_data = f.read()
self.len = len(self.payload_data)