mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Updated beacons/sh.py to work with enumerate()
This commit is contained in:
parent
0ecec691a0
commit
9a14e02766
1 changed files with 3 additions and 3 deletions
|
@ -78,12 +78,12 @@ def beacon(config):
|
|||
'tag': pid}
|
||||
if 'execve' in line:
|
||||
comps = line.split('execve')[1].split('"')
|
||||
for ind in enumerate(comps):
|
||||
for ind, field in enumerate(comps):
|
||||
if ind == 1:
|
||||
event['cmd'] = comps[ind]
|
||||
event['cmd'] = field
|
||||
continue
|
||||
if ind % 2 != 0:
|
||||
event['args'].append(comps[ind])
|
||||
event['args'].append(field)
|
||||
event['user'] = __context__[pkey][pid]['user']
|
||||
ret.append(event)
|
||||
if not __context__[pkey][pid]['vt'].isalive():
|
||||
|
|
Loading…
Add table
Reference in a new issue