mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-11 20:27:38 +02:00
Core: Convert to format strings across the whole base
This commit is contained in:
@@ -107,5 +107,5 @@ class Bash(plugins.PluginInterface, timeliner.TimeLinerInterface):
|
||||
for row in self._generator(
|
||||
list_tasks(self.context, self.config['primary'], self.config['darwin'], filter_func = filter_func)):
|
||||
_depth, row_data = row
|
||||
description = "{} ({}): \"{}\"".format(row_data[0], row_data[1], row_data[3])
|
||||
description = f"{row_data[0]} ({row_data[1]}): \"{row_data[3]}\""
|
||||
yield (description, timeliner.TimeLinerType.CREATED, row_data[2])
|
||||
|
||||
@@ -45,7 +45,7 @@ class Ifconfig(plugins.PluginInterface):
|
||||
for ifaddr in mac.MacUtilities.walk_tailq(ifnet.if_addrhead, "ifa_link"):
|
||||
ip = ifaddr.ifa_addr.get_address()
|
||||
|
||||
yield (0, ("{0}{1}".format(name, unit), ip, mac_addr, prom))
|
||||
yield (0, (f"{name}{unit}", ip, mac_addr, prom))
|
||||
|
||||
def run(self):
|
||||
return renderers.TreeGrid([("Interface", str), ("IP Address", str), ("Mac Address", str),
|
||||
|
||||
@@ -95,7 +95,7 @@ class Netstat(plugins.PluginInterface):
|
||||
continue
|
||||
|
||||
yield (0, (format_hints.Hex(socket.vol.offset), "UNIX", path, 0, "", 0, "",
|
||||
"{}/{:d}".format(task_name, pid)))
|
||||
f"{task_name}/{pid:d}"))
|
||||
|
||||
elif family in [2, 30]:
|
||||
state = socket.get_state()
|
||||
@@ -107,7 +107,7 @@ class Netstat(plugins.PluginInterface):
|
||||
(lip, lport, rip, rport) = vals
|
||||
|
||||
yield (0, (format_hints.Hex(socket.vol.offset), proto, lip, lport, rip, rport, state,
|
||||
"{}/{:d}".format(task_name, pid)))
|
||||
f"{task_name}/{pid:d}"))
|
||||
|
||||
def run(self):
|
||||
return renderers.TreeGrid([("Offset", format_hints.Hex), ("Proto", str), ("Local IP", str), ("Local Port", int),
|
||||
|
||||
@@ -68,7 +68,7 @@ class PsList(interfaces.plugins.PluginInterface):
|
||||
list_tasks = cls.list_tasks_pid_hash_table
|
||||
else:
|
||||
raise ValueError("Impossible method choice chosen")
|
||||
vollog.debug("Using method {}".format(method))
|
||||
vollog.debug(f"Using method {method}")
|
||||
|
||||
return list_tasks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user