Skip to content

Commit

Permalink
fixed subdomain enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
s0md3v committed Jan 30, 2019
1 parent 97b5ec6 commit 7b24d58
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions plugins/find_subdomains.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ def find_subdomains(domain):
"""Find subdomains according to the TLD."""
result = set()
response = get('https://findsubdomains.com/subdomains-of/' + domain).text
parts = response.split('data-row')
for part in parts:
matches = findall(
r'rel="nofollow" href="([^/]*)" target="_blank"', part)
for match in matches:
result.add(match)
matches = findall(r'(?s)<div class="domains js-domain-name">(.*?)</div>', response)
for match in matches:
result.add(match.replace(' ', '').replace('\n', ''))
return list(result)

0 comments on commit 7b24d58

Please sign in to comment.