[python]Match most of the Cisco ASA access list patterns with regular expression

Regular expression reference Purchase the course by Sujith George The Complete Regular Expressions Course:Beginner to Advanced from Udemy Study this code from git hub, this code gives a good idea on how you should match access-list, from this course I realize the regex module can convert the matched data to dictionary. Read this documentation about … Continue reading [python]Match most of the Cisco ASA access list patterns with regular expression

Advertisements

[python]Automating OSPF configuration of two routers

Network diagram There are two vIOS which are R1 and R2, they have their gi0/2 and gi0/3 connected to the R5 switch, the configuration is pushed from the cloud through their gi0/2 and gi0/3 to configure their gi0/0 to become OSPF neighbours. Objective To configure the two routers to become ospf neighbors, the OSPF configuration … Continue reading [python]Automating OSPF configuration of two routers

[python]Convert show ip int brief into structured json data

Cisco IOS commands output is unstructured in the perception of scripting, the output format made sense only to engineers, however if you need to program such output is difficult if the output is not processed. One of the better way to structure the unstructured cisco output is to check each row of the output, then … Continue reading [python]Convert show ip int brief into structured json data

[python]Simple web application for storing contacts

Introduction This is a practice mini project for me to get hold of API, sqlite3 and regex. The objective is to capture contact information and store into a sqlite3 database file - contacts.db. This is not a full fledged web application for storing contacts however can be used as a based for additional features. Information … Continue reading [python]Simple web application for storing contacts

[python]Regex for matching ipv4 address

The regex pattern to match valid ipv4 addressing, which will include broadcast address, and also network id and direct broadcast address. First octet, to be valid: 1. 25[0-5] matches between 250 and 255. 2. 2[0-4][0-9] matches between 200 and 249. 3. 1[0-9][0-9] matches between 100 and 199. 4. [1-9][0-9] matches between 10 and 99. 5. … Continue reading [python]Regex for matching ipv4 address