programming
Agentless predictive asset scan on networks
This is an agent less solution to scan complete network and build an asset report. All you need is a Linux host with python3 and pythonping, nmap and ipaddress python modules along with nmap Linux package. Since we are not authenticating to hosts and just doing a predictive scan using underline nmap tool, so report […]
Write your first REST API using Python Flask
Since years programming concepts have been evolving with new ideas and improvements. Idea of API, Application Programming Interface, came out to build integration between applications/software/platforms. It has simplified integration between totally different applications and platforms. In early days (even now), APIs were in form of client APIs. Software developers/organizations offer client software component which is […]
Write your first python module
If you are planning to build a mid to enterprise size project/product then you should consider object oriented coding practice. This benefits in many ways. For eg, your code remains tidy and you can reuse components of your code in other projects. Module is essentially a collection of several classes and class functions. These functions […]
Python filter function
This is an interesting feature in python. Suppose you have a list of items and you want to apply quick filters such as “greater than x”, “less than x”, “above average”, “below average” on list items, then filter() method makes it quite handy. Typical syntax of filter function is like filter(some_func_name, list_of_items) You can also […]
Python reduce function
This is an interesting short cut function when you want to process list items recursively. This function takes two arguments in as input, one function name that you want to apply on list and second the list itself. In python3 reduce is available in func_tools module. Typical syntax to invoke this is reduce(function_name, list_of_items) and […]
Lambda functions in python
Traditionally, most programmers use functions and macros to write re-usable routines. In Python there is a simple way write quick one liner functions which can be used throughout your program. Lambda functions are also known as anonymous functions. Syntax of lambda function is like: Here are few examples. A few more practical use cases to […]