Skip to content

Commit 47275b1

Browse files
authored
Merge pull request #101 from login-securite/3.1.12-patch1
Fix #100
2 parents d425549 + 50f308a commit 47275b1

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files

lsassy/dumpmethod/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ def __init__(self, name, file=None, content=None):
3737
self.uploaded = False
3838
self.content = content
3939
self.share_mode = False
40-
40+
4141

4242
def get_remote_path(self):
4343
return self.remote_path + self.file
4444

4545
def init(self, options):
4646
if self.content is not None:
4747
return True
48-
48+
4949
self.path = options.get("{}_path".format(self.name), self.path)
5050

5151
if not self.path:
@@ -121,7 +121,7 @@ def __init__(self, session, timeout, time_between_commands, *args, **kwargs):
121121
self._executor_copied = False
122122
self._timeout = timeout
123123
self._time_between_commands = time_between_commands
124-
124+
125125

126126
def get_exec_method(self, exec_method, no_powershell=False):
127127
try:
@@ -226,6 +226,10 @@ def dump(self, dump_path=None, dump_name=None, no_powershell=False, copy=False,
226226
if not self.custom_dump_name_support:
227227
lsassy_logger.warning("A custom dump name was provided, but dump method {} doesn't support custom dump name".format(self.__module__))
228228
lsassy_logger.warning("Dump file will be {}".format(self.dump_name))
229+
elif not self.custom_dump_ext_support:
230+
lsassy_logger.warning("A custom dump name was provided, but dump method {} doesn't support custom extension".format(self.__module__))
231+
lsassy_logger.warning("Dump file will be {}.{}".format(dump_name, self.dump_ext))
232+
self.dump_name = f"{dump_name}.{self.dump_ext}"
229233
else:
230234
self.dump_name = dump_name
231235
elif self.dump_name == "":
@@ -303,7 +307,7 @@ def dump(self, dump_path=None, dump_name=None, no_powershell=False, copy=False,
303307
continue
304308
lsassy_logger.info("Lsass dumped in C:{}{} ({} Bytes)".format(self.dump_path, self.dump_name, self._file_handle.size()))
305309
return self._file_handle
306-
310+
307311
lsassy_logger.error("All execution methods have failed")
308312
self.clean()
309313
return None

0 commit comments

Comments
 (0)