opensolutions / OSS_SNMP

A PHP SNMP library for people who hate SNMP, MIBs and OIDs!
https://github.com/opensolutions/OSS_SNMP/wiki
Other
107 stars 58 forks source link

update regex for newer cisco ios-xe models #49

Closed mhayes911 closed 6 years ago

mhayes911 commented 6 years ago

snmp output from a cisco 3650

iso.3.6.1.2.1.1.1.0 = STRING: "Cisco IOS Software, IOS-XE Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 03.06.06E RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2016 by Cisco Systems, Inc. Compiled Sat 17-Dec-"

the regex below works on both the text above and the sample text in vendor_cisco.php

/Cisco IOS Software, IOS-XE Software,\s+([a-zA-Z0-9\s]+)\sSoftware\s(([0-9A-Za-z().-_]+)),\sVersion\s([0-9A-Za-z.]+)\sRELEASE SOFTWARE.*/