Posts Tagged ‘python’

python and resolving ips from a csv file.

Problem: I have a CSV file where I have source and destination IPs. I want to resolve only destination IPs. Format of my CSV file: (let`s call it test.csv) (it`s tab separated…) 99.88.77.66 11.22.33.44 118340.86 187 The solution is pretty simple with python: #!/usr/bin/env python import csv import socket reader = csv.reader(open(“./test.csv”, “rb”), delimiter=” “) [...]