DNS Lookup | Python

Here you have a simple script using Python to DNS Lookup.


- The sockets module provides an easy way to look up a host name's ip address.

GetHostByName_Ex() = Translate a host name to IPv4 address format, extended interface. Return a triple (hostname, aliaslist, ipaddrlist) where hostname is the primary host name responding to the given ip_address, aliaslist is a (possibly empty) list of alternative host names for the same address, and ipaddrlist is a list of IPv4 addresses for the same interface on the same host (often but not always a single address). gethostbyname_ex() does not support IPv6 name resolution, and getaddrinfo() should be used instead for IPv4/v6 dual stack support.


- Here you have the output script:


59 views0 comments

Recent Posts

See All

Python | Getting pictures from Instagram

In this post you will learn how you can save pictures from Instagram account in your PC using Python. You just need to install "instalooter" into your Python packages and run the command. There are ma

PowerShell ISE | Multiple Ping

The Windows PowerShell Integrated Scripting Environment (ISE) is a graphical user interface and front-end hosting application for Windows PowerShell. The ISE enables developers to run PowerShell comma

Telegram message with Python

In this post I am showing how to send text message and photo from any computer to mobile telegram app. This is only few lines of code to send automatic message to smartphone from raspberry pi or from