Skip to content

Commit

Permalink
research for a faster dns
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivas11789 committed Aug 7, 2019
1 parent 67b5c07 commit f26d076
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Source/Module/communication_details_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Library Import
import ipwhois
from dns import reversename, resolver
#from dns import reversename, resolver
import socket
# Module Import
#import pcap_reader
Expand All @@ -26,6 +26,20 @@ def whois_info_fetch(self, ip):
except:
whois_info = "NoWhoIsInfo"
return whois_info

"""
@staticmethod
def dns_using_library(ip):
try:
reverse_query = reversename.from_address(ip)
resolve_bot = resolve.Resolver()
resolve_bot.timeout = 1
resolve_bot.lifetime = 1
dns_info = str(resolve_bot.query(reverse_query,"PTR")[0])
except:
dns_info = "NotResolvable"
return dns_info
"""

@staticmethod
def dns(ip):
Expand Down

0 comments on commit f26d076

Please sign in to comment.