Skip to content

A command-line utility that creates a UDP socket on a specified interface and port and listens for packets from a specific host, or any host.

Notifications You must be signed in to change notification settings

dino2gnt/udplistener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

udplistener

A command-line utility that creates a UDP socket on a specified interface and port and listens for packets from a specific host, or any host, on that port.

$ javac udplistener.java
$ java -classpath . udplistener
Syntax: udplistener <local ipaddress to listen on, or 0.0.0.0 for wildcard> <source ipaddress or ANY for all> <destination port>

Example:

[root@foo ~]# java -classpath /tmp udplistener 127.0.0.1 ANY 162 &
[1] 180248

==== Listening on /127.0.0.1:162 for packets from ANY ====

[root@foo ~]# snmptrap -v2c -c public 127.0.0.1:162 '' .1.3.6.1.4.1.2636.4.5.0.1 .1.3.6.1.4.1.2636.1.2.3.4 s 'Something Happened!'
==== Got packet from /127.0.0.1:34025 -

        0lpublic�_▒z�0Q+C���0
+
 +�L0"
      +�LSomething Happened!
====

[root@foo ~]#

About

A command-line utility that creates a UDP socket on a specified interface and port and listens for packets from a specific host, or any host.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages