Commit Graph

85418 Commits

Author SHA1 Message Date
Guy Harris 4653583e1e Separate cases with spaces.
All other cases in that switch statement have spaces between them; add
one before this one.
2022-10-11 22:41:18 -07:00
John Thacker 5bc8cac5cc charsets: UCS-4 code points above 0x10FFFFF are not legal
When decoding UCS-4/UTF-32, map Unicode code points above
0x10FFFFF to REPLACEMENT CHARACTER, as they are not legal,
and would create invalid UTF-8.
Also if the number of bytes given is not a multiple of 4,
insert a replacement character at the end as well.

This is two long standing todos. Fixes #18435.
2022-10-11 20:40:09 -04:00
John Thacker 78ce2f2907 HTTP: Validate Basic Auth against UTF-8 after Base64 decoding
The result of Base64 decoding might not be valid UTF-8, so
check it as such. Also add the decoded result as a new tvb data
source, so that it's easier to do other manipulations on it from
the GUI in case it isn't UTF-8.

Note that RFC 7617 says that the encoding is only known to be
UTF-8 if the charset parameter was used in the WWW-Authenticate
header, so perhaps this should be a FT_BYTES using
BASE_SHOW_UTF_8_PRINTABLE

Fix #18408
2022-10-11 23:19:11 +00:00
Alexis La Goutte ec767dcf2d ieee80211: Use gint(8) for Beamforming Report AVG SNR
Fix #18436
2022-10-11 18:35:10 +00:00
João Valverde 16fad42ae4 wslog: rename console open preference enum 2022-10-11 18:11:35 +01:00
João Valverde f2fd5ab201 wslog: Fix console_open registry key name
Fix "OpenConsole" registry key to "ConsoleOpen".

Add a common macro for the key name.
2022-10-11 18:10:35 +01:00
Gerald Combs f3f1556d45 Qt: Properly truncate our FieldInformation strings.
As the Qt6 QString::QString(const QByteArray &ba) documenation says:

"Note: any null ('\0') bytes in the byte array will be included in this
string, converted to Unicode null characters (U+0000). This behavior is
different from Qt 5.x."

Make sure FieldInformation::toString() truncates its display label byte
array before converting it to a QString.

Fixes #18428
2022-10-11 16:59:32 +00:00
João Valverde a19834b98c Windows: Store "gui.console_open" in the Windows registry
This removes the last dependency of the logging subsystem on the
preferences module. The latter is started much later than the former
and this is an issue.

The Windows-only preference "gui.console_open" is stored in the
registry as HKEY_LOCAL_USER\Software\Wireshark\ConsoleOpen. The semantics
are exactly the same. The preference is read by the logging subsystem
for initialization and then again by the preferences (read/write) so
the user can configure it as before.

The code to store the preference also in the preferences file was
kept, for backward compatibility and because it is not incompatible
with using the Registry concurrently.

The elimination of the prefs dependency also allows moving the Windows
console logic to wsutil and add the functionality to wslog directly,
thereby eliminating the superfluous Wireshark/Logray custom log handler.

To be able to read the ws_log_console_open global variable from
libwireshark it becomes necessary to add a new export macro
symbol called WSUTIL_EXPORT.
2022-10-11 14:25:04 +01:00
João Valverde 44d1cc6d4a GUI: Move log message to the correct place
Move the log message after parse_args().
2022-10-11 14:23:19 +01:00
Dirk Ziegelmeier 8f7d0b2af5 Fix issue #18391
Profinet PNIO-CM Connect Response Error Decode Incorrect
2022-10-11 11:28:54 +00:00
John Thacker b7249fadd9 epan: Handle truncation of expert infos in the middle of UTF-8 chars
If the formatted string generated by expert_add_info_format is
truncated by being larger than ITEM_LABEL_LENGTH, it might get
truncated in the middle of a multibyte UTF-8 character.
Check for that, and end the string where the partial character
starts.

Fix #18421
2022-10-11 10:11:58 +00:00
Gerald Combs 8700e9c407 wiretap: Make some pcapng logs noisy.
Switch some pcapng log messages from debug to noisy.
2022-10-11 07:10:16 +00:00
Martin Mayer cf45609c02 OCP.1: Added packet forward lookup 2022-10-11 07:09:22 +00:00
Dylan Ulis 5f9d493640 CIP: Support object-specific services 2022-10-11 07:07:12 +00:00
zhangzhilei f7416d7e95 change GMTLS to TLCP
GMTLS is a non-official name, now that these is a Chinese National Standard called
"GB/T 38636-2020 Information security technology—Transport layer cryptography protocol(TLCP)"
so we replace GMTLS by TLCP
2022-10-11 12:48:29 +08:00
João Valverde 4a0ba1e378 WSDG: Make commands easily copy-pasteable
Removing the artificial shell prompt symbols does not hurt
legibility and makes is significantly easier to copy-paste
commands, either by double-clicking for a single line or
click and drag for a multiline block of text.
2022-10-11 00:48:07 +00:00
Gerald Combs 8607946295 CMake: Install falcodump.html in the right place. 2022-10-11 00:41:29 +00:00
Gerald Combs 7896f4b292 falcodump: Fixup our default profile and region.
Make sure we fetch AWS_PROFILE if it exists. Don't add AWS_PROFILE or
AWS_REGION if they're already in the profile and region lists. Fix our
default values.
2022-10-11 00:40:54 +00:00
Guy Harris 3db17dab82 transum: expert infos are not Boolean fields.
They're of type FT_NONE, meaning that they do not have values, they're
just present or not.

Handle the TCP analysis fields "tcp.analysis.retransmission" and
"tcp.analysis.keep_alive", both of which are expert infos, by just
seeing if they're present or not.

Fixes a problem mentioned in a comment in merge request !8412.
2022-10-10 16:00:53 -07:00
João Valverde 597f020793 epan: Mark tvb_get_const_stringz() as deprecated
The function tvb_get_const_stringz() does not check for a string
encoding and returns a pointer to a byte array. For this reason
it should not be used. Prefer other functions that return a
valid UTF-8 string from a source encoding or use tvb_get_ptr()
to fetch a byte pointer.
2022-10-10 20:27:33 +00:00
João Valverde 1b12dc4b9e Add WS_DEPRECATED_X() function attribute
This adds a new attribute that allows declaring Wireshark
functions as deprecated.

Also disabe -Werror with deprecated declarations  Deprecated
declarations can be introduced suddenly with a new version
of an external dependency or a new internal deprecation and
that has its own timeline to fix. We should still be able to
build with -Werror in that case.
2022-10-10 20:27:33 +00:00
João Valverde 3b803a94c7 ftypes: Cleanup code to parse integers
Replace strtol/strtoul with the glib functions that do
not have a locale dependency.

Cleanup some casts and print formats. Remove some code
duplication. Add some null checks.

Rename a function for consistency.
2022-10-10 17:24:52 +00:00
João Valverde 2fdd9d2e5d Windows: Fix detection of asciidoctor again
Scoop uses "asciidoctorj.cmd". The others were added for
completeness.
2022-10-10 16:37:53 +00:00
Alexis La Goutte 5a86ac3149 follow_stream_dialoag(qt): Fix Clang Analyzer Warning
Fix 3rd function call argument is an uninitialized value

stream_count is not longer initialized for QUIC (after g2762c64010 remove like other)
2022-10-10 11:57:29 +00:00
Branimir Rajtar 7b7aaf0fcf Update nsi files with 5x9 Radius dictionary 2022-10-10 08:17:03 +00:00
Branimir Rajtar 0159659e37 Edit main dictionary file and modify indents for dictionary.5x9 2022-10-10 08:17:03 +00:00
Branimir Rajtar 321086cda2 Add 5x9 Radius dictionary 2022-10-10 08:17:03 +00:00
João Valverde d9fbde7cc7 Debian: Ignore symbol changes on the master branch
Fixes #18404.
2022-10-10 08:14:46 +00:00
Gerald Combs 2a97e729dc [Automatic update for 2022-10-09]
Update manuf, services enterprise numbers, translations, and other items.
2022-10-10 08:13:49 +00:00
Dr. Lars Völker f504d02e8e MACsec: improve FCS and Padding detection for Ethernet
This patch fixes some bugs that occur with padded Ethernet frames and
frames, when a Ethernet FCS is present. In the past that lead to wrong
detection of the ICV by the Ethernet dissector (trailer).

Such errors did occur for example with frames that were padded and
MACsec was added later; thus, being bigger than expected for the
heuristics in the packet-eth.c: "pinfo->fd->pkt_len >= 60 ..."
2022-10-09 19:05:29 +00:00
Mokhtar Ben Messaoud 517d2be149 WPS: Multi-AP Profile and Multi-AP Default 802.1Q Settings subelements
Format is defined by Wi-Fi EasyMesh™ Specification Version 4.0
* 5.2.2 Backhaul STA Configuration (Table 4. Multi-AP Default 802.1Q Setting
	subelement format)
* 7.1 AP configuration (Table 15. Multi-AP Profile subelement)
2022-10-09 11:25:38 +00:00
Gerald Combs a820b439b4 Qt+extcap: editselect value fixups.
Fix our value handling.
2022-10-09 00:44:27 +00:00
Gerald Combs 80656552c7 Update our capture control icons.
Add a standard "record" button icon for Logray. Add a corresponding
"restart" icon. Touch up the "stop" and "restart fin" icons.
2022-10-08 16:37:29 -07:00
Gerald Combs 3b074f7344 Update our Logray icons.
Enlarge the left fin, which makes the 16x16 blob look a little better.
Shorten the tail.
2022-10-08 15:08:22 -07:00
John Thacker e040ca9015 GIOP: Translate string to UTF-8
We need to convert strings to valid UTF-8 for internal Wireshark
use. Since we aren't storing the code set service context as
conversation data (it's sent only when initially connecting, not
on a per-request basis), use the default of ISO-8859-1.

Also some automatic fixes of allocation patterns

Fix #18410
2022-10-08 19:14:03 +00:00
João Valverde bc67d45d72 Fix Debian symbols
[skip ci]
2022-10-08 18:31:50 +01:00
João Valverde 7b4abf8341 dfilter: Fix integer comparison on big-endian
Fix copy-paste mistake to use the correct struct field.

Fixes #12236.
2022-10-08 16:50:10 +01:00
João Valverde 3949d289d1 Add log init message to main() 2022-10-08 15:33:47 +00:00
David Perry 68a581afdc esl_eth: support nanosecond timestamps
Applies the patch from #18308, in lieu of original commenter doing so.

Closes #18308
2022-10-08 14:01:19 +00:00
Eugène Adell 9a6d496e64 Conversations dialog : rename the B to A packets column 2022-10-08 13:36:14 +00:00
Uli Heilmeier a471aa7628 sshdump: Add '-f ' for capture filter
Fixes #18420
2022-10-08 12:27:30 +00:00
João Valverde 9ab1f35641 Move print_hex_data_buffer() to wsutil
Move this generic function to wsutil so it can be used
by other libraries.
2022-10-08 12:39:04 +01:00
João Valverde 05a32852a0 wmem: Avoid header dependency on wsutil
Including wireshark.h also pulls some wsutil headers. Avoid that.
2022-10-08 11:18:08 +00:00
João Valverde 46d018627b wslog: Improve display for UTF-8 strings
Print the valid substring as UTF-8, not ASCII+hex.
2022-10-08 10:18:08 +00:00
João Valverde 0662a3f6ac dfilter: Amend a numeric pattern in the scanner
We amend the :<numeric> pattern to not eat the leading
colon. Because the colon can be part of the value (with IPv6 addresses
for example) we want to avoid doing that.

IPv6 addresses are covered by their own rules but this removes the
requirement in the future to handle any special cases and avoids
surprises.

For this reason the colon-prefix syntax is already explicitly defined to
work only for byte arrays and there is currently no universal
syntax for all literal values or even all numbers.

Other numbers can keep using the lexical type "unparsed".

```
run/dftest "_ws.ftypes.uint8 == :fd"
Filter: _ws.ftypes.uint8 == :fd
dftest: ":fd" is not a valid number.
	_ws.ftypes.uint8 == :fd
	                    ^~~

run/dftest "_ws.ftypes.uint8 == fd"
Filter: _ws.ftypes.uint8 == fd
dftest: "fd" is not a valid number.
	_ws.ftypes.uint8 == fd
	                    ^~

run/dftest "_ws.ftypes.uint8 == 0xfd"
Filter: _ws.ftypes.uint8 == 0xfd

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.uint8 <FT_UINT8>)
   1 FVALUE(253 <FT_UINT8>)

Instructions:
00000 READ_TREE		_ws.ftypes.uint8 <FT_UINT8> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == 253 <FT_UINT8>
00003 RETURN

run/dftest "_ws.ftypes.bytes == fd"
Filter: _ws.ftypes.bytes == fd

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.bytes <FT_BYTES>)
   1 FVALUE(fd <FT_BYTES>)

Instructions:
00000 READ_TREE		_ws.ftypes.bytes <FT_BYTES> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == fd <FT_BYTES>
00003 RETURN

run/dftest "_ws.ftypes.bytes == :fd"
Filter: _ws.ftypes.bytes == :fd

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.bytes <FT_BYTES>)
   1 FVALUE(fd <FT_BYTES>)

Instructions:
00000 READ_TREE		_ws.ftypes.bytes <FT_BYTES> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == fd <FT_BYTES>
00003 RETURN
```
2022-10-08 09:51:49 +00:00
João Valverde 14f5121c4a dfilter: Remove problematic <...> literal syntax
The <...> syntax for literals, intended to be as generic as
possible, unintentionally introduced an ambiguity with the
relational expression "a < b or a > c".

Literals are values like numbers, bytes, IPv6 addresses or, one
could imagine, UNC paths for example, if an FT_UNC type were to
be added in the future.

We could use a new unique symbol like @...@ but the <...>
syntax is very recent and may not be necessary with ":xxx" so
just remove it.

A byte array can be explicitly declared by prefixing with a colon. It
is not as generic but the main ambiguity that this new syntax attempted
to solve is bytes vs protocol names. We don't want to introduce a new
reserved symbol for now, until other requirements if any are more clear.

Fixes #18418.
2022-10-08 09:51:49 +00:00
j.novak@netsystem.cz 2c56c0bad6 RTP Player: Fix: Only silence played on Windows with Qt 6.x 2022-10-08 09:30:52 +00:00
Gerald Combs a1ec850894 falcodump: Prefill the Cloudtrail profile and region fields.
Make the cloudtrail-aws-profile and cloudtrail-aws-region settings
prefilled selection lists. Make them editable as well.
2022-10-07 17:01:17 +00:00
Gerald Combs 2b4fcae31f Qt+extcap: Add editable extcap selectors.
Add an "editselector" argument type, which lets the user override a
predefined selection list with a custom value.
2022-10-07 17:01:17 +00:00
João Valverde 52c130ced7 Fix Debian symbols
[skip ci]
2022-10-07 16:14:52 +01:00