theHarvester/lib/hostchecker.py
laramies 09babc0285 2.5
Fixed Google searches, and introduced Requests library
2014-12-16 23:25:12 +00:00

25 lines
468 B
Python

#!/usr/bin/env python
# encoding: utf-8
"""
Created by laramies on 2008-08-21.
"""
import sys
import socket
class Checker():
def __init__(self, hosts):
self.hosts = hosts
self.realhosts = []
def check(self):
for x in self.hosts:
try:
res = socket.gethostbyname(x)
self.realhosts.append(res + ":" + x)
except Exception as e:
pass
return self.realhosts