Print incoming UDP messages as hex dump or plain text on the command line with the free Swiss File Knife for Windows, Mac OS X and Linux.
sfk udpdump [options] [group] port
create human-readable hexdump of UDP socket input,
for debugging of UDP network applications.
options
-showle highlights line ending characters CR and LF.
you may also add "le" to the command name.
-wide dumps 32 input bytes per line.
-lean dumps 16 input bytes per line.
-post reduced format e.g. for forum posts
-min minimal format with alnum only text
-time show date and time of receive
-echo echo received packets back to sender.
-stop or stop=n stops after n received packages.
with command chaining, default is -stop=1.
-sep[arator] prints detailed separator between packages
with message number, source IP and time.
-broad listen for broadcast on given port.
-pure lists flat hex characters:
53464B2D544553540D0A
-hexsrc lists hex comma separated values:
0x53,0x46,0x4B,0x2D,0x54,0x45,0x53,0x54,0x0D,0x0A,
-decsrc lists decimal comma separated values:
83,70,75,45,84,69,83,84,13,10,
-maxdump=n dump only first n bytes of incoming data.
-flat no hexdump, print characters as they come.
-nohead does not show the "received n bytes" message.
-text just print text, same as -flat -nohead.
use -sep to show a header per message.
-tofile x write output to file x.
message filtering
show only messages ...
-from "s1,s2" from IPs containing text s1 or s2.
note that packages from the same
machine may use an IP 127.0.0.1
-from "s1 s2" same as -from "s1,s2".
multiple -from can also be given.
-notfrom "s" not from IP containing text s,
with ".10" matching .10 and .100
but ".10/" matching only .10.
multiple -notfrom can be given.
-size n with this size
-minsize n larger or equal to n
-maxsize n smaller or equal to n
-data foo containing text "foo"
-data 0xa0a1 containing binary data 0xa0a1
experimental multicast receive
if a multicast group IP address is given, like
sfk udpdump 224.0.0.123 5000
then udpdump tries to print incoming multicast messages.
this may or may not work depending on the OS, network
interface, router and firewall settings, user rights and
other programs running in parallel.
if you cannot receive any udp from other ip's
this can be caused by the Windows Firewall.
special protocol supportsfk udpdump -bon - print bonjour messages
sfk udpdump -knx - print knx messages (sfk help knx)
see alsosfk udpsend - send UDP packets.
sfk hexdump - for further format options.
examplessfk udpdump 5000
waits on port 5000 for incoming udp packages.
sfk udpdump 5000 -from .10
show only packages from ip's containing .10
like 192.168.100.1 or 192.168.1.100
sfk udpdump 5000 -from ".100/,.101/,.102/"
show only from ip's ending .100, .101 or .102
e.g. 192.168.1.100 but not 192.168.100.1