Skip to content

Commit

Permalink
开启域传送漏洞插件,ip2domain增加容错处理
Browse files Browse the repository at this point in the history
  • Loading branch information
fooying committed Jan 12, 2015
1 parent f26a438 commit 25a3325
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/dnszonetransfer/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enable: False
enable: True
onerepeat: true
input: ['root_domain']
output: ['ip', 'domain']
Expand Down
3 changes: 2 additions & 1 deletion plugins/dnszonetransfer/dnshelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ def zone_transfer(self):
ns_records = list(set(ns_records))
# Test each NS Server
for ns_srv in ns_records:
if self.check_tcp_dns(ns_srv):
#if self.check_tcp_dns(ns_srv):
if True:

try:
zone = self.from_wire(dns.query.xfr(ns_srv, self._domain))
Expand Down
10 changes: 7 additions & 3 deletions plugins/ip2domain/work.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ def start(self, domain, domain_type, level):
for n in range(total_num-1):
url = ('http://cn.bing.com/search?q='
'ip:%s&first=%s1&FORM=PERE3' % (domain, n))
html = self.req.request('GET', url).text
new_domain_list = re.findall(domain_regx, html, re.X)
domain_list.extend(new_domain_list)
try:
html = self.req.request('GET', url).text
except:
html = ''
else:
new_domain_list = re.findall(domain_regx, html, re.X)
domain_list.extend(new_domain_list)
time.sleep(1)

domains, root_domains, ips = self.__classify_result(domain_list)
Expand Down

0 comments on commit 25a3325

Please sign in to comment.