Author Archives: cyruslab

[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

[linux]rescan the hard drive after your vm got an expanded storage

The Tufin securechange vm got an expanded storage of 1TB more, however I cannot see it immediately with the fdisk -l command. I need to rescan it using echo “1” > /sys/class/block/sda/device/rescan, then do fdisk -l, you will see the … Continue reading

Posted in Linux | Tagged , , | Leave a comment

[python]Creating security group and inbound rule

This is the extension of Functions of aws automation.I have added some methods to create security groups and apply rules. In addition to the functions/methods describe here, I have created 4 more methods to accomplish these: Security group creation Inbound … Continue reading

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

[python]Making a list of dictionaries

Use case I am trying to write a script for doing security group based on user’s input. the IpRanges is a list of dictionary. I intend to do a method which generate multiple dictionaries with the same key but different … Continue reading

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

[python]Create keypair in EC2

This is a simple code using boto3. To generate the key pair for EC2 here’s the simple code.

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