Fix permission bug to work in non admin contexts.

This commit is contained in:
Daniel Goldberg 2017-09-25 15:32:13 +03:00
parent 5ed6e37959
commit d5f6812a08
1 changed files with 13 additions and 1 deletions

View File

@ -78,7 +78,19 @@ class InfoCollector(object):
"cmdline": "ACCESS DENIED",
"full_image_path": "null",
}
pass
continue
except WindowsError:
# we may be running as non root
# and some processes are impossible to acquire in Windows/Linux
# in this case we'll just add what we can
processes[process.pid] = {"name": "null",
"pid": process.pid,
"ppid": process.ppid(),
"cmdline": "ACCESS DENIED",
"full_image_path": "null",
}
continue
self.info['process_list'] = processes
def get_network_info(self):