diff --git a/sublist3r.py b/sublist3r.py
index a26c7de..fab7381 100755
--- a/sublist3r.py
+++ b/sublist3r.py
@@ -538,12 +538,15 @@ def req(self, url, cookies=None):
self.print_(e)
resp = None
return resp
+
+ def should_sleep(self):
+ time.sleep(random.randint(1, 2))
+ return
def get_next(self, resp):
- link_regx = re.compile('Next page')
+ link_regx = re.compile('Next Page')
link = link_regx.findall(resp)
- link = re.sub('host=.*?%s' % self.domain, 'host=%s' % self.domain, link[0])
- url = 'http://searchdns.netcraft.com' + link
+ url = 'http://searchdns.netcraft.com' + link[0]
return url
def create_cookies(self, cookie):
@@ -569,14 +572,15 @@ def enumerate(self):
while True:
resp = self.get_response(self.req(url, cookies))
self.extract_domains(resp)
- if 'Next page' not in resp:
+ if 'Next Page' not in resp:
return self.subdomains
break
url = self.get_next(resp)
+ self.should_sleep()
def extract_domains(self, resp):
links_list = list()
- link_regx = re.compile('')
+ link_regx = re.compile('