mirror of https://github.com/n1nj4sec/pupy.git
fix unicode errors in netstat
This commit is contained in:
parent
771f182baa
commit
60966145db
|
@ -69,10 +69,10 @@ class NetStatModule(PupyModule):
|
||||||
'LADDR': colorize(':'.join([str(x) for x in connection['laddr']]), color),
|
'LADDR': colorize(':'.join([str(x) for x in connection['laddr']]), color),
|
||||||
'RADDR': colorize(':'.join([str(x) for x in connection['raddr']]), color),
|
'RADDR': colorize(':'.join([str(x) for x in connection['raddr']]), color),
|
||||||
'PID': colorize(connection.get('pid', ''), color),
|
'PID': colorize(connection.get('pid', ''), color),
|
||||||
'USER': colorize(connection.get('username', ''), color),
|
'USER': colorize(connection.get('username', '').encode('utf8','replace'), color),
|
||||||
'EXE': colorize(
|
'EXE': colorize(
|
||||||
connection.get(
|
connection.get(
|
||||||
'exe', connection.get('name', '')
|
'exe', connection.get('name', '').encode('utf8','replace')
|
||||||
), color)
|
), color)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue