Category Archives: Python

Python scripting for security research.

PyForms dependencies

While I was looking for a GUI programming in python I came across PyForms, the scripting with PyForms seemed easy so I install it using pip. When I was testing a simple code from PyForms, my Python interpreter told me … Continue reading

Posted in Python, Scripting | Tagged , | Leave a comment

Update Cisco ASA object group with netmiko

This is a demo of configuring ASA with netmiko, there is a use case when a server is provisioned, the server’s hostname and ip addresses are assigned automatically by Vrealize, and run a python script to update the object-group of … Continue reading

Posted in Python, Scripting | Tagged , , , | Leave a comment

Extending the python script to configure OSPF with ncclient

Previously I have successfully download the configuration from the netconf enabled router, now i have extended support to configure ospf. This is a simple lab to further extend and get myself familiarize and comfortable with netconf. During the lab I … Continue reading

Posted in OSPF, Python, Scripting | Tagged , , , , , , , | Leave a comment

Testing configuration with ncclient (netconf)

I wanted to extend the previous post regarding using netmiko to get the configuration, well since my router supports netconf, I turned on netconf and did a test on getting configuration using get-config. Now i am testing edit-config to try … Continue reading

Posted in Python, Scripting | Tagged , , | Leave a comment

Testing menu and netmiko in python

Background This is a testing code to try out on a simple interactive text menu with two options, download cisco config and quit. I want to extend this config to have an interactive menu and prompt to configure cisco routers. … Continue reading

Posted in Python, Scripting | Tagged , , , | Leave a comment

Export Palo Alto firewall config without Panorama with Python

Previously I was using powershell script for exporting PA config, now I attempted to write one with Python, took me a while to read data from the xml tag… I was using BeautifulSoup4 library to read the data from the … Continue reading

Posted in Python | Tagged | Leave a comment

Python: Strings data type

1. Variables are not associated with data types unlike C and C++. 2. Data types however are associated with objects. 3. Variables reference to objects. This is very similar to pointers in C. fruits is the variable and apple is … Continue reading

Posted in Python, Scripting | Tagged , , , , | Leave a comment