Jan-31-2018, 08:27 PM
Thank you for your help.
I finally figured it out.
This seems to be working.
I finally figured it out.
This seems to be working.
import sys import socket import time n = time.strftime("%Y%m%d-%H%M%S") IP = sys.argv[1] host = socket.gethostbyaddr(IP) hostname=host[0] logfile = "C:/temp/%s.txt" % n f1=open(logfile, 'a') f1.write(IP+","+hostname+"\n") f1.close() sys.exit()