Category Archives: Python

Python scripting for anything interesting…

[python]Netmiko on Cisco ASA

The ASA i am using to test is a ASAv version 952-204, netmiko supports the device type cisco_asa. I am testing on the time taken to finish the script, and also send command and send command from file features of … Continue reading

Posted in ASA/PIX, Python | Tagged , , , | Leave a comment

[python]Keeping encryption key and decrypt the file anytime

This is a follow up from the previous post of this code in https://cyruslab.net/2019/08/17/pythonsample-encrypting-and-decrypting-the-dictionary/ The code snippet is a sample to demonstrate encrypting and decrypting the entire dictionary in a file, however there is a problem with this snippet. if … Continue reading

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

[python]Sample encrypting and decrypting the dictionary

I am preparing for a credential in dictionary data type to be used in later projects, the entire credential has to be encrypted including username. First I generate the key for the Fernet cipher, then I get the credential if … Continue reading

Posted in General stuffs, Python, Security | Tagged , , , , | Leave a comment

[python]Example script on Cisco router

This is an example script based on this https://github.com/davidbombal/pythonvideos/blob/master/paramiko-pythonssh1.py It works almost like pexpect, however need to have a privilege 15 account to make the SSHClient work, as there is no input to accept enable secret. I was trying to … Continue reading

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

[python]Capturing username and password from http login

Clear text site Nowadays it is quite rare to find http login page, because http is insecure, information sent towards the http site is all clear text, if there is a man in the middle sniffing packets to reveal the … Continue reading

Posted in Python, Security | Tagged , , | 2 Comments

[python]To find out difference between two list

Use case You have an actual name list you need to deploy software to through automated tool such as KACE by Quest software. You received a report no the number of people actually received the software and you need to … Continue reading

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

[python]Start up script to create VPC to launch EC2

Use case This is an interactive start up script to do from creating VPC to launching EC2. This is a follow up from this post – Functions for aws automation, I have added a few more functions to make it … Continue reading

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