diff --git a/volatility/plugins/connscan.py b/volatility/plugins/connscan.py index 6ab2e374e..e76a36b8f 100644 --- a/volatility/plugins/connscan.py +++ b/volatility/plugins/connscan.py @@ -71,28 +71,36 @@ def is_valid_profile(profile): def render_text(self, outfd, data): self.table_header(outfd, [(self.offset_column(), "[addrpad]"), - ("Local Address", "25"), - ("Remote Address", "25"), + ("Local IP", "20"), + ("Local Port", "5"), + ("Remote IP", "20"), + ("Remote Port", "5"), ("Pid", "") ]) for tcp_obj in data: - local = "{0}:{1}".format(tcp_obj.LocalIpAddress, tcp_obj.LocalPort) - remote = "{0}:{1}".format(tcp_obj.RemoteIpAddress, tcp_obj.RemotePort) + localIP = tcp_obj.LocalIpAddress + localPort = tcp_obj.LocalPort + remoteIP = tcp_obj.RemoteIpAddress + remotePort = tcp_obj.RemotePort self.table_row(outfd, tcp_obj.obj_offset, - local, remote, + localIP, localPort, remoteIP, remotePort, tcp_obj.Pid) def unified_output(self, data): return TreeGrid([("Offset(P)", Address), - ("LocalAddress", str), - ("RemoteAddress", str), + ("LocalIP", str), + ("LocalPort", str), + ("RemoteIP", str), + ("RemotePort", str), ("PID", int)], self.generator(data)) def generator(self, data): for conn in data: - local = "{0}:{1}".format(conn.LocalIpAddress, conn.LocalPort) - remote = "{0}:{1}".format(conn.RemoteIpAddress, conn.RemotePort) - yield (0, [Address(conn.obj_offset), str(local), str(remote), int(conn.Pid)]) + localIP = conn.LocalIpAddress + localPort = conn.LocalPort + remoteIP = conn.RemoteIpAddress + remotePort = conn.RemotePort + yield (0, [Address(conn.obj_offset), str(localIP), str(localPort), str(remoteIP), str(remotePort), int(conn.Pid)])