Created
May 10, 2016 21:09
-
-
Save Wildcarde/1b718dc919601c3b978b226da642247a to your computer and use it in GitHub Desktop.
Quick hack to reverse a list of IPs to their hostnames from firewall logs, this assumes python 2.7/3 and pandas are available
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import pandas as pd | |
import socket | |
df = pd.read_csv('<sourcecsv>.csv') | |
ips=df["Source address"] | |
for ip in ips: | |
print (socket.gethostbyaddr(str(ip))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment