Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15172

Scripting • snmpwalk/snmpget can't read global variable

$
0
0
RouterOS ver 7.14

Global environment declared before:
test=123

Script code:
Code:
/system script add dont-require-permissions=no name=test policy=read,write,policy,test source=":global test; :put \$test;"

Listing name from SNMP:
Code:
snmpwalk -v3 -l authPriv -u mkuser -a SHA -A xxxxxxxx -x DES -X xxxxxxxxxxx 10.100.200.300  1.3.6.1.4.1.14988.1.1.8.1.1.2Result:iso.3.6.1.4.1.14988.1.1.8.1.1.2.11 = STRING: "test"
Trying to get value from snmpwalk:
Code:
snmpwalk -v3 -l authPriv -u mkuser -a SHA -A xxxxxxxx -x DES -X xxxxxxxxxxx 10.100.200.300  1.3.6.1.4.1.14988.1.1.18.1.1.2.11Result:iso.3.6.1.4.1.14988.1.1.18.1.1.2.11 = STRING: ""
Trying to get value from snmpget:
Code:
snmpget -v3 -l authPriv -u mkuser -a SHA -A xxxxxxxx -x DES -X xxxxxxxxxxx 10.100.200.300  1.3.6.1.4.1.14988.1.1.18.1.1.2.11Result:iso.3.6.1.4.1.14988.1.1.18.1.1.2.11 = STRING: ""

SNMP Scripts can't read global var?

Statistics: Posted by thiagomedeiros — Sat Mar 09, 2024 5:02 pm



Viewing all articles
Browse latest Browse all 15172

Trending Articles