Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- snmp=os.popen('snmpget -Oqv -v 2c -c public %s 1.3.6.1.2.1.1.1.0' % (ipvar)).read()
- #model
- premodel = re.findall
- regex = re.compile(r"(?:NE40E-[A-Z].*[0-9]|S53\d+\S*|Eudemon\d+\S*|Quidway.S\d+\S*)")
- premodel = regex.findall(snmp)
- model = premodel[0] if len(premodel) > 0 else ''
- model = str(model)
- #version
- preversion = re.findall("V[0-9]{3}R[0-9]{3}C[0-9]{2}[A-Z0-9]*",snmp)
- version = ''.join(map(str, preversion))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement