Network diagram What I want to achieve There are three vIOS routers which I need to configure with some portion of harden configuration derived from Cisco's hardening guide. The configuration portion I chose is static, hence no dynamic information like the post I did last time. The purpose is to record how multiprocessing can be … Continue reading [python]Multiprocessing with Netmiko
So on previous post I wrote a simple code to test if the serial com port is working, now I extended the code with some function. I create a class for the serial so that more than one object can be created not just for a single Cisco ASA. The below code snippet gave a … Continue reading [python]Connect to cisco ASA with pyserial
This is a simple script to test if the com port is working or not. The SerialException will invoke PermissionError if the current com port you try to open with this script is in used. If the SerialException invokes FileNotFoundError then it is highly the com port you requested with the script is not installed, … Continue reading [python] Test if console port is working
There could be a chance you may want to get the information such as the windows patch level, the software installed and the device model, instead of trying to get screenshot from one page to another page, you can get all these using the batch script below, to run wmic you will need to be … Continue reading Batch script to get system information and software installed
Flask Migrate advantage This is for easy update of the existing database, such as create a new column, create a new table, drop a table, revert previous database. With migrate, I do not need to do the db.create_all() anymore. A note on sqlite3, once a table is created you cannot insert column directly, need to … Continue reading [python]Flask Migrate
The purpose of using SQLAlchemy is to avoid using SQL syntax, and Flask's extension of SQLAlchemy makes usage easier than the original SQLAlchemy. So here are two demonstrations to query every row and query one row with a condition.
On previous post it was demonstrated that creating database is easier with Flask SQLAlchemy than using SQLAlchemy itself. This post demonstrates how data can be inserted to existing database, and also to check if the tables exist before executing create_all(). create_all() does not re-create table if the table exists, the if statement is to demonstrate … Continue reading [python] Flask SQLAlchemy insert data