|
@@ -5,17 +5,19 @@ cmd='aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,Att
|
|
|
cmds=cmd.split(' ')
|
|
|
|
|
|
cl=subprocess.Popen(cmds, stdout=subprocess.PIPE)
|
|
|
-lines = cl.stdout.readlines()
|
|
|
+lst=[]
|
|
|
+
|
|
|
+while True:
|
|
|
+ l = cl.stdout.readline()
|
|
|
+ if '"AccessKeyId":' in l:
|
|
|
+ lst.append(l)
|
|
|
+
|
|
|
+ if '"EventName":' in l:
|
|
|
+ lst.append(l)
|
|
|
+
|
|
|
|
|
|
|
|
|
-lst=[]
|
|
|
-for l in lines:
|
|
|
- print(l)
|
|
|
-
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-
|
|
|
|
|
|
print(lst)
|
|
|
|