linux get ip by domain 1

linux get ip by domain

$ dig +short

Here is what the above code is Doing:
1. We’re importing the socket module, which is used to create a socket object.
2. We’re creating a socket object.
3. We’re connecting to the server.
4. We’re sending a query to the server.
5. We’re receiving the response from the server.
6. We’re printing the response.

Similar Posts