Author Archives: cyruslab

[python]resolve hostnames to ip address using pydns module

I wrote another script to change the desired nameserver. previously i used socket module to do resolution but i did not know how i can change the nameserver so i downloaded pydns. This script can be extended to be used … Continue reading

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

[python]F5 iControl API demo

Background This demo script is to demonstrate to call F5 iCloud API with F5 SDK. The script is written in python, however I have found some limitation in using F5 SDK, best to try with direct call to the REST … Continue reading

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

[python]Working with F5 iControl API on listing the virtual servers and pools

I am extending my demo script to demonstrate the viability to use iControl with our orchestrator for automatic F5 load balancer server provisioning. I need to write a function to enumerate the pools and virtual servers, and here is how … Continue reading

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

[powershell]Qutting com-object

I was trying to test a powershell script to read information from an excel file, I searched through the internet and found that using com object to open an excel workbook, however the close workbook and quit excel does not … Continue reading

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

[python]Resolving a group of fqdns and store the ip addresses

Reference:http://www.pythonforbeginners.com/python/dns-lookup-python Looking at the reference above is much easier than reading the actual socket documentation. My purpose is to find a python way to resolve a group of hostnames and return them as ip addresses. Here’s the same code. Here’s … Continue reading

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

[python]Creating bigip pool and pool members with F5 icontrol

I have recently downloaded the F5 SDK which helped to use the iControl REST API easily, it has a documentation here: https://f5-sdk.readthedocs.io, there are some coding example too, however not too in depth. So i started by just trying to … Continue reading

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

[c]Question and Exercise (Tossing chance)

The requirement is to ask user to input head or tail in the program and display the number of heads and tails and the probability in percentage. output will be like this: Choose head or tail (valid choices is h … Continue reading

Posted in General stuffs | 1 Comment