forked from vmware-archive/micropacker-for-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmicrodump.lua
More file actions
46 lines (38 loc) · 1.01 KB
/
Copy pathmicrodump.lua
File metadata and controls
46 lines (38 loc) · 1.01 KB
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
-- Copyright 2018 VMware, Inc.
-- SPDX-License-Identifier: BSD-2-Clause
-- chisel description
description = "this chisel will print all the file paths included in your capture, including relative commands to PATH"
short_description = "get a list a files to build a microcontainer, use with micropacker.py"
category = "misc"
-- arguments list
args = {}
-- Initialization callback
function on_init()
-- get some handlers
exec_h = chisel.request_field("evt.arg.exe")
file_h = chisel.request_field("evt.arg.filename")
name_h = chisel.request_field("evt.arg.name")
path_h = chisel.request_field("evt.arg.path")
return true
end
-- main event handler
function on_event()
-- get the fields, then print in an if condition, we want to be fast here
exec = evt.field(exec_h)
file = evt.field(file_h)
name = evt.field(name_h)
path = evt.field(path_h)
if exec ~= nil then
print(exec)
end
if file ~= nil then
print(file)
end
if name ~= nil then
print(name)
end
if path ~= nil then
print(path)
end
return true
end