Skip to content

A script to convert all IPs in a text file to resolved hostnames

License

Notifications You must be signed in to change notification settings

arainchik/ip2name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip2name

A script to convert all IPs in a text file to resolved hostnames

Here is an example:

$ cat testfile.txt 
8.8.8.8 google dns server #1
8.8.4.4 google dns server #2

299.222.222.222 not a valid IP
this is what www.microsoft.com resolves to: 64.4.11.42

8.8.8.8 8.8.4.4

$ python ip2name.py < testfile.txt
[google-public-dns-a.google.com] google dns server #1
[google-public-dns-b.google.com] google dns server #2

299.222.222.222 not a valid IP
this is what www.microsoft.com resolves to: [64.4.11.42]

[google-public-dns-a.google.com] [google-public-dns-b.google.com]

About

A script to convert all IPs in a text file to resolved hostnames

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages