-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathTimeline2.xml
664 lines (651 loc) · 31.4 KB
/
Timeline2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
<?xml version="1.0" encoding="utf-8"?>
<Artifacts version="2.0">
<Artifact type="SqliteArtifact" name="Win 10 Timeline (1803,1809,1903+)" version="2" platform="Computer">
<Source type="FileName">ActivitiesCache.db</Source>
<Query>
SELECT -- This the ActivityOperation Table Query
ActivityOperation.ETag as 'Etag',
case
when json_extract(ActivityOperation.AppId, '$[0].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(ActivityOperation.AppId, '$[0].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when json_extract(ActivityOperation.AppId, '$[1].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(ActivityOperation.AppId, '$[1].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when length (json_extract(ActivityOperation.AppId, '$[1].application')) between 17 and 22
then
replace(replace(replace(replace(replace
(json_extract(ActivityOperation.AppId, '$[0].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)'),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
else replace(replace(replace(replace(replace(json_extract(ActivityOperation.AppId,
'$[1].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)' ),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
end as 'Application',
case
when ActivityOperation.ActivityType = 5
then json_extract(ActivityOperation.Payload, '$.appDisplayName')
else ''
end as 'DisplayName',
case
when ActivityOperation.ActivityType = 5 and json_extract(ActivityOperation.Payload, '$.displayText') notnull
then json_extract(ActivityOperation.Payload, '$.displayText')
else ''
end as 'DisplayText',
case
when ActivityOperation.ActivityType = 5 and json_extract(ActivityOperation.Payload, '$.description') notnull
then json_extract(ActivityOperation.Payload, '$.description')
else ''
end as 'Description',
case
when ActivityOperation.ActivityType = 5 and json_extract(ActivityOperation.Payload, '$.contenturi') notnull
then json_extract(ActivityOperation.Payload, '$.contenturi')
else ''
end as 'Content',
trim(ActivityOperation.AppActivityId,'ECB32AF3-1440-4086-94E3-5311F97F89C4\') as 'AppActivityId',
case
when ActivityOperation.ActivityType = 10 and json_extract(ActivityOperation.Payload,'$') notnull
then json_extract(ActivityOperation.Payload,'$')
when ActivityOperation.ActivityType in (11,12,15) and ActivityOperation.Payload notnull
then ActivityOperation.Payload
when ActivityOperation.ActivityType = 5 and json_extract(ActivityOperation.Payload, '$.shellContentDescription') like '%FileShellLink%'
then json_extract(ActivityOperation.Payload, '$.shellContentDescription.FileShellLink')
when ActivityOperation.ActivityType = 6
then json_extract(ActivityOperation.Payload, '$.type')||' - ' ||json_extract(ActivityOperation.Payload,'$.userTimezone')
else ''
end as 'Payload/Timezone',
case
when ActivityOperation.ActivityType = 5 then 'Open App/File/Page ('||ActivityOperation.ActivityType||')'
when ActivityOperation.ActivityType = 6 then 'App In Use/Focus ('||ActivityOperation.ActivityType||')'
when ActivityOperation.ActivityType = 10 then 'Clipboard ('||ActivityOperation.ActivityType||')'
when ActivityOperation.ActivityType = 16 then 'Copy/Paste ('||ActivityOperation.ActivityType||')'
when ActivityOperation.ActivityType in (11,12,15) then 'System ('||ActivityOperation.ActivityType||')'
else ActivityOperation.ActivityType
end as 'ActivityType',
case
when ActivityOperation."Group" notnull
then ActivityOperation."Group"
else ''
end as 'Group',
case
when json_extract(ActivityOperation.AppId, '$') like '%afs_crossplatform%'
then 'Yes'
else 'No'
end as 'Synced',
case
when json_extract(ActivityOperation.AppId, '$[0].platform') = 'afs_crossplatform'
then json_extract(ActivityOperation.AppId, '$[1].platform')
else json_extract(ActivityOperation.AppId, '$[0].platform')
end as 'Platform',
case ActivityOperation.OperationType
when 1 then 'Active'
when 2 then 'Updated'
when 3 then 'Deleted'
when 4 then 'Ignored'
end as 'TileStatus',
'Yes' as 'UploadQueue',
'' as 'IsLocalOnly',
case
when ActivityOperation.OperationOrder notnull
then ActivityOperation.OperationOrder
else ''
end as 'Order',
case
when ActivityOperation.ActivityType in (11,12,15)
then ''
else coalesce(json_extract(ActivityOperation.Payload, '$.activationUri'),json_extract(ActivityOperation.Payload, '$.reportingApp'))
end as 'AppUri',
ActivityOperation.Priority as 'Priority',
case
when ActivityOperation.ActivityType = 6 and ActivityOperation.Payload notnull
then time(json_extract(ActivityOperation.Payload, '$.activeDurationSeconds'),'unixepoch')
else ''
end as 'ActiveDuration',
case
when 0 >= cast((ActivityOperation.EndTime - ActivityOperation.StartTime) as integer) then '-'
else time(cast((ActivityOperation.EndTime - ActivityOperation.StartTime) as integer),'unixepoch')
end as 'CalculatedDuration',
ActivityOperation.StartTime as 'StartTime',
ActivityOperation.LastModifiedTime as 'LastModified',
case
when ActivityOperation.OriginalLastModifiedOnClient > 0
then ActivityOperation.OriginalLastModifiedOnClient
else ''
end as 'LastModifiedOnClient',
case
when ActivityOperation.EndTime > 0
then ActivityOperation.EndTime
else ''
end as 'EndTime',
case
when ActivityOperation.CreatedInCloud > 0
then ActivityOperation.CreatedInCloud
else ''
end as 'CreatedInCloud',
case
when ActivityOperation.ActivityType = 10
then cast((ActivityOperation.ExpirationTime - ActivityOperation.LastModifiedTime)/3600 as integer)||' hours'
else cast((ActivityOperation.ExpirationTime - ActivityOperation.LastModifiedTime)/86400 as integer)||' days'
end as 'ExpiresIn',
ActivityOperation.ExpirationTime as 'Expiration',
case
when ActivityOperation.Tag notnull
then ActivityOperation.Tag
else ''
end as 'Tag',
case
when ActivityOperation.MatchId notnull
then ActivityOperation.MatchId
else ''
end as 'MatchID',
ActivityOperation.PlatformDeviceId as 'DeviceID',
ActivityOperation.PackageIdHash as 'PackageIdHash',
'{' || substr(hex(ActivityOperation.Id), 1, 8) || '-' ||
substr(hex(ActivityOperation.Id), 9, 4) || '-' ||
substr(hex(ActivityOperation.Id), 13, 4) || '-' ||
substr(hex(ActivityOperation.Id), 17, 4) || '-' ||
substr(hex(ActivityOperation.Id), 21, 12) || '}' as 'ID',
case
when hex(ActivityOperation.ParentActivityId) = '00000000000000000000000000000000'
then '' else
'{' || substr(hex(ActivityOperation.ParentActivityId), 1, 8) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 9, 4) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 13, 4) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 17, 4) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 21, 12) || '}'
end as 'ParentActivityId',
case
when ActivityOperation.ActivityType = 16
then json_extract(ActivityOperation.Payload, '$.clipboardDataId')
else ''
end as 'ClipboardDataId',
case
when ActivityOperation.ActivityType = 10
then json_extract(ActivityOperation.ClipboardPayload,'$[0].content')
else ''
end as 'ClipboardText', -- The text is Base64 Encoded
case
when ActivityOperation.ActivityType = 16
then json_extract(ActivityOperation.Payload, '$.gdprType')
else ''
end as 'gdprType',
ActivityOperation.GroupAppActivityId as 'GroupAppActivityId',
ActivityOperation.EnterpriseId as 'EnterpriseId',
case
when ActivityOperation.OriginalPayload notnull
then ActivityOperation.OriginalPayload
else ''
end as 'OriginalPayload'
from ActivityOperation
join Activity on ActivityOperation.Id = Activity.Id
union
select -- This the Activity Table Query
Activity.ETag as 'Etag',
case
when json_extract(Activity.AppId, '$[0].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(Activity.AppId, '$[0].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when json_extract(Activity.AppId, '$[1].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(Activity.AppId, '$[1].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when length (json_extract(Activity.AppId, '$[0].application')) between 17 and 22
then replace(replace(replace(replace(replace(json_extract(Activity.AppId, '$[1].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)' ),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
else replace(replace(replace(replace(replace
(json_extract(Activity.AppId, '$[0].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)'),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System'),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
end as 'Application',
case
when Activity.ActivityType = 5
then json_extract(Activity.Payload, '$.appDisplayName')
else ''
end as 'DisplayName',
case
when Activity.ActivityType = 5 and json_extract(Activity.Payload, '$.displayText') notnull
then json_extract(Activity.Payload, '$.displayText')
else ''
end as 'DisplayText',
case
when Activity.ActivityType = 5 and json_extract(Activity.Payload, '$.description') notnull
then json_extract(Activity.Payload, '$.description')
else ''
end as 'Description',
case
when Activity.ActivityType = 5 and json_extract(Activity.Payload, '$.contentUri') notnull
then json_extract(Activity.Payload, '$.contentUri')
else ''
end as 'Content',
trim(Activity.AppActivityId,'ECB32AF3-1440-4086-94E3-5311F97F89C4\') as 'AppActivityId',
case
when Activity.ActivityType = 10 and json_extract(Activity.Payload,'$') notnull
then json_extract(Activity.Payload,'$')
when Activity.ActivityType in (11,12,15) and Activity.Payload notnull
then Activity.Payload
when Activity.ActivityType = 5 and json_extract(Activity.Payload, '$.shellContentDescription') like '%FileShellLink%'
then json_extract(Activity.Payload, '$.shellContentDescription.FileShellLink')
when Activity.ActivityType = 6
then json_extract(Activity.Payload, '$.type')||' - ' ||json_extract(Activity.Payload,'$.userTimezone')
else ''
end as 'Payload/Timezone',
case
when Activity.ActivityType = 5 then 'Open App/File/Page ('||Activity.ActivityType||')'
when Activity.ActivityType = 6 then 'App In Use/Focus ('||Activity.ActivityType||')'
when Activity.ActivityType = 10 then 'Clipboard ('||Activity.ActivityType||')'
when Activity.ActivityType = 16 then 'Copy/Paste ('||Activity.ActivityType||')'
when Activity.ActivityType in (11,12,15) then 'System('||Activity.ActivityType||')'
else Activity.ActivityType
end as 'ActivityType',
case
when Activity."Group" notnull
then Activity."Group"
end as 'Group',
case
when json_extract(Activity.AppId, '$') like '%afs_crossplatform%'
then 'Yes'
else 'No'
end as 'Synced',
case
when json_extract(Activity.AppId, '$[0].platform') = 'afs_crossplatform'
then json_extract(Activity.AppId, '$[1].platform')
else json_extract(Activity.AppId, '$[0].platform')
end as 'Platform',
case Activity.ActivityStatus
when 1 then 'Active'
when 2 then 'Updated'
when 3 then 'Deleted'
when 4 then 'Ignored'
end as 'TileStatus',
'' as 'UploadQueue',
case Activity.IsLocalOnly
when 0 then 'No'
when 1 then 'Yes'
else Activity.IsLocalOnly
end as 'IsLocalOnly',
'' as 'Order',
case
when Activity.ActivityType in (11,12,15)
then ''
else coalesce(json_extract(Activity.Payload, '$.activationUri'),json_extract(Activity.Payload, '$.reportingApp'))
end as 'AppUri',
Activity.Priority as 'Priority',
case
when Activity.ActivityType = 6 and Activity.Payload notnull
then time(json_extract(Activity.Payload, '$.activeDurationSeconds'),'unixepoch')
else ''
end as 'ActiveDuration',
case
when 0 >= cast ((Activity.EndTime - Activity.StartTime) as integer)
then ''
else time(cast((Activity.EndTime - Activity.StartTime) as integer),'unixepoch')
end as 'CalculatedDuration',
Activity.StartTime as 'StartTime',
Activity.LastModifiedTime as 'LastModified',
case
when Activity.OriginalLastModifiedOnClient > 0
then Activity.OriginalLastModifiedOnClient
else ''
end as 'LastModifiedOnClient',
case
when Activity.EndTime > 0
then Activity.EndTime
else ''
end as 'EndTime',
case
when Activity.CreatedInCloud > 0
then Activity.CreatedInCloud
else ''
end as 'CreatedInCloud',
case
when Activity.ActivityType = 10
then cast((Activity.ExpirationTime - Activity.LastModifiedTime)/3600 as integer)||' hours'
else cast((Activity.ExpirationTime - Activity.LastModifiedTime)/86400 as integer)||' days'
end as 'ExpiresIn',
Activity.ExpirationTime as 'Expiration',
case
when Activity.Tag notnull
then Activity.Tag
else ''
end as 'Tag',
case
when Activity.MatchId notnull
then Activity.MatchId
else ''
end as 'MatchID',
Activity.PlatformDeviceId as 'Device ID',
Activity.PackageIdHash as 'PackageIdHash',
'{' || substr(hex(Activity.Id), 1, 8) || '-' ||
substr(hex(Activity.Id), 9, 4) || '-' ||
substr(hex(Activity.Id), 13, 4) || '-' ||
substr(hex(Activity.Id), 17, 4) || '-' ||
substr(hex(Activity.Id), 21, 12) || '}' as 'ID',
case
when hex(Activity.ParentActivityId) = '00000000000000000000000000000000'
then ''
else
'{' || substr(hex(Activity.ParentActivityId), 1, 8) || '-' ||
substr(hex(Activity.ParentActivityId), 9, 4) || '-' ||
substr(hex(Activity.ParentActivityId), 13, 4) || '-' ||
substr(hex(Activity.ParentActivityId), 17, 4) || '-' ||
substr(hex(Activity.ParentActivityId), 21, 12) || '}'
end as 'ParentActivityId',
case
when Activity.ActivityType = 16
then json_extract(Activity.Payload, '$.clipboardDataId')
else ''
end as 'ClipboardDataId',
case
when Activity.ActivityType = 10
then json_extract(Activity.ClipboardPayload,'$[0].content')
else ''
end as 'ClipboardText', -- The text is Base64 Encoded
case
when Activity.ActivityType = 16
then json_extract(Activity.Payload, '$.gdprType')
else ''
end as 'gdprType',
Activity.GroupAppActivityId as 'GroupAppActivityId',
Activity.EnterpriseId as 'EnterpriseId',
case
when Activity.OriginalPayload notnull
then Activity.OriginalPayload
else ''
end as 'OriginalPayload'
from Activity
where Activity.Id not in (select ActivityOperation.Id from ActivityOperation)
order by Etag desc
</Query>
<Fragments>
<Fragment source="Etag" alias="ETAG" datatype="Integer" category="none"/>
<Fragment source="Application" alias="Application ID" datatype="String" category="none" />
<Fragment source="DisplayName" alias="Display Name" datatype="String" category="none" />
<Fragment source="DisplayText" alias="DisplayText" datatype="String" category="none" />
<Fragment source="Description" alias="Description" datatype="String" category="none" />
<Fragment source="Content" alias="Content" datatype="String" category="none" />
<Fragment source="AppActivityId" alias="App Activity Id" datatype="String" category="none" />
<Fragment source="PayloadTimezone" alias="Payload-Timezone" datatype="String" category="none" />
<Fragment source="ActivityType" alias="Activity Type" datatype="String" category="none" />
<Fragment source="Group" alias="Group" datatype="String" category="none" />
<Fragment source="Synced" alias="Synced" datatype="String" category="none" />
<Fragment source="Platform" alias="Application Type" datatype="String" category="none" />
<Fragment source="TileStatus" alias="Tile Status" datatype="String" category="none" />
<Fragment source="UploadQueue" alias="In Upload Queue" datatype="String" category="none" />
<Fragment source="IsLocalOnly" alias="Is Local Only" datatype="String" category="none" />
<Fragment source="Order" alias="Order" datatype="Integer" category="none" />
<Fragment source="AppUri" alias="App-Uri" datatype="String" category="none" />
<Fragment source="Priority" alias="Priority" datatype="String" category="none" />
<Fragment source="ActiveDuration" alias="Active Duration" datatype="String" category="none" />
<Fragment source="CalculatedDuration" alias="Calculated Duration" datatype="String" category="none" />
<Fragment source="StartTime" alias="Start Time" datatype="DateTime" category="DateTime" />
<Fragment source="LastModified" alias="Last Modified Time" datatype="DateTime" category="DateTime" />
<Fragment source="LastModifiedOnClient" alias="LastModified On Client" datatype="DateTime" category="DateTime" />
<Fragment source="EndTime" alias="End Time" datatype="DateTime" category="DateTime" />
<Fragment source="CreatedInCloud" alias="Created In Cloud" datatype="DateTime" category="DateTime" />
<Fragment source="ExpiresIn" alias="Expires In" datatype="String" category="none" />
<Fragment source="Expiration" alias="Expiration Time" datatype="DateTime" category="DateTime" />
<Fragment source="Tag" alias="Tag" datatype="String" category="none" />
<Fragment source="MatchID" alias="MatchID" datatype="String" category="none" />
<Fragment source="DeviceID" alias="Platform DeviceId" datatype="String" category="none" />
<Fragment source="PackageIdHash" alias="PackageId Hash" datatype="String" category="none" />
<Fragment source="ID" alias="Activity Id" datatype="String" category="none" />
<Fragment source="ParentActivityId" alias="ParentActivityId" datatype="String" category="none" />
<Fragment source="ClipboardDataId" alias="Clipboard Data Id" datatype="String" category="none" />
<Fragment source="ClipboardText" alias="Clipboard Text" datatype="String" category="none" />
<Fragment source="gdprType" alias="gdpr Type" datatype="String" category="none" />
<Fragment source="GroupAppActivityId" alias="GroupApp ActivityId" datatype="String" category="none" />
<Fragment source="EnterpriseId" alias="EnterpriseId" datatype="String" category="none" />
<Fragment source="OriginalPayload" alias="Original Payload" datatype="String" category="none" />
</Fragments>
</Artifact>
<Artifact type="SqliteArtifact" name="Win 10 Clipboard (v1903+)" version="2" platform="Computer">
<Source type="FileName">ActivitiesCache.db</Source>
<Query>
Select
ActivityOperation.ETag as 'ETAG',
ActivityOperation.StartTime as 'StartTime',
ActivityOperation.LastModifiedTime as 'LastModified',
case
when json_extract(ActivityOperation.AppId, '$[0].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(ActivityOperation.AppId, '$[0].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when json_extract(ActivityOperation.AppId, '$[1].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(ActivityOperation.AppId, '$[1].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when length (json_extract(ActivityOperation.AppId, '$[1].application')) between 17 and 22
then replace(replace(replace(replace(replace
(json_extract(ActivityOperation.AppId, '$[0].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)'),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
else replace(replace(replace(replace(replace(json_extract(ActivityOperation.AppId,
'$[1].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)' ),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
end as 'Application',
case
when json_extract(ActivityOperation.ClipboardPayload, '$[0].formatName') = 'Text'
then json_extract(ActivityOperation.ClipboardPayload, '$[0].content')
else ''
end as 'ClipText',
json_extract(ActivityOperation.ClipboardPayload, '$[0].formatName') as 'Format',
case
when ActivityOperation.Payload notnull
then json_extract(ActivityOperation.Payload, '$.1[0].content')
else ''
end as 'PayloadContent',
case
when ActivityOperation.Payload notnull
then json_extract(ActivityOperation.Payload, '$.1[0].formatName')
else ''
end as 'ClipType',
case ActivityOperation.ActivityType
when 10 then 'Clipboard ('||Activity.ActivityType||')'
when 16 then 'Copy/Paste('||Activity.ActivityType||')'
end as 'ActivityType',
ActivityOperation."Group" as 'Group',
ActivityOperation.GroupAppActivityId as 'GroupAppActivityId',
'{' || substr(hex(ActivityOperation.Id), 1, 8) || '-' ||
substr(hex(ActivityOperation.Id), 9, 4) || '-' ||
substr(hex(ActivityOperation.Id), 13, 4) || '-' ||
substr(hex(ActivityOperation.Id), 17, 4) || '-' ||
substr(hex(ActivityOperation.Id), 21, 12) || '}' as 'ActivityId',
case
when hex(ActivityOperation.ParentActivityId) = '00000000000000000000000000000000'
then '' else
'{' || substr(hex(ActivityOperation.ParentActivityId), 1, 8) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 9, 4) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 13, 4) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 17, 4) || '-' ||
substr(hex(ActivityOperation.ParentActivityId), 21, 12) || '}'
end as 'ParentActivityId',
case
when ActivityOperation.ActivityType = 16
then json_extract(ActivityOperation.Payload, '$.clipboardDataId')
else ''
end as 'clipboardDataId',
ActivityOperation.PlatformDeviceId as 'PlatformDeviceId',
case
when ActivityOperation.ActivityType = 10
then cast((ActivityOperation.ExpirationTime - ActivityOperation.LastModifiedTime)/3600 as integer)||' hours'
else cast((ActivityOperation.ExpirationTime - ActivityOperation.LastModifiedTime)/86400 as integer)||' days'
end as 'ExpiresIn',
case
when ActivityOperation.OriginalLastModifiedOnClient != 0 then
ActivityOperation.OriginalLastModifiedOnClient
else ''
end as 'LastModifiedOnClient',
case
when ActivityOperation.EndTime != 0
then ActivityOperation.EndTime
else ''
end as 'EndTime',
case
when ActivityOperation.CreatedInCloud != 0
then ActivityOperation.CreatedInCloud
else ''
end as 'CreatedInCloud',
ActivityOperation.ExpirationTime as 'ExpirationTime',
'' as 'IsLocalOnly',
ActivityOperation.PackageIdHash as 'PackageIdHash'
from ActivityOperation
join Activity
on ActivityOperation.Id = Activity.Id
and ActivityOperation.ActivityType in (10,16)
UNION
Select
Activity.ETag as 'ETAG',
Activity.StartTime as 'StartTime',
Activity.LastModifiedTime as 'LastModified',
case
when json_extract(Activity.AppId, '$[0].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(Activity.AppId, '$[0].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when json_extract(Activity.AppId, '$[1].application') = '308046B0AF4A39CB'
then 'Mozilla Firefox-64bit'
when json_extract(Activity.AppId, '$[1].application') = 'E7CF176E110C211B'
then 'Mozilla Firefox-32bit'
when length (json_extract(Activity.AppId, '$[1].application')) between 17 and 22
then
replace(replace(replace(replace(replace
(json_extract(Activity.AppId, '$[0].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)'),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
else replace(replace(replace(replace(replace(json_extract(Activity.AppId,
'$[1].application'),
'{'||'6D809377-6AF0-444B-8957-A3773F02200E'||'}', '*ProgramFiles (x64)' ),
'{'||'7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E'||'}', '*ProgramFiles (x32)'),
'{'||'1AC14E77-02E7-4E5D-B744-2EB1AE5198B7'||'}', '*System' ),
'{'||'F38BF404-1D43-42F2-9305-67DE0B28FC23'||'}', '*Windows'),
'{'||'D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27'||'}', '*System32')
end as 'Application',
case
when json_extract(Activity.ClipboardPayload, '$[0].formatName') = 'Text'
then json_extract(Activity.ClipboardPayload, '$[0].content')
else ''
end as 'ClipText',
json_extract(Activity.ClipboardPayload, '$[0].formatName') as 'Format',
case
when Activity.Payload notnull
then json_extract(Activity.Payload, '$.1[0].content')
else ''
end as 'PayloadContent',
case
when Activity.Payload notnull
then json_extract(Activity.Payload, '$.1[0].formatName')
else ''
end as 'ClipType',
case Activity.ActivityType
when 10 then 'Clipboard ('||Activity.ActivityType||')'
when 16 then 'Copy/Paste('||Activity.ActivityType||')'
end as 'ActivityType',
Activity."Group" as 'Group',
Activity.GroupAppActivityId as 'GroupAppActivityId',
'{' || substr(hex(Activity.Id), 1, 8) || '-' ||
substr(hex(Activity.Id), 9, 4) || '-' ||
substr(hex(Activity.Id), 13, 4) || '-' ||
substr(hex(Activity.Id), 17, 4) || '-' ||
substr(hex(Activity.Id), 21, 12) || '}' as 'ActivityId',
case
when hex(Activity.ParentActivityId) = '00000000000000000000000000000000'
then '' else
'{' || substr(hex(Activity.ParentActivityId), 1, 8) || '-' ||
substr(hex(Activity.ParentActivityId), 9, 4) || '-' ||
substr(hex(Activity.ParentActivityId), 13, 4) || '-' ||
substr(hex(Activity.ParentActivityId), 17, 4) || '-' ||
substr(hex(Activity.ParentActivityId), 21, 12) || '}'
end as 'ParentActivityId',
case
when Activity.ActivityType = 16
then json_extract(Activity.Payload, '$.clipboardDataId')
else ''
end as 'clipboardDataId',
Activity.PlatformDeviceId as 'PlatformDeviceId',
case
when Activity.ActivityType = 10
then cast((Activity.ExpirationTime - Activity.LastModifiedTime)/3600 as integer)||' hours'
else cast((Activity.ExpirationTime - Activity.LastModifiedTime)/86400 as integer)||' days'
end as 'Expires In',
case
when Activity.OriginalLastModifiedOnClient != 0 then
Activity.OriginalLastModifiedOnClient
else ''
end as 'LastModifiedOnClient',
case
when Activity.EndTime != 0
then Activity.EndTime
else ''
end as 'EndTime',
case
when Activity.CreatedInCloud != 0
then Activity.CreatedInCloud
else ''
end as 'CreatedInCloud',
Activity.ExpirationTime as 'ExpirationTime',
case Activity.IsLocalOnly
when 0 then 'No'
when 1 then 'Yes'
else Activity.IsLocalOnly
end as 'IsLocalOnly',
Activity.PackageIdHash as 'PackageIdHash'
from Activity
where Activity.Id not in (select ActivityOperation.Id from ActivityOperation)
and Activity.ActivityType in (10,16)
order by Etag desc
</Query>
<Fragments>
<Fragment source="ETAG" alias="ETAG" datatype="Integer" category="none" />
<Fragment source="StartTime" alias="Start Time" datatype="DateTime" category="DateTime" />
<Fragment source="LastModified" alias="Last Modified" datatype="DateTime" category="DateTime" />
<Fragment source="Application" alias="Application" datatype="String" category="none" />
<Fragment source="ClipText" alias="Clipboard Text(Base64)" datatype="Attachment" category="none" />
<Fragment source="Format" alias="Format" datatype="String" category="none" />
<Fragment source="PayloadContent" alias="Payload Content" datatype="String" category="none" />
<Fragment source="ClipType" alias="Type" datatype="String" category="none" />
<Fragment source="ActivityType" alias="Activity Type" datatype="String" category="none" />
<Fragment source="Group" alias="Group" datatype="String" category="none" />
<Fragment source="GroupAppActivityId" alias="GroupApp ActivityId" datatype="String" category="none" />
<Fragment source="ActivityId" alias="Activity Id" datatype="String" category="none" />
<Fragment source="ParentActivityId" alias="Parent ActivityId" datatype="String" category="none" />
<Fragment source="clipboardDataId" alias="clipboard DataId" datatype="String" category="none" />
<Fragment source="PlatformDeviceId" alias="Device Id" datatype="String" category="none" />
<Fragment source="ExpiresIn" alias="Expires In" datatype="Integer" category="none" />
<Fragment source="LastModifiedOnClient" alias="LastModified OnClient" datatype="DateTime" category="DateTime" />
<Fragment source="EndTime" alias="EndTime" datatype="DateTime" category="DateTime" />
<Fragment source="CreatedInCloud" alias="Created In Cloud" datatype="DateTime" category="DateTime" />
<Fragment source="ExpirationTime" alias="Expiration Time" datatype="DateTime" category="DateTime" />
<Fragment source="IsLocalOnly" alias="Is Local Only" datatype="String" category="none" />
<Fragment source="PackageIdHash" alias="PackageId Hash" datatype="String" category="none" />
</Fragments>
</Artifact>
<Signature>
</Signature>
</Artifacts>