1 include::../attributes.adoc[]
6 :copycss: {css_dir}/{stylesheet}
10 extcap - The extcap interface
14 The extcap interface is a versatile plugin interface that allows external binaries
15 to act as capture interfaces directly in Wireshark. It is used in scenarios, where
16 the source of the capture is not a traditional capture model
17 (live capture from an interface, from a pipe, from a file, etc). The typical
18 example is connecting esoteric hardware of some kind to the main Wireshark application.
20 Without extcap, a capture can always be achieved by directly writing to a capture file:
22 the-esoteric-binary --the-strange-flag --interface=stream1 --file dumpfile.pcap &
23 wireshark dumpfile.pcap
25 but the extcap interface allows for such a connection to be easily established and
26 configured using the Wireshark GUI.
28 The extcap subsystem is made of multiple extcap binaries that are automatically
29 called by the GUI in a row. In the following chapters we will refer to them as
32 Extcaps may be any binary or script within the _extcap/wireshark_ or _extcap/stratoshark_ directories.
33 Please note that scripts need to be executable without prefacing a script interpreter before the call.
35 WINDOWS USERS: Because of restrictions directly calling the script may not always work.
36 In such a case, a batch file may be provided, which then in turn executes the script. Please
37 refer to doc/extcap_example.py for more information.
39 When Wireshark launches an extcap, it automatically adds its installation path (normally _C:\Program Files\Wireshark\_) to the DLL search path so that the extcap library dependencies can be found (it is not designed to be launched by hand).
40 This is done on purpose. There should only be extcap programs (executables, Python scripts, ...) in the extcap folder to reduce the startup time and not have Wireshark trying to execute other file types.
47 argument for CLI calling
50 Reference # of argument for other values, display order
53 Literal argument to call (--call=...)
59 Default value, in proper form for type
62 Range of valid values for UI checking (min,max) in proper form
67 Argument type for UI filtering for raw, or UI type for selector:
71 long (may include scientific / special notation)
73 string (display a textbox)
74 selector (display selector table, all values as strings)
75 editselector (selector table which can be overridden, all values as strings)
76 boolean (display checkbox)
77 booleanflag (display checkbox)
78 radio (display group of radio buttons with provided values, all values as strings)
79 fileselect (display a dialog to select a file from the filesystem, value as string)
80 multicheck (display a textbox for selecting multiple options, values as strings)
81 password (display a textbox with masked text)
82 timestamp (display a calendar)
88 Values for argument selection
89 arg Argument # this value applies to
96 arg {number=0}{call=--channel}{display=Wi-Fi Channel}{type=integer}{required=true}
97 arg {number=1}{call=--chanflags}{display=Channel Flags}{type=radio}
98 arg {number=2}{call=--interface}{display=Interface}{type=selector}
99 value {arg=0}{range=1,11}
100 value {arg=1}{value=ht40p}{display=HT40+}
101 value {arg=1}{value=ht40m}{display=HT40-}
102 value {arg=1}{value=ht20}{display=HT20}
103 value {arg=2}{value=wlan0}{display=wlan0}
107 arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
108 value {arg=0}{call=/dev/sysfs/usb/foo/123}{display=Ubertooth One sn 1234}
109 value {arg=0}{call=/dev/sysfs/usb/foo/456}{display=Ubertooth One sn 8901}
113 arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
114 arg {number=1}{call=--server}{display=IP address for log server}{type=string}{validation=(?:\d{1,3}\.){3}\d{1,3}}
115 flag {failure=Permission denied opening Ubertooth device}
119 arg {number=0}{call=--username}{display=Username}{type=string}
120 arg {number=1}{call=--password}{display=Password}{type=password}
124 arg {number=0}{call=--start}{display=Start Time}{type=timestamp}
125 arg {number=1}{call=--end}{display=End Time}{type=timestamp}
127 == Security Considerations
129 - If you're running Wireshark as root, we can't save you.
130 - Dumpcap retains suid/setgid and group execute permissions for users in the “wireshark” group only.
131 - Third-party capture programs run with whatever privileges they're installed with.
132 - If an attacker can write to a system binary directory, it's game over.
133 - You can find your local extcap directory in menu:About[Folders].
137 xref:wireshark.html[wireshark](1), xref:tshark.html[tshark](1), xref:dumpcap.html[dumpcap](1), xref:androiddump.html[androiddump](1), xref:sshdump.html[sshdump](1), xref:randpktdump.html[randpktdump](1)
141 *Extcap* is feature of *Wireshark*.
142 The latest version of *Wireshark* can be found at https://www.wireshark.org.
144 HTML versions of the Wireshark project man pages are available at
145 https://www.wireshark.org/docs/man-pages.