Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
NeffIsBack committed Feb 26, 2025
1 parent 1ade4d6 commit 5da6117
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions nxc/protocols/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,18 +930,18 @@ def qwinsta(self):
return
self.enumerate_sessions_info(sessions)

maxSessionNameLen = max([len(sessions[i]["SessionName"])+1 for i in sessions])
maxSessionNameLen = maxSessionNameLen if len("SESSIONNAME") < maxSessionNameLen else len("SESSIONNAME")+1
maxUsernameLen = max([len(sessions[i]["Username"]+sessions[i]["Domain"])+1 for i in sessions])+1
maxUsernameLen = maxUsernameLen if len("Username") < maxUsernameLen else len("Username")+1
maxSessionNameLen = max([len(sessions[i]["SessionName"]) + 1 for i in sessions])
maxSessionNameLen = maxSessionNameLen if len("SESSIONNAME") < maxSessionNameLen else len("SESSIONNAME") + 1
maxUsernameLen = max([len(sessions[i]["Username"] + sessions[i]["Domain"]) + 1 for i in sessions]) + 1
maxUsernameLen = maxUsernameLen if len("Username") < maxUsernameLen else len("Username") + 1
maxIdLen = max([len(str(i)) for i in sessions])
maxIdLen = maxIdLen if len("ID") < maxIdLen else len("ID")+1
maxStateLen = max([len(sessions[i]["state"])+1 for i in sessions])
maxStateLen = maxStateLen if len("STATE") < maxStateLen else len("STATE")+1
maxRemoteIp = max([len(sessions[i]["RemoteIp"])+1 for i in sessions])
maxRemoteIp = maxRemoteIp if len("RemoteAddress") < maxRemoteIp else len("RemoteAddress")+1
maxClientName = max([len(sessions[i]["ClientName"])+1 for i in sessions])
maxClientName = maxClientName if len("ClientName") < maxClientName else len("ClientName")+1
maxIdLen = maxIdLen if len("ID") < maxIdLen else len("ID") + 1
maxStateLen = max([len(sessions[i]["state"]) + 1 for i in sessions])
maxStateLen = maxStateLen if len("STATE") < maxStateLen else len("STATE") + 1
maxRemoteIp = max([len(sessions[i]["RemoteIp"]) + 1 for i in sessions])
maxRemoteIp = maxRemoteIp if len("RemoteAddress") < maxRemoteIp else len("RemoteAddress") + 1
maxClientName = max([len(sessions[i]["ClientName"]) + 1 for i in sessions])
maxClientName = maxClientName if len("ClientName") < maxClientName else len("ClientName") + 1
template = ("{SESSIONNAME: <%d} "
"{USERNAME: <%d} "
"{ID: <%d} "
Expand Down Expand Up @@ -1022,7 +1022,7 @@ def tasklist(self):
procInfo["UniqueProcessId"],
procInfo["SessionId"],
procInfo["pSid"],
"{:,} K".format(procInfo["WorkingSetSize"]//1000),
"{:,} K".format(procInfo["WorkingSetSize"] // 1000),
)
self.logger.highlight(row)

Expand Down

0 comments on commit 5da6117

Please sign in to comment.