Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 545 Bytes
import socket
from bot.api import *
class dns(Module):
@command(usage='fqdn or ip', example='')
def dns(self, event, line):
result = socket.gethostbyaddr(line)
return '{0} ({1})'.format(result[0], result[2][0])
def domain(self, event, line):
event.http('{}/check'.format(line), headers={'Accept':'application/json'})
def domain_check(self, event, response):
return '{name} ({status})'.format(**response.json)
Jump to Line
Something went wrong with that request. Please try again.