17 lines
610 B
Python
17 lines
610 B
Python
|
from servicebase import ServiceBase
|
||
|
|
||
|
class ServiceDelegate(ServiceBase) :
|
||
|
def get_arguments(cls) :
|
||
|
"""Returns an array of information used to construct an argumentparser argument."""
|
||
|
return [ '-d', '--dns', 'store_true', "Return DNS resolution about the subject" ]
|
||
|
|
||
|
def perform_lookup(self,host_tuple) :
|
||
|
return_dict = {}
|
||
|
if len(host_tuple[2]) > 0 :
|
||
|
return_dict['IP Addresses'] = list(host_tuple[2])
|
||
|
if host_tuple[0] and host_tuple[0] != '' :
|
||
|
return_dict['Hostname'] = host_tuple[0]
|
||
|
if len(host_tuple[1]) > 0 :
|
||
|
return_dict['Associated Aliases'] = list(host_tuple[1])
|
||
|
return return_dict
|