1EXTCAP(4)                                                            EXTCAP(4)
2
3
4

NAME

6       extcap - The extcap interface
7

DESCRIPTION

9       The extcap interface is a versatile plugin interface that allows
10       external binaries to act as capture interfaces directly in Wireshark.
11       It is used in scenarios, where the source of the capture is not a
12       traditional capture model (live capture from an interface, from a pipe,
13       from a file, etc). The typical example is connecting esoteric hardware
14       of some kind to the main Wireshark application.
15
16       Without extcap, a capture can always be achieved by directly writing to
17       a capture file:
18
19           the-esoteric-binary --the-strange-flag --interface=stream1 --file dumpfile.pcap &
20           wireshark dumpfile.pcap
21
22       but the extcap interface allows for such a connection to be easily
23       established and configured using the Wireshark GUI.
24
25       The extcap subsystem is made of multiple extcap binaries that are
26       automatically called by the GUI in a row. In the following chapters we
27       will refer to them as "the extcaps".
28
29       Extcaps may be any binary or script within the extcap directory. Please
30       note, that scripts need to be executable without prefacing a script
31       interpreter before the call.
32
33       WINDOWS USERS: Because of restrictions directly calling the script may
34       not always work. In such a case, a batch file may be provided, which
35       then in turn executes the script. Please refer to doc/extcap_example.py
36       for more information.
37
38       When Wireshark launches an extcap, it automatically adds its
39       installation path (normally C:\Program Files\Wireshark\) to the DLL
40       search path so that the extcap library dependencies can be found (it is
41       not designed to be launched by hand). This is done on purpose. There
42       should only be extcap programs (executables, Python scripts, ...) in
43       the extcap folder to reduce the startup time and not have Wireshark
44       trying to execute other file types.
45

GRAMMAR ELEMENTS

47       Grammar elements:
48
49       arg (options)
50           argument for CLI calling
51
52       number
53           Reference # of argument for other values, display order
54
55       call
56           Literal argument to call (--call=...)
57
58       display
59           Displayed name
60
61       default
62           Default value, in proper form for type
63
64       range
65           Range of valid values for UI checking (min,max) in proper form
66
67       type
68
69           Argument type for UI filtering for raw, or UI type for selector:
70
71               integer
72               unsigned
73               long (may include scientific / special notation)
74               double
75               string (display a textbox)
76               selector (display selector table, all values as strings)
77               boolean (display checkbox)
78               booleanflag (display checkbox)
79               radio (display group of radio buttons with provided values, all values as strings)
80               fileselect (display a dialog to select a file from the filesystem, value as string)
81               multicheck (display a textbox for selecting multiple options, values as strings)
82               password (display a textbox with masked text)
83               timestamp (display a calendar)
84
85       value (options)
86
87               Values for argument selection
88               arg     Argument # this value applies to
89

EXAMPLES

91       Example 1:
92
93           arg {number=0}{call=--channel}{display=Wi-Fi Channel}{type=integer}{required=true}
94           arg {number=1}{call=--chanflags}{display=Channel Flags}{type=radio}
95           arg {number=2}{call=--interface}{display=Interface}{type=selector}
96           value {arg=0}{range=1,11}
97           value {arg=1}{value=ht40p}{display=HT40+}
98           value {arg=1}{value=ht40m}{display=HT40-}
99           value {arg=1}{value=ht20}{display=HT20}
100           value {arg=2}{value=wlan0}{display=wlan0}
101
102       Example 2:
103
104           arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
105           value {arg=0}{call=/dev/sysfs/usb/foo/123}{display=Ubertooth One sn 1234}
106           value {arg=0}{call=/dev/sysfs/usb/foo/456}{display=Ubertooth One sn 8901}
107
108       Example 3:
109
110           arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
111           arg {number=1}{call=--server}{display=IP address for log server}{type=string}{validation=(?:\d{1,3}\.){3}\d{1,3}}
112           flag {failure=Permission denied opening Ubertooth device}
113
114       Example 4:
115
116           arg {number=0}{call=--username}{display=Username}{type=string}
117           arg {number=1}{call=--password}{display=Password}{type=password}
118
119       Example 5:
120
121           arg {number=0}{call=--start}{display=Start Time}{type=timestamp}
122           arg {number=1}{call=--end}{display=End Time}{type=timestamp}
123

SECURITY CONSIDERATIONS

125       •   If you’re running Wireshark as root, we can’t save you.
126
127       •   Dumpcap retains suid/setgid and group execute permissions for users
128           in the “wireshark” group only.
129
130       •   Third-party capture programs run with whatever privileges they’re
131           installed with.
132
133       •   If an attacker can write to a system binary directory, it’s game
134           over.
135
136       •   You can find your local extcap directory in About  Folders.
137

SEE ALSO

139       wireshark(1), tshark(1), dumpcap(1), androiddump(1), sshdump(1),
140       randpktdump(1)
141

NOTES

143       Extcap is feature of Wireshark. The latest version of Wireshark can be
144       found at https://www.wireshark.org.
145
146       HTML versions of the Wireshark project man pages are available at
147       https://www.wireshark.org/docs/man-pages.
148
149
150
151                                  2023-08-31                         EXTCAP(4)
Impressum