-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathconfig.example.toml
141 lines (114 loc) · 4.15 KB
/
config.example.toml
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
# usbsas configuration file
# Directory where temp tar and fs will be stored. (Mandatory)
out_directory = "/tmp/"
# Environment variables to keep when forking children processes. (Optional)
# (These are kept by default if none are specified)
#env_vars = ["TERM",
# "LANG",
# "KRB5CCNAME",
# "PATH",
# "RUST_LOG",
# "RUST_BACKTRACE",
# "USBSAS_MOCK_IN_DEV",
# "USBSAS_MOCK_OUT_DEV"]
# Destination "network". (Optional)
# Upload copied files (in a tar) to a remote network.
# description, longdescr and url are mandatory, krb_service_name is optional.
# If krb_service_name is specified, mutual HTTP authentication with Kerberos
# will be performed with the remote server prior to upload.
# [[networks]]
# description = "Network XXX"
# longdescr = "Send files on network XXX"
# url = "http://127.0.0.1:8042/api/uploadbundle"
# krb_service_name = "[email protected]"
# [[networks]]
# description = "Network YYY"
# longdescr = "Send files on network YYY"
# url = "http://127.0.0.1:8043/api/uploadbundle"
# krb_service_name = "[email protected]"
# Source "network". (Optional)
# Download a bundle from a remote network, to write it to an USB device.
# description, longdescr and url are mandatory, krb_service_name is optional.
# If krb_service_name is specified, mutual HTTP authentication with Kerberos
# will be performed with the remote server prior to downupload.
#[source_network]
#description = "Source Network XXX"
#longdescr = "Export files from network XXX"
#url = "http://127.0.0.1:8042/api/downloadbundle"
#krb_service_name = "[email protected]"
# Destination "command". (Optional)
# Execute a command.
# "%SOURCE_FILE%" in command_args will be replaced with the filename of the
# output tar before execution.
[command]
description = "Save files on disk"
longdescr = "Save out tar in /usbsas_data/"
command_bin = "/bin/cp"
command_args = [
"%SOURCE_FILE%",
"/usbsas_data/"
]
# Remote analyzer server. (Optional)
# Like for network destination below, kerberos authentication can be enabled.
# An analyzer report can optionally be written on the destination device.
# Analyzing files can be enabled/disabled based on destination (usb, net (upload)
# or cmd (command)).
[analyzer]
url = "http://127.0.0.1:8042/api/scanbundle"
#krb_service_name = "[email protected]"
analyze_usb = true
analyze_net = true
analyze_cmd = true
# Command to execute after a transfer. (Optional)
# %SOURCE_FILE% is either a tar archive if destination is a network or the
# filesystem of the USB destination.
#[post_copy]
#description = "Archive transfer"
#command_bin = "/bin/cp"
#command_args = [
# "%SOURCE_FILE%",
# "/usbsas_archive/"
#]
# USB ports allowed. (Optional)
# Enforce USB topology for source and destination USB devices.
# [4, 3] means: device should be plugged into Port 3 of Bus 4.
# [3, 2, 5] means: There is a USB hub in the Port 2 of Bus 3 and the device
# should be plugged into the Port 5 of the hub.
# There can be more than 1 hub (e.g. [2, 3, 1, 2]).
# To check your topology: $ lsusb -t
# Multiple ports can be allowed.
#[usb_port_accesses]
#ports_src = [ [6, 2, 3, 1], [2, 3] ]
#ports_dst = [ [4, 3] ]
# A transfer report can be written on the destination device. (Optional)
# It can also be written on the local disk. (Optional)
[report]
write_dest = true
#write_local = "/var/lib/usbsas/reports"
# Message to show on web page if using web client/server. (Optional)
# Message can be in HTML.
#message="<strong>Under maintenance</strong>"
# Web page title
#web_title="USBSAS"
# Filename filters. (Optional)
# They should be written in lower case as their are tested case insensitive.
# A file is filtered if a filter matches.
# A filter matches if each of its components (contain/start/end) matches
# A component matches if:
# - contain: every strings in the filter are present in the filename
# - start: the filenames startswith the string
# - end: the filenames endswith the string
[[filters]]
contain = ["__macosx"]
[[filters]]
contain = [".ds_store"]
[[filters]]
contain = [".lnk."]
[[filters]]
contain = [".lnk/"]
[[filters]]
end = ".lnk"
[[filters]]
contain = ["autorun.inf"]
[[filters]]
contain = ["thumbs.db"]