diff options
author | Ilya Etingof <etingof@gmail.com> | 2016-07-30 23:30:35 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2016-07-30 23:30:35 +0200 |
commit | f63149c9385bd42bb71bfea490ee526a422660ac (patch) | |
tree | 4cf3e913c470f713d4dfbcd8f9ff95173d0fc49b /examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py | |
parent | b373b1d647fcb95f63d994c9aa72c5bb22354f58 (diff) | |
download | pysnmp-git-f63149c9385bd42bb71bfea490ee526a422660ac.tar.gz |
updated IP address for demo.snmplabs.com in examples
Diffstat (limited to 'examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py')
-rw-r--r-- | examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py b/examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py index 929ff771..1eb0ad3d 100644 --- a/examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py +++ b/examples/v1arch/asyncore/manager/cmdgen/spoof-source-address.py @@ -6,13 +6,13 @@ Send SNMP GET request from a non-local IP address: * with SNMPv2c, community 'public' * over IPv4/UDP -* to an Agent at 195.218.195.228:161 +* to an Agent at 104.236.166.95:161 * from a non-local, spoofed IP 1.2.3.4 (root and Python 3.3+ required) * for OIDs in string form This script performs similar to the following Net-SNMP command: -| $ snmpget -v2c -c public -ObentU 195.218.195.228 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.3.0 +| $ snmpget -v2c -c public -ObentU 104.236.166.95 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.3.0 But unlike the above command, this script issues SNMP request from a non-default, non-local IP address. @@ -35,7 +35,7 @@ from pyasn1.codec.ber import encoder, decoder from time import time # Send request message to this address -transportAddress = udp.UdpTransportAddress(('195.218.195.228', 161)) +transportAddress = udp.UdpTransportAddress(('104.236.166.95', 161)) # Send request message from this non-local (!) IP address transportAddress.setLocalAddress(('1.2.3.4', 0)) |