(self, domain)
Get passive DNS info on a domain
Get passive DNS info on a domain
Get passive DNS info on a domain
def get_pdns_domain(self, domain):
        """
        Get passive DNS info on a domain
        """
        r = requests.get("https://freeapi.robtex.com/pdns/forward/%s" % domain)
        if r.status_code != 200:
            raise RobtexError("Wrong HTTP status code %i" % r.status_code)
        else:
            data = self._parse_pdns(r.text)
            for d in data:
                if "time_first" in d:
                    d["time_first_o"] = datetime.fromtimestamp(d["time_first"])
                if "time_last" in d:
                    d["time_last_o"] = datetime.fromtimestamp(d["time_last"])

            return data
def get_pdns_domain ( self , domain ) : r = requests . get ( "https://freeapi.robtex.com/pdns/forward/%s" % domain ) if r . status_code != 200 : raise RobtexError ( "Wrong HTTP status code %i" % r . status_code ) else : data = self . _parse_pdns ( r . text ) for d in data : if "time_first" in d : d [ "time_first_o" ] = datetime . fromtimestamp ( d [ "time_first" ] ) if "time_last" in d : d [ "time_last_o" ] = datetime . fromtimestamp ( d [ "time_last" ] ) return data