### Tool 162: SNMP Trap2

### Description:

      This tool sends a TRAPv2 to a SNMP server. It permits to alert a
      server.

      Parameter --version defines SNMP version to use (from 1 to 3).
      Versions 1 and 2 need --community parameter to set community name.
      Version 3 requires --username and --password. Parameter --authmd5
      indicates if md5 authentication is used. Parameters
      --authoritativeengineid, --authoritativeengineboots,
      --authoritativeenginetime, --contextengineid and --contextname are
      optional version 3 parameters.
      Parameter --display shows packets.

      Parameter --dst-ip is the address of remote host/server.
      Parameter --dst-port is the port number where to connect.
      Optional parameter --src-ip defines the local IP address to use.
      Optional parameter --src-port defines the local port number to use.
      Optional parameter --ip4opts permits to add IP4 options encoded as
      mixed.
      Optional parameter --ip6exts permits to add IP6 options encoded as
      mixed (first byte is the next header number).
      Optional parameters --device, --src-eth and --dst-eth permits to
      create a virtual client using fake addresses (in this case, tool have
      to be run with admin privilege in order to sniff and spoof at
      Ethernet level).

### Synonyms:

snmptrap

### Usage:

netwox 162 -i ip [-c password] -r oid -z uint32 -n oid -t oidtype -V data [-d device] [-E eth] [-e eth] [-I ip] [-P port] [-p port] [-o ip4opts] [-O ip6exts] [-v uint32] [-m|+m] [-u login] [-w password] [-A mixed_data] [-B uint32] [-M uint32] [-C mixed_data] [-N data] [-T uint32] [-y|+y]

### Parameters:

parameter | description | example
`-i|--dst-ip ip` | destination IP address | 5.6.7.8
`-c|--community password` | SNMPv1/v2 community | public
`-r|--enterprise oid` | enterprise | .1.1
`-z|--timestamp uint32` | timestamp | 0
`-n|--oidname oid` | oid name | .1.2
`-t|--oidtype oidtype` | oid type (i,s,m,n,o,a,c,g,t,M,u,U) | s
`-V|--oidvalue data` | oid value |
`-d|--device device` | device name | Eth0
`-E|--src-eth eth` | source ethernet address | 0:2:3:4:5:6
`-e|--dst-eth eth` | destination ethernet address | 0:8:9:a:b:c
`-I|--src-ip ip` | source IP address | 192.168.100.200
`-P|--src-port port` | source port number | 0
`-p|--dst-port port` | destination port number | 162
`-o|--ip4opts ip4opts` | IPv4 options |
`-O|--ip6exts ip6exts` | IPv6 extensions |
`-v|--version uint32` | SNMP version (1, 2 or 3) | 1
`-m|--md5auth|+m|--no-md5auth` | SNMPv3 auth using MD5 | This boolean is set. Use + or --no- to unset it.
`-u|--username login` | SNMPv3 username |
`-w|--password password` | SNMPv3 password |
`-A|--authoritativeengineid mixed_data` | SNMPv3 authoritativeengineid |
`-B|--authoritativeengineboots uint32` | SNMPv3 authoritativeengineboots | 0
`-M|--authoritativeenginetime uint32` | SNMPv3 authoritativeenginetime | 0
`-C|--contextengineid mixed_data` | SNMPv3 contextengineid |
`-N|--contextname data` | SNMPv3 contextname |
`-T|--timeout uint32` | timeout in ms | 10000
`-y|--display|+y|--no-display` | display packets |

### Examples:

netwox 162 -i "5.6.7.8" -r ".1.1" -z "0" -n ".1.2" -t "s" -V ""
netwox 162 --dst-ip "5.6.7.8" --enterprise ".1.1" --timestamp "0" --oidname ".1.2" --oidtype "s" --oidvalue ""