Browse Source

fix: 修复收集windows资产用户时未收集到全部用户的问题

pull/6547/head
Bai 3 years ago committed by Jiangjie.Bai
parent
commit
0def477b63
  1. 9
      apps/assets/tasks/gather_asset_users.py

9
apps/assets/tasks/gather_asset_users.py

@ -60,9 +60,12 @@ def parse_windows_result_to_users(result):
task_result.pop() task_result.pop()
for line in task_result: for line in task_result:
user = space.split(line) username_list = space.split(line)
if user[0]: # such as: ['Admini', 'appadm', 'DefaultAccount', '']
users[user[0]] = {} for username in username_list:
if not username:
continue
users[username] = {}
return users return users

Loading…
Cancel
Save