Skip to content
  • Presentations

My Dairy……

Home | Work | Life

My Dairy……

Home | Work | Life

  • Presentations

python

RSA PKI based encryption and decryption in python
Posted on May 26, 2022June 30, 2022 by manish

RSA PKI based encryption and decryption in python

Share

Generate RSA key pair in pem format Remember above pem file contains private and public key. Keep it secure with yourself. Extract public key out of pem file Now you have private key embedded in private.pem file along with public key. And a copy of public key is available in public.pem file. You can share […]

PKI, python
  • Tech bytes
Python pandas dataframe to Influxdb with column and other tags
Posted on August 6, 2020August 7, 2020 by manish

Python pandas dataframe to Influxdb with column and other tags

Share

Python pandas is very powerful data processing library. It can take large data from variety of sources (CSVs, databases, excel etc) and process it in memory. After processing the data you may have to dump it in influxdb. In influxdb each measurement has tags and fields. While writing pandas dataframe to influxdb we can define […]

dataframe, Influxdb
  • Tech bytes
Mass network connection tracker
Posted on June 8, 2020June 8, 2020 by manish

Mass network connection tracker

Share

At times, you want to keep track of network connections between multiple hosts on different TCP ports. For example, if you have a medium or large scale infra comprising of many applications, databases, devices etc. All these mutually connect with each other on TCP ports. And in case there is an unannounced change in routing […]

automation, network
  • Tech bytes
Login and parse ASP.NET sites with Python
Posted on June 7, 2020June 8, 2020 by manish

Login and parse ASP.NET sites with Python

Share

I am using web scraping on several sites to get information like prices from e-commerce sites and meter readings, balance amount etc from my apartment service provider portal. This is fairly simple to do in python using “requests” and “beautifulsoup” modules. Recently, my apartment service provider revamped their website in ASP.NET. I thought it was […]

python, Web Scrapping
  • Tech bytes
Automated bulk command execution on SSH enabled hosts and devices
Posted on April 4, 2020May 28, 2020 by manish

Automated bulk command execution on SSH enabled hosts and devices

Share

In the lockdown period, during pandemic, there is nothing much to do over weekend 😏. Was just thinking of writing ✍️ something, something useful…. then came up with an idea to address a common problem that many sysadmins and netadmins come across. At times, we want to run set of commands on many devices, hosts […]

automation, python
  • Tech bytes
High performance python based SNMP poller
Posted on February 14, 2020February 15, 2020 by manish

High performance python based SNMP poller

Share

In my last post, I wrote a basic SNMP poller using python easysnmp module. To make it more practical and industry ready I have further enriched it with following: Read SNMPv2 and SNMPv3 devices from CSV file. Based on the field count in device record use SNMPv2 or SNMPv3 module. Poll thousands of devices by […]

automation, network
  • Tech bytes
SNMP polling to get network interface statistics
Posted on February 7, 2020February 8, 2020 by manish

SNMP polling to get network interface statistics

Share

This is very common used case in industry. Lets see how this can be implemented in python using easysnmp python module. This can be further extended to inject collected data into databases or CSVs. Here is the sample result of above program.

python, SNMP
  • Tech bytes
Ping and NMAP as REST API
Posted on February 5, 2020February 6, 2020 by manish

Ping and NMAP as REST API

Share

I came across this idea while working on problem statement, where requirement was to run ping and nmap checks on devices and hosts from a jump server. Best way to offer nmap and ping check without getting users on jump server was to offer ping and nmap in some form of web service. To do […]

nmap, python
  • Tech bytes
Python Dictionary – versatile data Structure
Posted on February 4, 2020February 6, 2020 by manish

Python Dictionary – versatile data Structure

Share

Python is really simple and powerful when you have to handle complex data objects. Dictionary is one of the popular data structures used in python. Just thought to put up quick code explaining what all you can do with a dictionary object in really simple way. Here is the output you get upon executing above […]

python
  • Tech bytes
LDAP operations using Python
Posted on January 29, 2020February 15, 2023 by manish

LDAP operations using Python

Share

Normal command line LDAP tools such as ldapsearch, ldapadd, ldapmodify etc are handy when you are playing with standalone data. But if you want to do operations such as, taking user data from CSV in LDAP or get a neat formatted output for LDAP queries then python-ldap module is really what you need. Here is […]

ldap, python
  • Tech bytes

Posts navigation

Older posts
Copyright © Blogbuster 2025 Proudly powered by WordPress | Theme: Blogbuster by Mystery Themes.