mirror of
https://github.com/laramies/theHarvester.git
synced 2024-11-11 18:03:10 +08:00
5e2a684f5a
Don't mix line endings. Always use LF for text files when committing. Ensure your `core.eol` is set to `native` using `git config` to get native line endings for your platform on checkout.
25 lines
547 B
Python
25 lines
547 B
Python
#!/usr/bin/env python
|
|
# encoding: utf-8
|
|
"""
|
|
Created by laramies on 2008-08-21.
|
|
"""
|
|
|
|
import socket
|
|
|
|
|
|
class Checker():
|
|
|
|
def __init__(self, hosts):
|
|
self.hosts = hosts
|
|
self.realhosts = []
|
|
|
|
def check(self):
|
|
for x in self.hosts:
|
|
x = str(x)
|
|
try:
|
|
res = socket.gethostbyname(x)
|
|
res = str(res)
|
|
self.realhosts.append(x + ':' + res)
|
|
except Exception as e:
|
|
self.realhosts.append(x + ':' + 'empty')
|
|
return self.realhosts
|