Skip to content

Commit a3c50e8

Browse files
author
Dave Lassalle
committed
#816 - black fixes
1 parent 583cffe commit a3c50e8

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

volatility3/framework/plugins/windows/consoles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ def get_console_info(
619619
bucket_cmd,
620620
) in command_history.get_commands():
621621
try:
622-
console_properties.append({
622+
console_properties.append(
623+
{
623624
"level": 3,
624625
"name": f"_CONSOLE_INFORMATION.HistoryList.CommandHistory_{index}_Command_{cmd_index}",
625626
"address": bucket_cmd.vol.offset,

volatility3/framework/symbols/windows/extensions/consoles.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def _valid_dbcs(self, c):
2323
0x50,
2424
0x60,
2525
0x80,
26-
0xa8,
27-
0xc0,
28-
0xc8,
26+
0xA8,
27+
0xC0,
28+
0xC8,
2929
0x98,
3030
0xF8,
3131
0xF0,
@@ -226,7 +226,12 @@ class COMMAND(objects.StructType):
226226
"""A Command Structure"""
227227

228228
def is_valid(self):
229-
if self.Length < 1 or self.Allocated < 1 or self.Length > 1024 or self.Allocated > 1024:
229+
if (
230+
self.Length < 1
231+
or self.Allocated < 1
232+
or self.Length > 1024
233+
or self.Allocated > 1024
234+
):
230235
return False
231236

232237
return True
@@ -256,7 +261,7 @@ def CommandCount(self):
256261

257262
@property
258263
def ProcessHandle(self):
259-
""" Allow ProcessHandle to be referenced regardless of OS version """
264+
"""Allow ProcessHandle to be referenced regardless of OS version"""
260265
return self.ConsoleProcessHandle.ProcessHandle
261266

262267
def is_valid(self, max_history=50):
@@ -269,7 +274,11 @@ def is_valid(self, max_history=50):
269274
return False
270275

271276
# Process handle must be a valid pid
272-
if self.ProcessHandle <= 0 or self.ProcessHandle > 0xFFFF or self.ProcessHandle % 4 != 0:
277+
if (
278+
self.ProcessHandle <= 0
279+
or self.ProcessHandle > 0xFFFF
280+
or self.ProcessHandle % 4 != 0
281+
):
273282
return False
274283

275284
return True

0 commit comments

Comments
 (0)